Skip Menu |
 

This queue is for tickets about the IO-All-LWP CPAN distribution.

Report information
The Basics
Id: 20315
Status: resolved
Priority: 0/
Queue: IO-All-LWP

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

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



Subject: PATCH: get rid of Spiffy dependency
Download (untitled) / with headers
text/plain 164b
IO::All has removed the dependency on Spiffy - the attached patch fixes this also in IO::All::LWP. The tests succeed, hope that I did everything correctly. -Marek
Subject: IO-All-LWP.diff
Download IO-All-LWP.diff
text/x-diff 3.8k
diff -ruN IO-All-LWP-0.12/lib/IO/All/FTP.pm IO-All-LWP-0.12p1/lib/IO/All/FTP.pm --- IO-All-LWP-0.12/lib/IO/All/FTP.pm 2004-11-02 17:14:26.000000000 +0100 +++ IO-All-LWP-0.12p1/lib/IO/All/FTP.pm 2006-07-06 09:16:51.363296000 +0200 @@ -2,11 +2,11 @@ use strict; use warnings; our $VERSION = '0.12'; -use IO::All::LWP '-Base'; +use IO::All::LWP '-base'; const type => 'ftp'; -sub ftp { $self->lwp_init(__PACKAGE__, @_) } +sub ftp { my $self=shift; $self->lwp_init(__PACKAGE__, @_) } 1; diff -ruN IO-All-LWP-0.12/lib/IO/All/Gopher.pm IO-All-LWP-0.12p1/lib/IO/All/Gopher.pm --- IO-All-LWP-0.12/lib/IO/All/Gopher.pm 2004-11-02 17:14:26.000000000 +0100 +++ IO-All-LWP-0.12p1/lib/IO/All/Gopher.pm 2006-07-06 09:18:34.382146000 +0200 @@ -2,11 +2,11 @@ use strict; use warnings; our $VERSION = '0.12'; -use IO::All::LWP '-Base'; +use IO::All::LWP '-base'; const type => 'gopher'; -sub gopher { $self->lwp_init(__PACKAGE__, @_) } +sub gopher { my $self=shift;$self->lwp_init(__PACKAGE__, @_) } 1; diff -ruN IO-All-LWP-0.12/lib/IO/All/HTTP.pm IO-All-LWP-0.12p1/lib/IO/All/HTTP.pm --- IO-All-LWP-0.12/lib/IO/All/HTTP.pm 2004-11-02 17:14:26.000000000 +0100 +++ IO-All-LWP-0.12p1/lib/IO/All/HTTP.pm 2006-07-06 09:16:03.193068000 +0200 @@ -2,14 +2,14 @@ use strict; use warnings; our $VERSION = '0.12'; -use IO::All::LWP '-Base'; +use IO::All::LWP '-base'; use URI::http; use URI::_userpass; push @URI::http::ISA, 'URI::_userpass'; const type => 'http'; -sub http { $self->lwp_init(__PACKAGE__, @_) } +sub http { my $self=shift; $self->lwp_init(__PACKAGE__, @_) } 1; diff -ruN IO-All-LWP-0.12/lib/IO/All/HTTPS.pm IO-All-LWP-0.12p1/lib/IO/All/HTTPS.pm --- IO-All-LWP-0.12/lib/IO/All/HTTPS.pm 2004-11-02 17:14:26.000000000 +0100 +++ IO-All-LWP-0.12p1/lib/IO/All/HTTPS.pm 2006-07-06 09:19:06.977544000 +0200 @@ -2,11 +2,11 @@ use strict; use warnings; our $VERSION = '0.12'; -use IO::All::HTTP '-Base'; +use IO::All::HTTP '-base'; const type => 'https'; -sub https { $self->lwp_init(__PACKAGE__, @_) } +sub https { my $self=shift;$self->lwp_init(__PACKAGE__, @_) } 1; diff -ruN IO-All-LWP-0.12/lib/IO/All/LWP.pm IO-All-LWP-0.12p1/lib/IO/All/LWP.pm --- IO-All-LWP-0.12/lib/IO/All/LWP.pm 2004-11-02 17:14:26.000000000 +0100 +++ IO-All-LWP-0.12p1/lib/IO/All/LWP.pm 2006-07-06 09:14:39.710668000 +0200 @@ -3,7 +3,7 @@ use strict; use warnings; our $VERSION = '0.12'; -use IO::All 0.30 '-Base'; +use IO::All 0.30 '-base'; use LWP::UserAgent; use IO::Handle; @@ -14,12 +14,13 @@ field 'put_content'; sub lwp_init { - bless $self, shift; + bless my $self, shift; $self->name(shift) if @_; return $self->_init; } sub ua { + my $self = shift; if (@_) { *$self->{ua} = ref($_[0]) ? shift : LWP::UserAgent->new(@_); @@ -30,6 +31,7 @@ } sub uri { + my $self = shift; *$self->{uri} = ref($_[0]) ? shift : URI->new(shift) if @_; return *$self->{uri} @@ -38,21 +40,25 @@ } sub user { + my $self = shift; $self->uri->user(@_); return $self; } sub password { + my $self = shift; $self->uri->password(@_); return $self; } sub get { + my $self = shift; my $request = shift || HTTP::Request->new('GET', $self->uri); $self->request($request); } sub put { + my $self = shift; my $request = (@_ and ref $_[0]) ? $_[0] : do { @@ -64,10 +70,12 @@ } sub request { + my $self = shift; $self->response($self->ua->request(shift)); } sub open { + my $self = shift; $self->is_open(1); my $mode = @_ ? shift : $self->mode ? $self->mode : '<'; $self->mode($mode); @@ -85,11 +93,12 @@ } sub close { + my $self = shift; if ($self->is_open and defined $self->mode and $self->mode eq '>') { $self->content(${$self->put_content}); $self->put; } - super; + $self->SUPER::close; } 1;
Applied the patch and uploaded version 0.13. Thanks and sorry for the absurd delay. Cheers, Ivan


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.