Skip Menu |

This queue is for tickets about the IO-Socket-Socks CPAN distribution.

Report information
The Basics
Id: 118522
Status: resolved
Priority: 0/
Queue: IO-Socket-Socks

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: IO::Socket::IP dependency?
On a few of my smokers the test suite fails: ... Can't locate object method "new" via package "IO::Socket::IP" (perhaps you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 255 just after 19. ...
Чтв Окт 27 14:22:49 2016, SREZIC писал: Show quoted text
> On a few of my smokers the test suite fails: > > ... > Can't locate object method "new" via package "IO::Socket::IP" (perhaps > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > # Tests were run but no plan was declared and done_testing() was not > seen. > # Looks like your test exited with 255 just after 19. > ...
This is very strange. On line 177 class for new method getted via $SOCKET_CLASS variable from IO::Socket::Socks namespace: https://metacpan.org/source/OLEG/IO-Socket-Socks-0.71/t/03_connect.t#L177 And if this variable equals IO::Socket::IP this means that IO::Socket::IP loaded successfully: https://metacpan.org/source/OLEG/IO-Socket-Socks-0.71/lib/IO/Socket/Socks.pm#L24 Can you debug a little why this happens? I can't replicate it here.
On 2016-10-27 14:46:19, OLEG wrote: Show quoted text
> Чтв Окт 27 14:22:49 2016, SREZIC писал:
> > On a few of my smokers the test suite fails: > > > > ... > > Can't locate object method "new" via package "IO::Socket::IP" > > (perhaps > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > > # Tests were run but no plan was declared and done_testing() was not > > seen. > > # Looks like your test exited with 255 just after 19. > > ...
> > This is very strange. On line 177 class for new method getted via > $SOCKET_CLASS variable from IO::Socket::Socks namespace: > https://metacpan.org/source/OLEG/IO-Socket-Socks- > 0.71/t/03_connect.t#L177 > And if this variable equals IO::Socket::IP this means that > IO::Socket::IP loaded successfully: > https://metacpan.org/source/OLEG/IO-Socket-Socks- > 0.71/lib/IO/Socket/Socks.pm#L24 > Can you debug a little why this happens? I can't replicate it here.
The test fails only for two perls on my smokers: freebsd9.2 with perl 5.14.4 and debian/jessie with perl 5.14.4. Both have IO::Socket::IP installed with these versions: * freebsd9.2: 0.37 * linux: 0.38 I added some debugging statements into the test: --- a/t/03_connect.t +++ b/t/03_connect.t @@ -174,6 +174,10 @@ if (ok($sock, "socks object created from plain socket")) { is(fileno($sock), fileno($unconnected_sock), "socks object uses plain socket"); } +warn $IO::Socket::Socks::SOCKET_CLASS; +warn join("\n", map { "$_ => $INC{$_}" } sort keys %INC); +warn defined &IO::Socket::IP::new; +use Data::Dumper; $Data::Dumper::Deparse=1; warn Dumper(\&IO::Socket::IP::new); $sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, PeerPort => $s_port); if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => $h_host, ConnectPort => $h_port); And it seems that IO::Socket::IP is really loaded: ... ok 18 - socks object created from plain socket ok 19 - socks object uses plain socket IO::Socket::IP at t/03_connect.t line 177. ... IO/Socket.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket.pm IO/Socket/INET.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket/INET.pm IO/Socket/IP.pm => /opt/perl-5.14.4/lib/site_perl/5.14.4/IO/Socket/IP.pm IO/Socket/Socks.pm => /tmpfs/.cpan-build-cpansand/2016102718/IO-Socket-Socks-0.71-0/blib/lib/IO/Socket/Socks.pm IO/Socket/UNIX.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket/UNIX.pm ... 1 at t/03_connect.t line 179. $VAR1 = sub { package IO::Socket::IP; use warnings; use strict 'refs'; my $class = shift(); my(%arg) = @_ == 1 ? ('PeerHost', $_[0]) : @_; return $class->SUPER::new(%arg); }; Can't locate object method "new" via package "IO::Socket::IP" (perhaps you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 181. Very strange...
Чтв Окт 27 15:01:57 2016, SREZIC писал: Show quoted text
> On 2016-10-27 14:46:19, OLEG wrote:
> > Чтв Окт 27 14:22:49 2016, SREZIC писал:
> > > On a few of my smokers the test suite fails: > > > > > > ... > > > Can't locate object method "new" via package "IO::Socket::IP" > > > (perhaps > > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > > > # Tests were run but no plan was declared and done_testing() was > > > not > > > seen. > > > # Looks like your test exited with 255 just after 19. > > > ...
> > > > This is very strange. On line 177 class for new method getted via > > $SOCKET_CLASS variable from IO::Socket::Socks namespace: > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > 0.71/t/03_connect.t#L177 > > And if this variable equals IO::Socket::IP this means that > > IO::Socket::IP loaded successfully: > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > 0.71/lib/IO/Socket/Socks.pm#L24 > > Can you debug a little why this happens? I can't replicate it here.
> > The test fails only for two perls on my smokers: freebsd9.2 with perl > 5.14.4 and debian/jessie with perl 5.14.4. Both have IO::Socket::IP > installed with these versions: > * freebsd9.2: 0.37 > * linux: 0.38 > > I added some debugging statements into the test: > > --- a/t/03_connect.t > +++ b/t/03_connect.t > @@ -174,6 +174,10 @@ if (ok($sock, "socks object created from plain > socket")) { > is(fileno($sock), fileno($unconnected_sock), "socks object > uses plain socket"); > } > > +warn $IO::Socket::Socks::SOCKET_CLASS; > +warn join("\n", map { "$_ => $INC{$_}" } sort keys %INC); > +warn defined &IO::Socket::IP::new; > +use Data::Dumper; $Data::Dumper::Deparse=1; warn > Dumper(\&IO::Socket::IP::new); > $sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, > PeerPort => $s_port); > if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { > $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => > $h_host, ConnectPort => $h_port); > > > And it seems that IO::Socket::IP is really loaded: > > ... > ok 18 - socks object created from plain socket > ok 19 - socks object uses plain socket > IO::Socket::IP at t/03_connect.t line 177. > ... > IO/Socket.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket.pm > IO/Socket/INET.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > linux/IO/Socket/INET.pm > IO/Socket/IP.pm => /opt/perl- > 5.14.4/lib/site_perl/5.14.4/IO/Socket/IP.pm > IO/Socket/Socks.pm => /tmpfs/.cpan-build-cpansand/2016102718/IO- > Socket-Socks-0.71-0/blib/lib/IO/Socket/Socks.pm > IO/Socket/UNIX.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > linux/IO/Socket/UNIX.pm > ... > 1 at t/03_connect.t line 179. > $VAR1 = sub { > package IO::Socket::IP; > use warnings; > use strict 'refs'; > my $class = shift(); > my(%arg) = @_ == 1 ? ('PeerHost', $_[0]) : @_; > return $class->SUPER::new(%arg); > }; > Can't locate object method "new" via package "IO::Socket::IP" (perhaps > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 181. > > > Very strange...
Before last release I made this change (line 177): https://github.com/olegwtf/p5-IO-Socket-Socks/commit/2d3bf6e65056aa260e3c60536612f53e999313c6#diff-c8c5e83ca36bbecb943a22b63f262bdeL176 I was surprised why I put variable inside commas. May be this is why it was inside commas :) Can you test it?
On 2016-10-28 13:43:39, OLEG wrote: Show quoted text
> Чтв Окт 27 15:01:57 2016, SREZIC писал:
> > On 2016-10-27 14:46:19, OLEG wrote:
> > > Чтв Окт 27 14:22:49 2016, SREZIC писал:
> > > > On a few of my smokers the test suite fails: > > > > > > > > ... > > > > Can't locate object method "new" via package "IO::Socket::IP" > > > > (perhaps > > > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > > > > # Tests were run but no plan was declared and done_testing() was > > > > not > > > > seen. > > > > # Looks like your test exited with 255 just after 19. > > > > ...
> > > > > > This is very strange. On line 177 class for new method getted via > > > $SOCKET_CLASS variable from IO::Socket::Socks namespace: > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > 0.71/t/03_connect.t#L177 > > > And if this variable equals IO::Socket::IP this means that > > > IO::Socket::IP loaded successfully: > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > 0.71/lib/IO/Socket/Socks.pm#L24 > > > Can you debug a little why this happens? I can't replicate it here.
> > > > The test fails only for two perls on my smokers: freebsd9.2 with perl > > 5.14.4 and debian/jessie with perl 5.14.4. Both have IO::Socket::IP > > installed with these versions: > > * freebsd9.2: 0.37 > > * linux: 0.38 > > > > I added some debugging statements into the test: > > > > --- a/t/03_connect.t > > +++ b/t/03_connect.t > > @@ -174,6 +174,10 @@ if (ok($sock, "socks object created from plain > > socket")) { > > is(fileno($sock), fileno($unconnected_sock), "socks object > > uses plain socket"); > > } > > > > +warn $IO::Socket::Socks::SOCKET_CLASS; > > +warn join("\n", map { "$_ => $INC{$_}" } sort keys %INC); > > +warn defined &IO::Socket::IP::new; > > +use Data::Dumper; $Data::Dumper::Deparse=1; warn > > Dumper(\&IO::Socket::IP::new); > > $sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, > > PeerPort => $s_port); > > if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { > > $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => > > $h_host, ConnectPort => $h_port); > > > > > > And it seems that IO::Socket::IP is really loaded: > > > > ... > > ok 18 - socks object created from plain socket > > ok 19 - socks object uses plain socket > > IO::Socket::IP at t/03_connect.t line 177. > > ... > > IO/Socket.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket.pm > > IO/Socket/INET.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > linux/IO/Socket/INET.pm > > IO/Socket/IP.pm => /opt/perl- > > 5.14.4/lib/site_perl/5.14.4/IO/Socket/IP.pm > > IO/Socket/Socks.pm => /tmpfs/.cpan-build-cpansand/2016102718/IO- > > Socket-Socks-0.71-0/blib/lib/IO/Socket/Socks.pm > > IO/Socket/UNIX.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > linux/IO/Socket/UNIX.pm > > ... > > 1 at t/03_connect.t line 179. > > $VAR1 = sub { > > package IO::Socket::IP; > > use warnings; > > use strict 'refs'; > > my $class = shift(); > > my(%arg) = @_ == 1 ? ('PeerHost', $_[0]) : @_; > > return $class->SUPER::new(%arg); > > }; > > Can't locate object method "new" via package "IO::Socket::IP" > > (perhaps > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 181. > > > > > > Very strange...
> > > Before last release I made this change (line 177): > https://github.com/olegwtf/p5-IO-Socket- > Socks/commit/2d3bf6e65056aa260e3c60536612f53e999313c6#diff- > c8c5e83ca36bbecb943a22b63f262bdeL176 > I was surprised why I put variable inside commas. May be this is why > it was inside commas :) > Can you test it?
OK, so I did this change: --- a/t/03_connect.t +++ b/t/03_connect.t @@ -174,7 +174,7 @@ if (ok($sock, "socks object created from plain socket")) { is(fileno($sock), fileno($unconnected_sock), "socks object uses plain socket"); } -$sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, PeerPort => $s_port); +$sock = "$IO::Socket::Socks::SOCKET_CLASS"->new(PeerAddr => $s_host, PeerPort => $s_port); if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => $h_host, ConnectPort => $h_port); ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket upgraded to IO::Socket::Socks"); ... and it passes with perl 5.14.4.
Птн Окт 28 13:43:39 2016, OLEG писал: Show quoted text
> Чтв Окт 27 15:01:57 2016, SREZIC писал:
> > On 2016-10-27 14:46:19, OLEG wrote:
> > > Чтв Окт 27 14:22:49 2016, SREZIC писал:
> > > > On a few of my smokers the test suite fails: > > > > > > > > ... > > > > Can't locate object method "new" via package "IO::Socket::IP" > > > > (perhaps > > > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > > > > # Tests were run but no plan was declared and done_testing() was > > > > not > > > > seen. > > > > # Looks like your test exited with 255 just after 19. > > > > ...
> > > > > > This is very strange. On line 177 class for new method getted via > > > $SOCKET_CLASS variable from IO::Socket::Socks namespace: > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > 0.71/t/03_connect.t#L177 > > > And if this variable equals IO::Socket::IP this means that > > > IO::Socket::IP loaded successfully: > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > 0.71/lib/IO/Socket/Socks.pm#L24 > > > Can you debug a little why this happens? I can't replicate it here.
> > > > The test fails only for two perls on my smokers: freebsd9.2 with perl > > 5.14.4 and debian/jessie with perl 5.14.4. Both have IO::Socket::IP > > installed with these versions: > > * freebsd9.2: 0.37 > > * linux: 0.38 > > > > I added some debugging statements into the test: > > > > --- a/t/03_connect.t > > +++ b/t/03_connect.t > > @@ -174,6 +174,10 @@ if (ok($sock, "socks object created from plain > > socket")) { > > is(fileno($sock), fileno($unconnected_sock), "socks object > > uses plain socket"); > > } > > > > +warn $IO::Socket::Socks::SOCKET_CLASS; > > +warn join("\n", map { "$_ => $INC{$_}" } sort keys %INC); > > +warn defined &IO::Socket::IP::new; > > +use Data::Dumper; $Data::Dumper::Deparse=1; warn > > Dumper(\&IO::Socket::IP::new); > > $sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, > > PeerPort => $s_port); > > if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { > > $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => > > $h_host, ConnectPort => $h_port); > > > > > > And it seems that IO::Socket::IP is really loaded: > > > > ... > > ok 18 - socks object created from plain socket > > ok 19 - socks object uses plain socket > > IO::Socket::IP at t/03_connect.t line 177. > > ... > > IO/Socket.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64-linux/IO/Socket.pm > > IO/Socket/INET.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > linux/IO/Socket/INET.pm > > IO/Socket/IP.pm => /opt/perl- > > 5.14.4/lib/site_perl/5.14.4/IO/Socket/IP.pm > > IO/Socket/Socks.pm => /tmpfs/.cpan-build-cpansand/2016102718/IO- > > Socket-Socks-0.71-0/blib/lib/IO/Socket/Socks.pm > > IO/Socket/UNIX.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > linux/IO/Socket/UNIX.pm > > ... > > 1 at t/03_connect.t line 179. > > $VAR1 = sub { > > package IO::Socket::IP; > > use warnings; > > use strict 'refs'; > > my $class = shift(); > > my(%arg) = @_ == 1 ? ('PeerHost', $_[0]) : @_; > > return $class->SUPER::new(%arg); > > }; > > Can't locate object method "new" via package "IO::Socket::IP" > > (perhaps > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 181. > > > > > > Very strange...
> > > Before last release I made this change (line 177): > https://github.com/olegwtf/p5-IO-Socket- > Socks/commit/2d3bf6e65056aa260e3c60536612f53e999313c6#diff- > c8c5e83ca36bbecb943a22b63f262bdeL176 > I was surprised why I put variable inside commas. May be this is why > it was inside commas :) > Can you test it?
s/commas/quotes/g
Птн Окт 28 13:48:52 2016, SREZIC писал: Show quoted text
> On 2016-10-28 13:43:39, OLEG wrote:
> > Чтв Окт 27 15:01:57 2016, SREZIC писал:
> > > On 2016-10-27 14:46:19, OLEG wrote:
> > > > Чтв Окт 27 14:22:49 2016, SREZIC писал:
> > > > > On a few of my smokers the test suite fails: > > > > > > > > > > ... > > > > > Can't locate object method "new" via package "IO::Socket::IP" > > > > > (perhaps > > > > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line > > > > > 177. > > > > > # Tests were run but no plan was declared and done_testing() > > > > > was > > > > > not > > > > > seen. > > > > > # Looks like your test exited with 255 just after 19. > > > > > ...
> > > > > > > > This is very strange. On line 177 class for new method getted via > > > > $SOCKET_CLASS variable from IO::Socket::Socks namespace: > > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > > 0.71/t/03_connect.t#L177 > > > > And if this variable equals IO::Socket::IP this means that > > > > IO::Socket::IP loaded successfully: > > > > https://metacpan.org/source/OLEG/IO-Socket-Socks- > > > > 0.71/lib/IO/Socket/Socks.pm#L24 > > > > Can you debug a little why this happens? I can't replicate it > > > > here.
> > > > > > The test fails only for two perls on my smokers: freebsd9.2 with > > > perl > > > 5.14.4 and debian/jessie with perl 5.14.4. Both have IO::Socket::IP > > > installed with these versions: > > > * freebsd9.2: 0.37 > > > * linux: 0.38 > > > > > > I added some debugging statements into the test: > > > > > > --- a/t/03_connect.t > > > +++ b/t/03_connect.t > > > @@ -174,6 +174,10 @@ if (ok($sock, "socks object created from plain > > > socket")) { > > > is(fileno($sock), fileno($unconnected_sock), "socks object > > > uses plain socket"); > > > } > > > > > > +warn $IO::Socket::Socks::SOCKET_CLASS; > > > +warn join("\n", map { "$_ => $INC{$_}" } sort keys %INC); > > > +warn defined &IO::Socket::IP::new; > > > +use Data::Dumper; $Data::Dumper::Deparse=1; warn > > > Dumper(\&IO::Socket::IP::new); > > > $sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, > > > PeerPort => $s_port); > > > if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) > > > { > > > $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr > > > => > > > $h_host, ConnectPort => $h_port); > > > > > > > > > And it seems that IO::Socket::IP is really loaded: > > > > > > ... > > > ok 18 - socks object created from plain socket > > > ok 19 - socks object uses plain socket > > > IO::Socket::IP at t/03_connect.t line 177. > > > ... > > > IO/Socket.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > > linux/IO/Socket.pm > > > IO/Socket/INET.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > > linux/IO/Socket/INET.pm > > > IO/Socket/IP.pm => /opt/perl- > > > 5.14.4/lib/site_perl/5.14.4/IO/Socket/IP.pm > > > IO/Socket/Socks.pm => /tmpfs/.cpan-build-cpansand/2016102718/IO- > > > Socket-Socks-0.71-0/blib/lib/IO/Socket/Socks.pm > > > IO/Socket/UNIX.pm => /opt/perl-5.14.4/lib/5.14.4/x86_64- > > > linux/IO/Socket/UNIX.pm > > > ... > > > 1 at t/03_connect.t line 179. > > > $VAR1 = sub { > > > package IO::Socket::IP; > > > use warnings; > > > use strict 'refs'; > > > my $class = shift(); > > > my(%arg) = @_ == 1 ? ('PeerHost', $_[0]) : @_; > > > return $class->SUPER::new(%arg); > > > }; > > > Can't locate object method "new" via package "IO::Socket::IP" > > > (perhaps > > > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 181. > > > > > > > > > Very strange...
> > > > > > Before last release I made this change (line 177): > > https://github.com/olegwtf/p5-IO-Socket- > > Socks/commit/2d3bf6e65056aa260e3c60536612f53e999313c6#diff- > > c8c5e83ca36bbecb943a22b63f262bdeL176 > > I was surprised why I put variable inside commas. May be this is why > > it was inside commas :) > > Can you test it?
> > OK, so I did this change: > > --- a/t/03_connect.t > +++ b/t/03_connect.t > @@ -174,7 +174,7 @@ if (ok($sock, "socks object created from plain > socket")) { > is(fileno($sock), fileno($unconnected_sock), "socks object > uses plain socket"); > } > > -$sock = $IO::Socket::Socks::SOCKET_CLASS->new(PeerAddr => $s_host, > PeerPort => $s_port); > +$sock = "$IO::Socket::Socks::SOCKET_CLASS"->new(PeerAddr => $s_host, > PeerPort => $s_port); > if (ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket created")) { > $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => > $h_host, ConnectPort => $h_port); > ok($sock, "$IO::Socket::Socks::SOCKET_CLASS socket upgraded to > IO::Socket::Socks"); > > > ... and it passes with perl 5.14.4.
Cool, thanks :D
Чтв Окт 27 14:22:49 2016, SREZIC писал: Show quoted text
> On a few of my smokers the test suite fails: > > ... > Can't locate object method "new" via package "IO::Socket::IP" (perhaps > you forgot to load "IO::Socket::IP"?) at t/03_connect.t line 177. > # Tests were run but no plan was declared and done_testing() was not > seen. > # Looks like your test exited with 255 just after 19. > ...
Fixed in 0.72.