[Jifty-commit] jifty branch, master, updated. 231120479cb803e10680ebfc95f62c9bd6edf12d

Jifty commits jifty-commit at lists.jifty.org
Fri Apr 2 13:49:57 EDT 2010


The branch, master has been updated
       via  231120479cb803e10680ebfc95f62c9bd6edf12d (commit)
      from  0cf9e37b9358fd938d248401575bc700042f8c1f (commit)

Summary of changes:
 lib/Jifty/Client.pm             |   21 ---------------------
 lib/Jifty/Test/WWW/Mechanize.pm |   21 ---------------------
 2 files changed, 0 insertions(+), 42 deletions(-)

- Log -----------------------------------------------------------------
commit 231120479cb803e10680ebfc95f62c9bd6edf12d
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Apr 2 13:49:18 2010 -0400

    Kill some uses of LexWrap
    
        These hooks were added to walk around DTD fetching so that Jifty
        could be tested offline. But they are no longer needed.

diff --git a/lib/Jifty/Client.pm b/lib/Jifty/Client.pm
index 5fb1c76..7f21411 100644
--- a/lib/Jifty/Client.pm
+++ b/lib/Jifty/Client.pm
@@ -9,7 +9,6 @@ delete $ENV{'http_proxy'}; # Otherwise WWW::Mechanize tries to go through your H
 use Jifty::YAML;
 use HTTP::Cookies;
 use XML::XPath;
-use Hook::LexWrap;
 use List::Util qw(first);
 use Carp;
 
@@ -250,26 +249,6 @@ sub fragment_request {
     return $content;
 }
 
-
-# When it sees something like
-# http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd as a DOCTYPE, this will make
-# it open static/dtd/xhtml1-strict.dtd instead -- great for offline hacking!
- 
-# This "require" is just to give us something to hook on to, and to prevent a
-# future require from taking effect.
-require 'XML/Parser/LWPExternEnt.pl';
-wrap 'XML::Parser::lwp_ext_ent_handler', pre => sub {
-    my $root = Jifty::Util->share_root;
-    $_[2] =~ s{ \A .+ / ([^/]+) \z }{$root/dtd/$1}xms;
-    open my $fh, '<', $_[2] or die "can't open $_[2]: $!";
-    my $content = do {local $/; <$fh>};
-    close $fh;
-    $_[-1] = $content; # override return value
-};
-wrap 'XML::Parser::lwp_ext_ent_cleanup', pre => sub {
-    $_[-1] = 1; # just return please
-};
-
 =head2 field_error_text MONIKER, FIELD
 
 Finds the error span on the current page for the name FIELD in the
diff --git a/lib/Jifty/Test/WWW/Mechanize.pm b/lib/Jifty/Test/WWW/Mechanize.pm
index e1480a2..c0ebd5d 100644
--- a/lib/Jifty/Test/WWW/Mechanize.pm
+++ b/lib/Jifty/Test/WWW/Mechanize.pm
@@ -12,7 +12,6 @@ use HTML::Lint;
 use Test::HTML::Lint qw();
 use HTTP::Cookies;
 use XML::XPath;
-use Hook::LexWrap;
 use List::Util qw(first);
 use Plack::Test;
 use Carp;
@@ -338,26 +337,6 @@ sub fragment_request {
     return $content;
 }
 
-
-# When it sees something like
-# http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd as a DOCTYPE, this will make
-# it open static/dtd/xhtml1-strict.dtd instead -- great for offline hacking!
- 
-# This "require" is just to give us something to hook on to, and to prevent a
-# future require from taking effect.
-require 'XML/Parser/LWPExternEnt.pl';
-wrap 'XML::Parser::lwp_ext_ent_handler', pre => sub {
-    my $root = Jifty::Util->share_root;
-    $_[2] =~ s{ \A .+ / ([^/]+) \z }{$root/dtd/$1}xms;
-    open my $fh, '<', $_[2] or die "can't open $_[2]: $!";
-    my $content = do {local $/; <$fh>};
-    close $fh;
-    $_[-1] = $content; # override return value
-};
-wrap 'XML::Parser::lwp_ext_ent_cleanup', pre => sub {
-    $_[-1] = 1; # just return please
-};
-
 =head2 field_error_text MONIKER, FIELD
 
 Finds the error span on the current page for the name FIELD in the

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list