diff options
author | David Golden <dagolden@cpan.org> | 2009-11-19 08:04:04 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2009-11-19 08:05:33 -0500 |
commit | 08fc25adb28b667408639f0458cda3d8f55bac70 (patch) | |
tree | e19864cd663a07354d11804ca790a22f569b037e /cpan/Module-Build/lib/Module/Build/Notes.pm | |
parent | 1fc7262d227d94438986ab803a17938da27ab057 (diff) | |
download | perl-08fc25adb28b667408639f0458cda3d8f55bac70.tar.gz |
Updated Module::Build to 0.35_09
0.35_09 - Thu Nov 19 01:30:42 EST 2009
Bug fixes:
- The DB package should not be included in 'provides' in META files
[David Golden]
- Fixed t/xs.t build failures in bleadperl for noexec temp directories
[Nicholas Clark]
- Adjusted order of @INC in resume() (fixes par.t, ppm.t, xs.t fails):
@INC = @new_additions_to_inc, @saved_additions_to_inc, @default_inc
[David Golden]
- Skip bundle_inc.t tests if bundled Module::Build for test can't be
tweaked (Works around test crashes on Win2) [David Golden]
Other:
- 'C_support' is no longer an optional feature. Modern ExtUtils::CBuilder
and ExtUtils::ParseXS added to the 'requires' list. This ensures that
upgrading Module::Build will upgrade this critical modules.
ExtUtils::CBuilder no longer requires a compiler, so it is "safe" to
require.
Diffstat (limited to 'cpan/Module-Build/lib/Module/Build/Notes.pm')
-rw-r--r-- | cpan/Module-Build/lib/Module/Build/Notes.pm | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/cpan/Module-Build/lib/Module/Build/Notes.pm b/cpan/Module-Build/lib/Module/Build/Notes.pm index a0506c64dc..9b48f4c077 100644 --- a/cpan/Module-Build/lib/Module/Build/Notes.pm +++ b/cpan/Module-Build/lib/Module/Build/Notes.pm @@ -4,7 +4,7 @@ package Module::Build::Notes; use strict; use vars qw($VERSION); -$VERSION = '0.35_08'; +$VERSION = '0.35_09'; $VERSION = eval $VERSION; use Data::Dumper; use IO::File; @@ -33,10 +33,10 @@ sub restore { sub access { my $self = shift; return $self->read() unless @_; - + my $key = shift; return $self->read($key) unless @_; - + my $value = shift; $self->write({ $key => $value }); return $self->read($key); @@ -61,7 +61,7 @@ sub read { return $self->{new}{$key} if exists $self->{new}{$key}; return $self->{disk}{$key}; } - + # Return all data my $out = (keys %{$self->{new}} ? {%{$self->{disk}}, %{$self->{new}}} @@ -79,7 +79,7 @@ sub _same { sub write { my ($self, $href) = @_; $href ||= {}; - + @{$self->{new}}{ keys %$href } = values %$href; # Merge # Do some optimization to avoid unnecessary writes @@ -88,17 +88,17 @@ sub write { next if ref $self->{disk}{$key} or !exists $self->{disk}{$key}; delete $self->{new}{$key} if $self->_same($self->{new}{$key}, $self->{disk}{$key}); } - + if (my $file = $self->{file}) { my ($vol, $dir, $base) = File::Spec->splitpath($file); $dir = File::Spec->catpath($vol, $dir, ''); return unless -e $dir && -d $dir; # The user needs to arrange for this return if -e $file and !keys %{ $self->{new} }; # Nothing to do - - @{$self->{disk}}{ keys %{$self->{new}} } = values %{$self->{new}}; # Merge + + @{$self->{disk}}{ keys %{$self->{new}} } = values %{$self->{new}}; # Merge $self->_dump($file, $self->{disk}); - + $self->{new} = {}; } return $self->read; @@ -106,7 +106,7 @@ sub write { sub _dump { my ($self, $file, $data) = @_; - + my $fh = IO::File->new("> $file") or die "Can't create '$file': $!"; print {$fh} Module::Build::Dumper->_data_dump($data); } @@ -126,7 +126,7 @@ sub write_config_data { # strip out private POD markers we use to keep pod from being # recognized for *this* source file $template =~ s{$_\n}{} for '=begin private', '=end private'; - + my $fh = IO::File->new("> $args{file}") or die "Can't create '$args{file}': $!"; print {$fh} $template; print {$fh} "\n__DATA__\n"; @@ -218,18 +218,18 @@ sub write { sub feature { my ($package, $key) = @_; return $features->{$key} if exists $features->{$key}; - + my $info = $auto_features->{$key} or return 0; - + # Under perl 5.005, each(%$foo) isn't working correctly when $foo # was reanimated with Data::Dumper and eval(). Not sure why, but # copying to a new hash seems to solve it. my %info = %$info; - + require Module::Build; # XXX should get rid of this while (my ($type, $prereqs) = each %info) { next if $type eq 'description' || $type eq 'recommends'; - + my %p = %$prereqs; # Ditto here. while (my ($modname, $spec) = each %p) { my $status = Module::Build->check_installed_status($modname, $spec); @@ -251,10 +251,10 @@ NOTES_NAME - Configuration for MODULE_NAME use NOTES_NAME; $value = NOTES_NAME->config('foo'); $value = NOTES_NAME->feature('bar'); - + @names = NOTES_NAME->config_names; @names = NOTES_NAME->feature_names; - + NOTES_NAME->set_config(foo => $new_value); NOTES_NAME->set_feature(bar => $new_value); NOTES_NAME->write; # Save changes |