Skip Menu |
 

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 33842
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: at [...] altlinux.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Protocol/file.pm: postpone load of URI::Escape and HTML::Entities
Date: Thu, 6 Mar 2008 08:58:27 +0300
To: bug-libwww-perl [...] rt.cpan.org
From: Alexey Tourbin <at [...] altlinux.ru>
Download (untitled) / with headers
text/plain 1012b
I noticed that, when running XML::Parser test suite (external_ent.t), suddenly HTML::Parser gets loaded along with LWP stuff. Since the code that uses HTML::* thing is conditional (directory listing), it is good idea to postpone the load of extra modules. After this change, XML::Parser test suite does not need HTML::Parser any longer. --- lib/LWP/Protocol/file.pm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/LWP/Protocol/file.pm b/lib/LWP/Protocol/file.pm index 5261cca..137a2a1 100644 --- a/lib/LWP/Protocol/file.pm +++ b/lib/LWP/Protocol/file.pm @@ -14,10 +14,6 @@ require HTTP::Response; require HTTP::Status; require HTTP::Date; -require URI::Escape; -require HTML::Entities; - - sub request { @@ -96,6 +92,8 @@ sub request closedir(D); # Make directory listing + require URI::Escape; + require HTML::Entities; my $pathe = $path . ( $^O eq 'MacOS' ? ':' : '/'); for (@files) { my $furl = URI::Escape::uri_escape($_); -- 1.5.3.8.GIT
Applied.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.