In the setup I have there is a small Perl distro with the specific libraries needed, mostly homemade modules and such, plus libraries like INET and INET6. This is to allow the code to run with default installs of Perl, and pull additional libraries as needed from the distro, this has worked fine in the past. I added Socket6.pm to the distro to support the INET6.pm which I needed to get my server script to make an IPv6 server, when I a perl -c on the program I get:
Can't locate object method "bootstrap" via package "Socket6" (perhaps you forgot to load "Socket6"?) at C:/work/newdummy/../Perl/IO/Socket/Socket6.pm line 289. Compilation failed in require at C:/work/newdummy/../Perl/IO/Socket/INET6.pm line 18. BEGIN failed--compilation aborted at C:/work/newdummy/../Perl/IO/Socket/INET6.pm line 18. Compilation failed in require at dummyserver.pl line 22. BEGIN failed--compilation aborted at dummyserver.pl line 22.
The Paths in this are correct, I haven't hit AutoLoader stuff much in the past, and I have always been able to add pm files to the right locations in our distro and have no issues. This one is weird, and like others in the past I copied the source from CPAN and placed it in the package location in IO/Socket, I can't seem to find more about the error though. I've converted the paths in the modules without success, considered maybe the paths needed to be all the same but only the package IO::Socket::Socket6 path was required, the rest of the module refers only to use Socket6 and the bootstrap Socket6 $VERSION line. The only way I have been able to get past this was to remove the line:
bootstrap Socket6 $VERSION;
from the Socket6.pm file, but doing that generates a loop in:
sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { if ($! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } else { my ($pack,$file,$line) = caller; croak "Your vendor has not defined Socket macro $constname, us +ed"; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; }
on the lines:
my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0);
which infinitely loops until it takes all the free memory on the machine.
I can't find anything that's really helpful with this, or why I am getting the error only for this library. Been looking into AutoLoader and from what I can tell everything seems to be correct.
Has anyone hit this and gotten past the error at all?
Thanks
In reply to can't locate object method bootstrap by gokuraku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |