[Bps-public-commit] r11614 - in Data-ICal: . inc/Module inc/Module/Install lib/Data/ICal
jesse at bestpractical.com
jesse at bestpractical.com
Mon Apr 7 09:11:56 EDT 2008
Author: jesse
Date: Mon Apr 7 09:11:56 2008
New Revision: 11614
Modified:
Data-ICal/ (props changed)
Data-ICal/Changes
Data-ICal/META.yml
Data-ICal/SIGNATURE
Data-ICal/inc/Module/Install.pm
Data-ICal/inc/Module/Install/AutoInstall.pm
Data-ICal/inc/Module/Install/Base.pm
Data-ICal/inc/Module/Install/Can.pm
Data-ICal/inc/Module/Install/Fetch.pm
Data-ICal/inc/Module/Install/Include.pm
Data-ICal/inc/Module/Install/Makefile.pm
Data-ICal/inc/Module/Install/Metadata.pm
Data-ICal/inc/Module/Install/Win32.pm
Data-ICal/inc/Module/Install/WriteAll.pm
Data-ICal/lib/Data/ICal.pm
Data-ICal/lib/Data/ICal/Property.pm
Log:
r29437 at 68-247-45-239: jesse | 2008-04-07 05:38:37 -0500
0.14 - stricture fix from ANDK
Modified: Data-ICal/Changes
==============================================================================
--- Data-ICal/Changes (original)
+++ Data-ICal/Changes Mon Apr 7 09:11:56 2008
@@ -1,8 +1,9 @@
Revision history for Data-ICal
-HEAD
+0.14
* No longer explodes if your .ics file lacks a VERSION property
+ * Perl 5.11 adds additional strictures. Patch from ANDK to deal [rt.cpan.org #34717]
0.13
Modified: Data-ICal/META.yml
==============================================================================
--- Data-ICal/META.yml (original)
+++ Data-ICal/META.yml Mon Apr 7 09:11:56 2008
@@ -1,13 +1,18 @@
+---
abstract: Generates iCalendar (RFC 2445) calendar files
-author: Jesse Vincent <jesse at bestpractical.com>
+author:
+ - Jesse Vincent <jesse at bestpractical.com>
build_requires:
Test::LongString: 0
Test::More: 0
Test::NoWarnings: 0
Test::Warn: 0
distribution_type: module
-generated_by: Module::Install version 0.64
+generated_by: Module::Install version 0.68
license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
name: Data-ICal
no_index:
directory:
@@ -18,4 +23,4 @@
Class::ReturnValue: 0
MIME::QuotedPrint: 0
Text::vFile::asData: 0
-version: 0.13
+version: 0.14
Modified: Data-ICal/SIGNATURE
==============================================================================
--- Data-ICal/SIGNATURE (original)
+++ Data-ICal/SIGNATURE Mon Apr 7 09:11:56 2008
@@ -14,25 +14,26 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 c95d9a732b724d3086ef69f6640c9c705a4ec4c3 Changes
-SHA1 f7cd7d92b44ecc860336871d1d9ed3f47327c2a6 MANIFEST
-SHA1 fcdf6e040895f3cac75cb321bd771b132889b283 META.yml
+SHA1 d77ebc534b9ee15480b9aa9eb57d08fa39e55a94 Changes
+SHA1 57c2097e5e5376a950b176f296b90dce4d86452b MANIFEST
+SHA1 7a90baa4b52d9913e8dbe83c18565df67fd3c866 META.yml
SHA1 d9c6af97d586360df8b31d69d4a981eefea06ba6 Makefile.PL
SHA1 d9f0e46f1abb63475a9d382938debf95ec586612 README
SHA1 53368d91c157d1932b76db94854288903ae7ec59 doc/rfc2445.txt
+SHA1 1ca8755782cececa8cb19deddbcbe03be8e73cfc examples/ical2html.pl
SHA1 603bb9de29fb8cba7f13409c546750972eff645d inc/Module/AutoInstall.pm
-SHA1 9b2f9d83bcf77860f53a0c07c90a4a59ad9f5df1 inc/Module/Install.pm
-SHA1 ad955f51ad2c40d4ba35395c27f5ed899a80bf7a inc/Module/Install/AutoInstall.pm
-SHA1 abe32855d75ab13747cf65765af9947b7a8c3057 inc/Module/Install/Base.pm
-SHA1 95b81d1e91bd634467bf633571eff4420e9c04eb inc/Module/Install/Can.pm
-SHA1 1fe98c63cf9d7271c8cb4183ba230f152df69e26 inc/Module/Install/Fetch.pm
-SHA1 0606a8b02a420600bc3e2b65ab82f70266784926 inc/Module/Install/Include.pm
-SHA1 2249171a2b72cd73ff2c0a06597d29f86e5df456 inc/Module/Install/Makefile.pm
-SHA1 381bb98ea3877bba49ae85e7a7ea130645fd3dbf inc/Module/Install/Metadata.pm
-SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e inc/Module/Install/Win32.pm
-SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda inc/Module/Install/WriteAll.pm
-SHA1 d5488ff20731383bee7c3d3676d74bc5e7696ff8 lib/Data/ICal.pm
-SHA1 8721537a4477422b4541320fbb0f1fc20dcce001 lib/Data/ICal/Entry.pm
+SHA1 7e2cfa1b9efe0d502ee57717649c90ba4bd28ba9 inc/Module/Install.pm
+SHA1 182a0df45b65151afdc2be0b7246a2d02d0f0567 inc/Module/Install/AutoInstall.pm
+SHA1 6e1392d80a0f239eecd5664f7f21f922cedb9329 inc/Module/Install/Base.pm
+SHA1 f69417fe831d9cc22a78f00a617afadceade4d81 inc/Module/Install/Can.pm
+SHA1 c61d02895330310048bf388881b5e2e064031561 inc/Module/Install/Fetch.pm
+SHA1 4933b00c3a646da8d223c6957f94552bbd62f8c6 inc/Module/Install/Include.pm
+SHA1 54fcbed19232ec959bb17cfb4410599afc7f0779 inc/Module/Install/Makefile.pm
+SHA1 7d3be9b158e37b2b2c22084740099955623b1d56 inc/Module/Install/Metadata.pm
+SHA1 0a8b66180229ba2f9deaea1fedd0aacf7a7ace6b inc/Module/Install/Win32.pm
+SHA1 d3352eb33fe43a5f3ead513f645224fe34d73bc9 inc/Module/Install/WriteAll.pm
+SHA1 19dce4932d1c00745a77f500fc9ef3367abc7374 lib/Data/ICal.pm
+SHA1 9cb5dbff0f1eeaa60b20f2a15da40810b2c27996 lib/Data/ICal/Entry.pm
SHA1 1aba295f69f55ef58fcf20d4a509222fe4cf02f0 lib/Data/ICal/Entry/Alarm/Audio.pm
SHA1 edc21a5cd2c17e1892a2ab12dd2c8dc31011bb48 lib/Data/ICal/Entry/Alarm/Display.pm
SHA1 3003fb0bba35562d27f94498f4487f7ba1810a39 lib/Data/ICal/Entry/Alarm/Email.pm
@@ -44,7 +45,7 @@
SHA1 c094381b7739eea4a663acdd4f9af8572a19ad48 lib/Data/ICal/Entry/TimeZone/Daylight.pm
SHA1 fc807da3b247c7b054e971efe6cd0ffc20c741ca lib/Data/ICal/Entry/TimeZone/Standard.pm
SHA1 3b6856f5ec5951e0fb3250059aa3f40e75b03427 lib/Data/ICal/Entry/Todo.pm
-SHA1 1beff31fc629f8529d2f37ded5e4d76c8b79a3ee lib/Data/ICal/Property.pm
+SHA1 1cec2fcc94e443e2dd86f8f66d78b97b39c4603d lib/Data/ICal/Property.pm
SHA1 371dc48be4670c99ffa5f732e7d7584465e39edc t/00.load.t
SHA1 c3da220214dd88626ba4aa2cef6f5becdb919b37 t/01.simplegen.t
SHA1 b42254140a1726b34474aaa4b88448710af5f340 t/02.linewrap.t
@@ -53,17 +54,18 @@
SHA1 8390a95bb4dae06bf01153f7ecd9f95537538737 t/05.prop-params.t
SHA1 a30f42bcd7f659ecbd1c8b2b69ca9c51a4568625 t/06.prop-bad-quote.t
SHA1 6a3f262179361be328ae6ba4a6c9b0f63b4fa2b9 t/07.roundtrip.t
-SHA1 f639976ca450fa3f55aed53c2508bcd01c00989b t/08.parse.t
+SHA1 89d38622de23ba4d2b44f12c6047849513469587 t/08.parse.t
SHA1 749ad308ae2f344515d03590075bae40673b70ed t/09.mime.t
SHA1 aedd4e9214e3e43e44ccf3f47a77148e94c23032 t/10.mime-vcal10.t
SHA1 21854f472cd60fd9ce6f88872691f2a744e0af5e t/ics/badlyformed.ics
+SHA1 3157614223f00a48699992314b1d48946fc45af7 t/ics/noversion.ics
SHA1 09a4ae7fe9978bf4ab9e13ac735f7a800f231944 t/ics/test.ics
SHA1 6da39b48ce64b584e4c3274bff96fc76ff484820 t/pod-coverage.t
SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (Darwin)
+Version: GnuPG v1.4.8 (Darwin)
-iD8DBQFFp9JmEi9d9xCOQEYRAh0WAJ0d0ei0WK19sswN0bBpDX8wy1YPywCfQRiK
-FKqX5N/zAwGqcY43JGrY8ao=
-=WtEo
+iD8DBQFH+fmYEi9d9xCOQEYRAkE/AJ9CV/7anL7afoe5wE6G7DoW/VyAkACeMQ2i
+incwb4OgBA4aRVHhQ5VNHUQ=
+=yTuQ
-----END PGP SIGNATURE-----
Modified: Data-ICal/inc/Module/Install.pm
==============================================================================
--- Data-ICal/inc/Module/Install.pm (original)
+++ Data-ICal/inc/Module/Install.pm Mon Apr 7 09:11:56 2008
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.64';
+ $VERSION = '0.68';
}
# Whether or not inc::Module::Install is actually loaded, the
Modified: Data-ICal/inc/Module/Install/AutoInstall.pm
==============================================================================
--- Data-ICal/inc/Module/Install/AutoInstall.pm (original)
+++ Data-ICal/inc/Module/Install/AutoInstall.pm Mon Apr 7 09:11:56 2008
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/inc/Module/Install/Base.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Base.pm (original)
+++ Data-ICal/inc/Module/Install/Base.pm Mon Apr 7 09:11:56 2008
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.64';
+$VERSION = '0.68';
# Suspend handler for "redefined" warnings
BEGIN {
Modified: Data-ICal/inc/Module/Install/Can.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Can.pm (original)
+++ Data-ICal/inc/Module/Install/Can.pm Mon Apr 7 09:11:56 2008
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/inc/Module/Install/Fetch.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Fetch.pm (original)
+++ Data-ICal/inc/Module/Install/Fetch.pm Mon Apr 7 09:11:56 2008
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/inc/Module/Install/Include.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Include.pm (original)
+++ Data-ICal/inc/Module/Install/Include.pm Mon Apr 7 09:11:56 2008
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/inc/Module/Install/Makefile.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Makefile.pm (original)
+++ Data-ICal/inc/Module/Install/Makefile.pm Mon Apr 7 09:11:56 2008
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -17,192 +17,221 @@
my %seen = ();
sub prompt {
- shift;
+ shift;
- # Infinite loop protection
- my @c = caller();
- if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
- die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
- }
-
- # In automated testing, always use defaults
- if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
- local $ENV{PERL_MM_USE_DEFAULT} = 1;
- goto &ExtUtils::MakeMaker::prompt;
- } else {
- goto &ExtUtils::MakeMaker::prompt;
- }
+ # Infinite loop protection
+ my @c = caller();
+ if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+ die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+ }
+
+ # In automated testing, always use defaults
+ if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+ goto &ExtUtils::MakeMaker::prompt;
+ } else {
+ goto &ExtUtils::MakeMaker::prompt;
+ }
}
sub makemaker_args {
- my $self = shift;
- my $args = ($self->{makemaker_args} ||= {});
- %$args = ( %$args, @_ ) if @_;
- $args;
+ my $self = shift;
+ my $args = ($self->{makemaker_args} ||= {});
+ %$args = ( %$args, @_ ) if @_;
+ $args;
}
# For mm args that take multiple space-seperated args,
# append an argument to the current list.
sub makemaker_append {
- my $self = shift;
- my $name = shift;
- my $args = $self->makemaker_args;
- $args->{name} = defined $args->{$name}
- ? join( ' ', $args->{name}, @_ )
- : join( ' ', @_ );
+ my $self = sShift;
+ my $name = shift;
+ my $args = $self->makemaker_args;
+ $args->{name} = defined $args->{$name}
+ ? join( ' ', $args->{name}, @_ )
+ : join( ' ', @_ );
}
sub build_subdirs {
- my $self = shift;
- my $subdirs = $self->makemaker_args->{DIR} ||= [];
- for my $subdir (@_) {
- push @$subdirs, $subdir;
- }
+ my $self = shift;
+ my $subdirs = $self->makemaker_args->{DIR} ||= [];
+ for my $subdir (@_) {
+ push @$subdirs, $subdir;
+ }
}
sub clean_files {
- my $self = shift;
- my $clean = $self->makemaker_args->{clean} ||= {};
- %$clean = (
- %$clean,
- FILES => join(' ', grep length, $clean->{FILES}, @_),
- );
+ my $self = shift;
+ my $clean = $self->makemaker_args->{clean} ||= {};
+ %$clean = (
+ %$clean,
+ FILES => join(' ', grep length, $clean->{FILES}, @_),
+ );
}
sub realclean_files {
- my $self = shift;
- my $realclean = $self->makemaker_args->{realclean} ||= {};
- %$realclean = (
- %$realclean,
- FILES => join(' ', grep length, $realclean->{FILES}, @_),
- );
+ my $self = shift;
+ my $realclean = $self->makemaker_args->{realclean} ||= {};
+ %$realclean = (
+ %$realclean,
+ FILES => join(' ', grep length, $realclean->{FILES}, @_),
+ );
}
sub libs {
- my $self = shift;
- my $libs = ref $_[0] ? shift : [ shift ];
- $self->makemaker_args( LIBS => $libs );
+ my $self = shift;
+ my $libs = ref $_[0] ? shift : [ shift ];
+ $self->makemaker_args( LIBS => $libs );
}
sub inc {
- my $self = shift;
- $self->makemaker_args( INC => shift );
+ my $self = shift;
+ $self->makemaker_args( INC => shift );
+}
+
+my %test_dir = ();
+
+sub _wanted_t {
+ /\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
+}
+
+sub tests_recursive {
+ my $self = shift;
+ if ( $self->tests ) {
+ die "tests_recursive will not work if tests are already defined";
+ }
+ my $dir = shift || 't';
+ unless ( -d $dir ) {
+ die "tests_recursive dir '$dir' does not exist";
+ }
+ require File::Find;
+ %test_dir = ();
+ File::Find::find( \&_wanted_t, $dir );
+ $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
sub write {
- my $self = shift;
- die "&Makefile->write() takes no arguments\n" if @_;
+ my $self = shift;
+ die "&Makefile->write() takes no arguments\n" if @_;
- my $args = $self->makemaker_args;
- $args->{DISTNAME} = $self->name;
- $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
- $args->{VERSION} = $self->version || $self->determine_VERSION($args);
- $args->{NAME} =~ s/-/::/g;
- if ( $self->tests ) {
- $args->{test} = { TESTS => $self->tests };
- }
- if ($] >= 5.005) {
- $args->{ABSTRACT} = $self->abstract;
- $args->{AUTHOR} = $self->author;
- }
- if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
- $args->{NO_META} = 1;
- }
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
- $args->{SIGN} = 1;
- }
- unless ( $self->is_admin ) {
- delete $args->{SIGN};
- }
-
- # merge both kinds of requires into prereq_pm
- my $prereq = ($args->{PREREQ_PM} ||= {});
- %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
- ($self->build_requires, $self->requires) );
-
- # merge both kinds of requires into prereq_pm
- my $subdirs = ($args->{DIR} ||= []);
- if ($self->bundles) {
- foreach my $bundle (@{ $self->bundles }) {
- my ($file, $dir) = @$bundle;
- push @$subdirs, $dir if -d $dir;
- delete $prereq->{$file};
- }
- }
-
- if ( my $perl_version = $self->perl_version ) {
- eval "use $perl_version; 1"
- or die "ERROR: perl: Version $] is installed, "
- . "but we need version >= $perl_version";
- }
-
- my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
- if ($self->admin->preop) {
- $args{dist} = $self->admin->preop;
- }
+ my $args = $self->makemaker_args;
+ $args->{DISTNAME} = $self->name;
+ $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
+ $args->{VERSION} = $self->version || $self->determine_VERSION($args);
+ $args->{NAME} =~ s/-/::/g;
+ if ( $self->tests ) {
+ $args->{test} = { TESTS => $self->tests };
+ }
+ if ($] >= 5.005) {
+ $args->{ABSTRACT} = $self->abstract;
+ $args->{AUTHOR} = $self->author;
+ }
+ if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+ $args->{NO_META} = 1;
+ }
+ if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ $args->{SIGN} = 1;
+ }
+ unless ( $self->is_admin ) {
+ delete $args->{SIGN};
+ }
+
+ # merge both kinds of requires into prereq_pm
+ my $prereq = ($args->{PREREQ_PM} ||= {});
+ %$prereq = ( %$prereq,
+ map { @$_ }
+ map { @$_ }
+ grep $_,
+ ($self->build_requires, $self->requires)
+ );
+
+ # merge both kinds of requires into prereq_pm
+ my $subdirs = ($args->{DIR} ||= []);
+ if ($self->bundles) {
+ foreach my $bundle (@{ $self->bundles }) {
+ my ($file, $dir) = @$bundle;
+ push @$subdirs, $dir if -d $dir;
+ delete $prereq->{$file};
+ }
+ }
+
+ if ( my $perl_version = $self->perl_version ) {
+ eval "use $perl_version; 1"
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
+ }
+
+ $args->{INSTALLDIRS} = $self->installdirs;
+
+ my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+ my $user_preop = delete $args{dist}->{PREOP};
+ if (my $preop = $self->admin->preop($user_preop)) {
+ $args{dist} = $preop;
+ }
- my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
- $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+ my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+ $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
}
sub fix_up_makefile {
- my $self = shift;
- my $makefile_name = shift;
- my $top_class = ref($self->_top) || '';
- my $top_version = $self->_top->VERSION || '';
-
- my $preamble = $self->preamble
- ? "# Preamble by $top_class $top_version\n"
- . $self->preamble
- : '';
- my $postamble = "# Postamble by $top_class $top_version\n"
- . ($self->postamble || '');
-
- local *MAKEFILE;
- open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
- my $makefile = do { local $/; <MAKEFILE> };
- close MAKEFILE or die $!;
-
- $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
- $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
- $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
- $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
- $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
-
- # Module::Install will never be used to build the Core Perl
- # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
- # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
- $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
- #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
-
- # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
- $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
-
- # XXX - This is currently unused; not sure if it breaks other MM-users
- # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
-
- open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
- print MAKEFILE "$preamble$makefile$postamble" or die $!;
- close MAKEFILE or die $!;
+ my $self = shift;
+ my $makefile_name = shift;
+ my $top_class = ref($self->_top) || '';
+ my $top_version = $self->_top->VERSION || '';
+
+ my $preamble = $self->preamble
+ ? "# Preamble by $top_class $top_version\n"
+ . $self->preamble
+ : '';
+ my $postamble = "# Postamble by $top_class $top_version\n"
+ . ($self->postamble || '');
+
+ local *MAKEFILE;
+ open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ my $makefile = do { local $/; <MAKEFILE> };
+ close MAKEFILE or die $!;
+
+ $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+ $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+ $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+ $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+ $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+ # Module::Install will never be used to build the Core Perl
+ # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+ # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+ $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+ #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+ # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+ $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+ # XXX - This is currently unused; not sure if it breaks other MM-users
+ # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+ open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ print MAKEFILE "$preamble$makefile$postamble" or die $!;
+ close MAKEFILE or die $!;
- 1;
+ 1;
}
sub preamble {
- my ($self, $text) = @_;
- $self->{preamble} = $text . $self->{preamble} if defined $text;
- $self->{preamble};
+ my ($self, $text) = @_;
+ $self->{preamble} = $text . $self->{preamble} if defined $text;
+ $self->{preamble};
}
sub postamble {
- my ($self, $text) = @_;
- $self->{postamble} ||= $self->admin->postamble;
- $self->{postamble} .= $text if defined $text;
- $self->{postamble}
+ my ($self, $text) = @_;
+ $self->{postamble} ||= $self->admin->postamble;
+ $self->{postamble} .= $text if defined $text;
+ $self->{postamble}
}
1;
__END__
-#line 334
+#line 363
Modified: Data-ICal/inc/Module/Install/Metadata.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Metadata.pm (original)
+++ Data-ICal/inc/Module/Install/Metadata.pm Mon Apr 7 09:11:56 2008
@@ -6,14 +6,14 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
my @scalar_keys = qw{
name module_name abstract author version license
- distribution_type perl_version tests
+ distribution_type perl_version tests installdirs
};
my @tuple_keys = qw{
@@ -56,9 +56,23 @@
};
}
+# configure_requires is currently a null-op
+sub configure_requires { 1 }
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires { shift->build_requires(@_) }
+sub install_requires { shift->build_requires(@_) }
+
+# Aliases for installdirs options
+sub install_as_core { $_[0]->installdirs('perl') }
+sub install_as_cpan { $_[0]->installdirs('site') }
+sub install_as_site { $_[0]->installdirs('site') }
+sub install_as_vendor { $_[0]->installdirs('vendor') }
+
sub sign {
my $self = shift;
- return $self->{'values'}{'sign'} if defined wantarray and !@_;
+ return $self->{'values'}{'sign'} if defined wantarray and ! @_;
$self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
return $self;
}
@@ -279,9 +293,11 @@
if (
$self->_slurp($file) =~ m/
- =head \d \s+
- (?:licen[cs]e|licensing|copyright|legal)\b
- (.*?)
+ (
+ =head \d \s+
+ (?:licen[cs]e|licensing|copyright|legal)\b
+ .*?
+ )
(=head\\d.*|=cut.*|)
\z
/ixms
@@ -289,19 +305,24 @@
{
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as perl itself' => 'perl',
- 'GNU public license' => 'gpl',
- 'GNU lesser public license' => 'gpl',
- 'BSD license' => 'bsd',
- 'Artistic license' => 'artistic',
- 'GPL' => 'gpl',
- 'LGPL' => 'lgpl',
- 'BSD' => 'bsd',
- 'Artistic' => 'artistic',
+ 'under the same (?:terms|license) as perl itself' => 'perl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser public license' => 'gpl', 1,
+ 'BSD license' => 'bsd', 1,
+ 'Artistic license' => 'artistic', 1,
+ 'GPL' => 'gpl', 1,
+ 'LGPL' => 'lgpl', 1,
+ 'BSD' => 'bsd', 1,
+ 'Artistic' => 'artistic', 1,
+ 'MIT' => 'mit', 1,
+ 'proprietary' => 'proprietary', 0,
);
- while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
+ while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
+ if ( $osi and $license_text =~ /All rights reserved/i ) {
+ warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+ }
$self->license($license);
return 1;
}
Modified: Data-ICal/inc/Module/Install/Win32.pm
==============================================================================
--- Data-ICal/inc/Module/Install/Win32.pm (original)
+++ Data-ICal/inc/Module/Install/Win32.pm Mon Apr 7 09:11:56 2008
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/inc/Module/Install/WriteAll.pm
==============================================================================
--- Data-ICal/inc/Module/Install/WriteAll.pm (original)
+++ Data-ICal/inc/Module/Install/WriteAll.pm Mon Apr 7 09:11:56 2008
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.68';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: Data-ICal/lib/Data/ICal.pm
==============================================================================
--- Data-ICal/lib/Data/ICal.pm (original)
+++ Data-ICal/lib/Data/ICal.pm Mon Apr 7 09:11:56 2008
@@ -8,7 +8,7 @@
use Text::vFile::asData;
-our $VERSION = '0.13';
+our $VERSION = '0.14';
use Carp;
Modified: Data-ICal/lib/Data/ICal/Property.pm
==============================================================================
--- Data-ICal/lib/Data/ICal/Property.pm (original)
+++ Data-ICal/lib/Data/ICal/Property.pm Mon Apr 7 09:11:56 2008
@@ -125,7 +125,7 @@
sub decoded_value {
my $self = shift;
my $value = $self->value;
- my $encoding = uc $self->parameters->{'ENCODING'};
+ my $encoding = uc($self->parameters->{'ENCODING'}||"");
if ($ENCODINGS{$encoding}) {
return $ENCODINGS{$encoding}{'decode'}->($value);
@@ -299,7 +299,7 @@
my $string = shift;
my $quoted_printable = $self->vcal10 &&
- uc $self->parameters->{'ENCODING'} eq 'QUOTED-PRINTABLE';
+ uc($self->parameters->{'ENCODING'}||'') eq 'QUOTED-PRINTABLE';
# We can't just use a s//g, because we need to include the added space/= and
# first character of the next line in the count for the next line.
More information about the Bps-public-commit
mailing list