[Bps-public-commit] r11941 - in HTML-RewriteAttributes: . lib/HTML
sartak at bestpractical.com
sartak at bestpractical.com
Mon Apr 28 21:54:29 EDT 2008
Author: sartak
Date: Mon Apr 28 21:54:29 2008
New Revision: 11941
Modified:
HTML-RewriteAttributes/ (props changed)
HTML-RewriteAttributes/lib/HTML/RewriteAttributes.pm
HTML-RewriteAttributes/t/001-basic.t
Log:
r54625 at onn: sartak | 2008-04-28 21:48:57 -0400
Have a separate _rewrite method for when we have a real HTML::RewriteAttributes object
Modified: HTML-RewriteAttributes/lib/HTML/RewriteAttributes.pm
==============================================================================
--- HTML-RewriteAttributes/lib/HTML/RewriteAttributes.pm (original)
+++ HTML-RewriteAttributes/lib/HTML/RewriteAttributes.pm Mon Apr 28 21:54:29 2008
@@ -19,7 +19,11 @@
sub rewrite {
my $self = shift;
$self = $self->new if !ref($self);
+ $self->_rewrite(@_);
+}
+sub _rewrite {
+ my $self = shift;
my $html = shift;
my $cb = shift || sub { $self->rewrite_resource(@_) };
Modified: HTML-RewriteAttributes/t/001-basic.t
==============================================================================
--- HTML-RewriteAttributes/t/001-basic.t (original)
+++ HTML-RewriteAttributes/t/001-basic.t Mon Apr 28 21:54:29 2008
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use HTML::RewriteAttributes::Resources;
+use HTML::RewriteAttributes;
use Test::More tests => 2;
my $html = << "END";
More information about the Bps-public-commit
mailing list