Subject: | Socket::MsgHdr breaks when loaded dynamically |
Date: | Sat, 15 Sep 2018 16:41:46 -0400 |
To: | bug-Socket-MsgHdr [...] rt.cpan.org |
From: | Felipe Gasper <felipe [...] felipegasper.com> |
Hello,
The latest Socket::MsgHdr fails to run for me when loaded dynamically:
perl -MModule::Load -e'require Socket::MsgHdr; my $m = Socket::MsgHdr->new( buf => "\0" );'
Can't locate object method "buf" via package "Socket::MsgHdr" at /usr/local/lib/x86_64-linux-gnu/perl/5.26.1/Socket/MsgHdr.pm line 87.
These are the contents of %Socket::MsgHdr:: when loaded dynamically:
$VAR1 = {
'flags' => *Socket::MsgHdr::flags,
'bootstrap' => *Socket::MsgHdr::bootstrap,
'unpack_cmsghdr' => *Socket::MsgHdr::unpack_cmsghdr,
'__ANON__' => *Socket::MsgHdr::__ANON__,
'VERSION' => *Socket::MsgHdr::VERSION,
'EXPORT_OK' => *Socket::MsgHdr::EXPORT_OK,
'INIT' => *Socket::MsgHdr::INIT,
'recvmsg' => *Socket::MsgHdr::recvmsg,
'pack_cmsghdr' => *Socket::MsgHdr::pack_cmsghdr,
'BEGIN' => *Socket::MsgHdr::BEGIN,
'EXPORT' => *Socket::MsgHdr::EXPORT,
'cmsghdr' => *Socket::MsgHdr::cmsghdr,
'import' => *Socket::MsgHdr::import,
'new' => *Socket::MsgHdr::new,
'sendmsg' => *Socket::MsgHdr::sendmsg
};
… and here is what it looks like when loaded at compile time:
$VAR1 = {
'buf' => *Socket::MsgHdr::buf,
'bootstrap' => *Socket::MsgHdr::bootstrap,
'__ANON__' => *Socket::MsgHdr::__ANON__,
'buflen' => *Socket::MsgHdr::buflen,
'cmsghdr' => *Socket::MsgHdr::cmsghdr,
'unpack_cmsghdr' => *Socket::MsgHdr::unpack_cmsghdr,
'controllen' => *Socket::MsgHdr::controllen,
'INIT' => *Socket::MsgHdr::INIT,
'flags' => *Socket::MsgHdr::flags,
'name' => *Socket::MsgHdr::name,
'VERSION' => *Socket::MsgHdr::VERSION,
'new' => *Socket::MsgHdr::new,
'EXPORT' => *Socket::MsgHdr::EXPORT,
'EXPORT_OK' => *Socket::MsgHdr::EXPORT_OK,
'import' => *Socket::MsgHdr::import,
'recvmsg' => *Socket::MsgHdr::recvmsg,
'pack_cmsghdr' => *Socket::MsgHdr::pack_cmsghdr,
'BEGIN' => *Socket::MsgHdr::BEGIN,
'namelen' => *Socket::MsgHdr::namelen,
'control' => *Socket::MsgHdr::control,
'sendmsg' => *Socket::MsgHdr::sendmsg
};