Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtUtils::Installed: _module_name cannot cope with modern package syntax #14042

Open
p5pRT opened this issue Aug 23, 2014 · 4 comments
Open

ExtUtils::Installed: _module_name cannot cope with modern package syntax #14042

p5pRT opened this issue Aug 23, 2014 · 4 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Aug 23, 2014

Migrated from rt.perl.org#122596 (status was 'open')

Searchable as RT122596$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 23, 2014

From @eserte

Created by @eserte

_module_name() in ExtUtils​::Installed looks like it cannot parse
the new "package NAME BLOCK" or "package NAME VERSION BLOCK"
syntaxes​:

$ /opt/perl-5.18.2/bin/perl -MData​::Dumper -MExtUtils​::Installed -e 'ExtUtils​::Installed​::_module_name(shift, shift)' /opt/perl-5.18.2/lib/site_perl/5.18.2/CPAN/Test/Dummy/Perl5/PackageWithBlock.pm CPAN​::Test​::Dummy​::Perl5​::PackageWithBlock
Couldn't figure out the package name for /opt/perl-5.18.2/lib/site_perl/5.18.2/CPAN/Test/Dummy/Perl5/PackageWithBlock.pm

(_module_name is only used on VMS systems, so on normal Unix
installations this problem is never encountered)

Perl Info

Flags:
    category=library
    severity=low
    module=ExtUtils::Installed

Site configuration information for perl 5.18.2:

Configured by eserte at Tue Jan  7 22:26:16 CET 2014.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
   
  Platform:
    osname=freebsd, osvers=9.2-release, archname=amd64-freebsd
    uname='freebsd cvrsnica.herceg.de 9.2-release freebsd 9.2-release #0 r255898: thu sep 26 22:50:31 utc 2013 root@bake.isc.freebsd.org:usrobjusrsrcsysgeneric amd64 '
    config_args='-D useshrplib=true -Dprefix=/usr/perl5.18.2 -Dusemymalloc=n -D cc=ccache cc -Dgccansipedantic -de'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O2 -pipe',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ccache cc', ldflags ='-Wl,-E  -fstack-protector -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/perl5.18.2/lib/5.18.2/amd64-freebsd/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib -fstack-protector'

Locally applied patches:
    


@INC for perl 5.18.2:
    /usr/perl5.18.2/lib/site_perl/5.18.2/amd64-freebsd
    /usr/perl5.18.2/lib/site_perl/5.18.2
    /usr/perl5.18.2/lib/5.18.2/amd64-freebsd
    /usr/perl5.18.2/lib/5.18.2
    .


Environment for perl 5.18.2:
    HOME=/home/e/eserte
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=de_DE.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/e/eserte/bin/freebsd9.1:/home/e/eserte/bin/sh:/home/e/eserte/bin:/usr/games:/home/e/eserte/devel
    PERLDOC=-MPod::Perldoc::ToTextOverstrike
    PERL_BADLANG (unset)
    PERL_HTML_DISPLAY_CLASS=HTML::Display::Mozilla
    SHELL=/usr/local/bin/zsh

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 23, 2014

From @karenetheridge

_module_name() in ExtUtils​::Installed looks like it cannot parse
the new "package NAME BLOCK" or "package NAME VERSION BLOCK"
syntaxes.

It should probably be letting Module​::Metadata do that parsing for it.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 23, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 14, 2014

From @jkeenan

On Sat Aug 23 10​:18​:33 2014, ether wrote​:

_module_name() in ExtUtils​::Installed looks like it cannot parse
the new "package NAME BLOCK" or "package NAME VERSION BLOCK"
syntaxes.

It should probably be letting Module​::Metadata do that parsing for it.

If I hack up cpan/ExtUtils-Install/lib/ExtUtils/Installed.pm with debugging code​:

#####
108 foreach my $dir (@​{$self->{'​:private​:'}{INC}}) {
109 my $p = File​::Spec->catfile($dir, $modfile);
110 if (-r $p) {
111 print STDERR "AAA​: p​: $p\n";
112 print STDERR "BBB​: module​: $module\n";
113 $module = _module_name($p, $module) if $Is_VMS;
#####

... the output I get from ./perl -Ilib cpan/ExtUtils-Install/t/Installed.t includes this​:

#####
AAA​: p​: /home/jkeenan/perl5/lib/perl5/x86_64-linux/DateTime.pm
BBB​: module​: DateTime
AAA​: p​: /home/jkeenan/perl5/lib/perl5/Algorithm/Diff.pm
BBB​: module​: Algorithm​::Diff
#####

So, given inputs $p and $module, how would we use Module​::Metadata to substitute for _module_name() in the VMS case?

I don't have access to VMS, but would like to toss a patch to the VMS folks.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant