Skip to content

share dir not returned for constructs like eval qq{$pkg_name} #13

@shawnlaffan

Description

@shawnlaffan

This is a follow on from #12 except this time the package name is in a variable so static scanning will not detect it. I assume the logic associated with the -x flag needs to be updated.

This is using scandeps.pl from ea35db3

This finds the share dir:

scandeps.pl -x -e 'eval qq{require Inline::C}' -V | grep 'Inline'
# Inline.pm [module]
# Inline/C.pm [module]
# Inline/C/Parser/RecDescent.pm [module]
# Inline/MakeMaker.pm [module]
# Inline/denter.pm [module]
# auto/share/dist/Inline-C/inline-c.pgx [data]
'Inline'                        => '0', #    ? # Inline::C
'Inline::C'                     => '0', #    ? # hr2HuoGwt7
'Inline::C::Parser::RecDescent' => '0', #    ? # Inline::C
'Inline::MakeMaker'             => '0', #    ? # Inline
'Inline::denter'                => '0', #    ? # Inline
'Parse::RecDescent'             => '0', #    ? # Inline::C::Parser::RecDescent

This does not find the share dir, and is also missing several other components (the same differences as in #12):

scandeps.pl -x -e 'my $pkg = "Inline::C"; eval qq{require $pkg}' -V | grep 'Inline'
# Inline.pm [module]
# Inline/C.pm [module]
# Inline/denter.pm [module]
'Inline'         => '0', #    ? #
'Inline::C'      => '0', #    ? #
'Inline::denter' => '0', #    ? #

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