bump version to 3.00.00_1; update POD a bit; include contact info for myself; declare this module deprecated and in maintenance mode; include Module::Build in the 'inc' dir to avoid a warning about it being deprecated from core inclusion; add mention of the UNIVERSAL->isa() bug created by Class::Std::Fast to the POD for BUGS AND LIMITATIONS.

This commit is contained in:
Scott Walters
2014-08-27 17:39:52 -04:00
parent 2624a9d5c0
commit 7d81cfce87
137 changed files with 21743 additions and 165 deletions
+59
View File
@@ -0,0 +1,59 @@
package Module::Build::Config;
use strict;
use vars qw($VERSION);
$VERSION = '0.4206';
$VERSION = eval $VERSION;
use Config;
sub new {
my ($pack, %args) = @_;
return bless {
stack => {},
values => $args{values} || {},
}, $pack;
}
sub get {
my ($self, $key) = @_;
return $self->{values}{$key} if ref($self) && exists $self->{values}{$key};
return $Config{$key};
}
sub set {
my ($self, $key, $val) = @_;
$self->{values}{$key} = $val;
}
sub push {
my ($self, $key, $val) = @_;
push @{$self->{stack}{$key}}, $self->{values}{$key}
if exists $self->{values}{$key};
$self->{values}{$key} = $val;
}
sub pop {
my ($self, $key) = @_;
my $val = delete $self->{values}{$key};
if ( exists $self->{stack}{$key} ) {
$self->{values}{$key} = pop @{$self->{stack}{$key}};
delete $self->{stack}{$key} unless @{$self->{stack}{$key}};
}
return $val;
}
sub values_set {
my $self = shift;
return undef unless ref($self);
return $self->{values};
}
sub all_config {
my $self = shift;
my $v = ref($self) ? $self->{values} : {};
return {%Config, %$v};
}
1;