From: Dave Rolsky Date: Tue, 28 Dec 2010 16:20:08 +0000 (-0500) Subject: Clean up various bits of code that broke when dzil processed them. X-Git-Tag: 1.9900~3^2~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c1bf11e2960c376afb5edfb2615d6de21dc379b;p=gitmo%2FMoose.git Clean up various bits of code that broke when dzil processed them. --- diff --git a/lib/Class/MOP/Module.pm b/lib/Class/MOP/Module.pm index 4d66366..4142dfc 100644 --- a/lib/Class/MOP/Module.pm +++ b/lib/Class/MOP/Module.pm @@ -16,9 +16,11 @@ sub _new { my $params = @_ == 1 ? $_[0] : {@_}; return bless { + # Need to quote package to avoid a problem with PPI mis-parsing this + # as a package statement. # from Class::MOP::Package - package => $params->{package}, + 'package' => $params->{package}, namespace => \undef, # attributes diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index a327928..f24f9d2 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -65,7 +65,9 @@ sub _new { my $params = @_ == 1 ? $_[0] : {@_}; return bless { - package => $params->{package}, + # Need to quote package to avoid a problem with PPI mis-parsing this + # as a package statement. + 'package' => $params->{package}, # NOTE: # because of issues with the Perl API diff --git a/lib/Moose/Error/Confess.pm b/lib/Moose/Error/Confess.pm index 6b7c952..eaf6120 100644 --- a/lib/Moose/Error/Confess.pm +++ b/lib/Moose/Error/Confess.pm @@ -10,7 +10,7 @@ sub new { $self->create_error_confess(@args); } -__PACKAGE__ +1; # ABSTRACT: Prefer C diff --git a/lib/Moose/Error/Croak.pm b/lib/Moose/Error/Croak.pm index 3d30ffa..0c8b04c 100644 --- a/lib/Moose/Error/Croak.pm +++ b/lib/Moose/Error/Croak.pm @@ -10,7 +10,7 @@ sub new { $self->create_error_croak(@args); } -__PACKAGE__ +1; # ABSTRACT: Prefer C diff --git a/lib/Moose/Error/Default.pm b/lib/Moose/Error/Default.pm index c07c626..47c0024 100644 --- a/lib/Moose/Error/Default.pm +++ b/lib/Moose/Error/Default.pm @@ -46,7 +46,7 @@ sub _create_error_carpmess { } } -__PACKAGE__ +1; # ABSTRACT: L based error generation for Moose.