Skip Menu |

This queue is for tickets about the Class-Load-XS CPAN distribution.

Report information
The Basics
Id: 114125
Status: new
Priority: 0/
Queue: Class-Load-XS

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

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



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