[Bps-public-commit] r11953 - in HTML-RewriteAttributes: lib/HTML/RewriteAttributes

sartak at bestpractical.com sartak at bestpractical.com
Tue Apr 29 16:04:02 EDT 2008


Author: sartak
Date: Tue Apr 29 16:04:00 2008
New Revision: 11953

Modified:
   HTML-RewriteAttributes/   (props changed)
   HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Links.pm
   HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm

Log:
 r54634 at onn:  sartak | 2008-04-29 16:03:41 -0400
 Fix the argument unpacking in Links' callback


Modified: HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Links.pm
==============================================================================
--- HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Links.pm	(original)
+++ HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Links.pm	Tue Apr 29 16:04:00 2008
@@ -26,7 +26,8 @@
     $self->{rewrite_link_base} = $base;
 
     my $cb = sub {
-        my $uri = URI->new(shift);
+        my ($tag, $attr, $value) = @_;
+        my $uri = URI->new($value);
 
         $uri = $uri->abs($self->{rewrite_link_base})
             unless defined $uri->scheme;

Modified: HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm
==============================================================================
--- HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm	(original)
+++ HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm	Tue Apr 29 16:04:00 2008
@@ -16,9 +16,7 @@
 );
 
 sub _should_rewrite {
-    my $self = shift;
-    my $tag  = shift;
-    my $attr = shift;
+    my ($self, $tag, $attr) = @_;
 
     return ( $rewritable_attrs{$tag} || {} )->{$attr};
 }



More information about the Bps-public-commit mailing list