Subject: | is_class_loaded fails to detect Sub::Util is not fully loaded |
With Class::Load::XS 0.09 and Sub::Util 1.45 (from Scalar-List-Util 1.45):
$ perl -MClass::Load -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say "Sub::Util"->VERSION'
1
$ perl -MSub::Util -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say "Sub::Util"->VERSION'
1
1.45
In both cases is_class_loaded says the class is loaded, but $VERSION is defined only in the second case.
I suspect this is because the XS parts of List::Util which is loaded by some dependency of Class::Load.
$ perl -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say $INC{"Sub/Util.pm"}; say for keys %{"Sub::Util::"}'
1
set_prototype
subname
set_subname
$ perl -MSub::Util -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say $INC{"Sub/Util.pm"}; say for keys %{"Sub::Util::"}'
1
/home/omengue/.plenv/versions/5.10.1/lib/perl5/5.10.1/x86_64-linux/Sub/Util.pm
set_prototype
EXPORT
set_subname
EXPORT_OK
import
ISA
subname
BEGIN
VERSION
prototype
This bug causes action at distance: "dzil listdeps --missing" doesn't work properly for Sub::Util.
--
Olivier Mengué - http://perlresume.org/DOLMEN
$ perl -MClass::Load -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say "Sub::Util"->VERSION'
1
$ perl -MSub::Util -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say "Sub::Util"->VERSION'
1
1.45
In both cases is_class_loaded says the class is loaded, but $VERSION is defined only in the second case.
I suspect this is because the XS parts of List::Util which is loaded by some dependency of Class::Load.
$ perl -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say $INC{"Sub/Util.pm"}; say for keys %{"Sub::Util::"}'
1
set_prototype
subname
set_subname
$ perl -MSub::Util -MClass::Load::XS -E 'say Class::Load::XS::is_class_loaded("Sub::Util"); say $INC{"Sub/Util.pm"}; say for keys %{"Sub::Util::"}'
1
/home/omengue/.plenv/versions/5.10.1/lib/perl5/5.10.1/x86_64-linux/Sub/Util.pm
set_prototype
EXPORT
set_subname
EXPORT_OK
import
ISA
subname
BEGIN
VERSION
prototype
This bug causes action at distance: "dzil listdeps --missing" doesn't work properly for Sub::Util.
--
Olivier Mengué - http://perlresume.org/DOLMEN