Skip to content

share dir not returned when require module is in an eval  #12

@shawnlaffan

Description

@shawnlaffan

It seems that, when a module is loaded using require within an eval, any associated share dirs are not listed.

scandeps -x -e 'eval qq{require Inline::C}' | grep 'auto/share'

When run as a normal require they are found.

scandeps.pl -x -e 'require Inline::C' -V | grep 'auto/share'
# auto/share/dist/Inline-C/inline-c.pgx [data]

The upshot is that PAR::Packer is missing components when run with code using eval'd requires.

I have not been able to isolate where in Module::ScanDeps this should be corrected. However these two commands produce the same results so it should not be the data being fed to the scandeps processing code:

perl -e "eval {require Inline::C}; print join qq{\n}, sort keys %INC"
perl -e "require Inline::C; print join qq{\n}, sort keys %INC"

This is more generally a problem for packing Aliens such as Alien::freexl and Alien::spatialite. These are called from Alien::gdal in this way as they are not essential and so not always installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions