[Jifty-commit] r3228 - in Template-Declare: lib/Template

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri May 11 18:15:31 EDT 2007


Author: jesse
Date: Fri May 11 18:15:31 2007
New Revision: 3228

Modified:
   Template-Declare/   (props changed)
   Template-Declare/lib/Template/Declare.pm

Log:
 r56786 at pinglin:  jesse | 2007-05-11 18:15:20 -0400
  * make the import and alias method be extra-slash agnostic


Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm	(original)
+++ Template-Declare/lib/Template/Declare.pm	Fri May 11 18:15:31 2007
@@ -220,6 +220,10 @@
     my $prepend_path     = shift;
     my $package_vars = shift;
 
+
+    $prepend_path =~ s|/+/|/|g;
+    $prepend_path =~ s|/$||;
+
     my $alias_key = $mixin . " ".$prepend_path;
     push @{$alias_into->aliases()}, $alias_key;
     $alias_into->alias_metadata()->{$alias_key} =  { class=> $mixin, path => $prepend_path, package_vars => $package_vars };
@@ -242,6 +246,8 @@
     my $import_from_base = shift;
     my $prepend_path     = shift;
 
+    $prepend_path =~ s|/+/|/|g;
+    $prepend_path =~ s|/$||;
     $import_from_base->imported_into($prepend_path);
 
     my @packages;


More information about the Jifty-commit mailing list