[Jifty-commit] r2833 - in Template-Declare: inc/Module/Install lib/Template

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Feb 23 17:30:09 EST 2007


Author: jesse
Date: Fri Feb 23 17:30:09 2007
New Revision: 2833

Modified:
   Template-Declare/   (props changed)
   Template-Declare/inc/Module/Install/Makefile.pm
   Template-Declare/inc/Module/Install/Metadata.pm
   Template-Declare/lib/Template/Declare.pm

Log:
 r48504 at 233:  jesse | 2007-02-23 17:24:34 -0500
 * Better warnings when invalid things get shoved in your Template::Declare root list


Modified: Template-Declare/inc/Module/Install/Makefile.pm
==============================================================================
--- Template-Declare/inc/Module/Install/Makefile.pm	(original)
+++ Template-Declare/inc/Module/Install/Makefile.pm	Fri Feb 23 17:30:09 2007
@@ -137,10 +137,8 @@
     }
 
     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;
+    if ($self->admin->preop) {
+        $args{dist} = $self->admin->preop;
     }
 
     my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -207,4 +205,4 @@
 
 __END__
 
-#line 336
+#line 334

Modified: Template-Declare/inc/Module/Install/Metadata.pm
==============================================================================
--- Template-Declare/inc/Module/Install/Metadata.pm	(original)
+++ Template-Declare/inc/Module/Install/Metadata.pm	Fri Feb 23 17:30:09 2007
@@ -279,11 +279,9 @@
 
     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
@@ -300,7 +298,6 @@
             'LGPL'                                            => 'lgpl',
             'BSD'                                             => 'bsd',
             'Artistic'                                        => 'artistic',
-            'MIT'                                             => 'MIT',
         );
         while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
             $pattern =~ s{\s+}{\\s+}g;

Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm	(original)
+++ Template-Declare/lib/Template/Declare.pm	Fri Feb 23 17:30:09 2007
@@ -319,6 +319,11 @@
     my $show_private  = shift || 0;
 
     foreach my $package ( reverse @{ Template::Declare->roots } ) {
+        unless ($package and $package->isa('Template::Declare')) {
+            warn "'@{[$package||'']} was listed as a Template::Declare root, but is not a Template::Declare subclass";
+            next;
+        }
+
         if ( my $coderef = $package->has_template( $template_name, $show_private ) ) {
             return $coderef;
         }


More information about the Jifty-commit mailing list