develooper Front page | perl.perl5.porters | Postings from March 2014

[perl #121512] .pmc not loaded if @INC has a trailing slash

Thread Next
From:
Michael G Schwern
Date:
March 26, 2014 22:23
Subject:
[perl #121512] .pmc not loaded if @INC has a trailing slash
Message ID:
rt-4.0.18-22947-1395872585-1011.121512-75-0@perl.org
# New Ticket Created by  Michael G Schwern 
# Please include the string:  [perl #121512]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=121512 >


This is a bug report for perl from schwern@pobox.com,
generated with the help of perlbug 1.39 running under perl 5.18.2.


-----------------------------------------------------------------
[Please describe your issue here]

If the @INC directory where a .pm and .pmc are located has a trailing
slash, require will fail to load the .pmc.  I suspect this bug was
added in eb70bb4a400e88a66c7e10414a2d52b5da4cfd1f

$ pwd
/Users/schwern/tmp

$ perl -I ~/tmp -wle 'use Foo;  print Foo::test()'
pmc

$ perl -I ~/tmp/ -wle 'use Foo;  print Foo::test()'
pm

$ cat Foo.pm
package Foo;

sub test { "pm" }

=pod

=head1 NAME

Foo - this is the pm

=cut

1;

$ cat Foo.pmc
package Foo;

sub test { "pmc" }

=pod

=head1 NAME

Foo - this is the pmc

=cut

1;

This bug appears in...
5.18.1
5.18.2
5.19.10

This bug does not appear in...
5.10.1
5.12.5
5.14.4
5.16.3


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl 5.18.2:

Configured by schwern at Thu Mar  6 14:40:23 PST 2014.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:

  Platform:
    osname=darwin, osvers=13.1.0, archname=darwin-2level
    uname='darwin windhund.local 13.1.0 darwin kernel version 13.1.0:
thu jan 16 19:40:37 pst 2014; root:xnu-2422.90.20~2release_x86_64 x86_64
i386 macbookpro8,1 darwin '
    config_args='-de
-Dprefix=/Users/schwern/perl5/perlbrew/perls/perl-5.18.2
-Aeval:scriptdir=/Users/schwern/perl5/perlbrew/perls/perl-5.18.2/bin'
    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='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing
-pipe -fstack-protector -I/opt/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe
-fstack-protector -I/opt/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple LLVM 5.0
(clang-500.2.79)', 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='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/opt/local/lib'
    libpth=/opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/opt/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.18.2:

/Users/schwern/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/darwin-2level
    /Users/schwern/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2
    /Users/schwern/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/darwin-2level
    /Users/schwern/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2
    .

---
Environment for perl 5.18.2:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/schwern
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=/Users/schwern/perl5/perlbrew/bin:/Users/schwern/perl5/perlbrew/perls/perl-5.18.2/bin:/Users/schwern/bin:/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin
    PERLBREW_BASHRC_VERSION=0.67
    PERLBREW_HOME=/Users/schwern/.perlbrew
    PERLBREW_MANPATH=/Users/schwern/perl5/perlbrew/perls/perl-5.18.2/man

PERLBREW_PATH=/Users/schwern/perl5/perlbrew/bin:/Users/schwern/perl5/perlbrew/perls/perl-5.18.2/bin
    PERLBREW_PERL=perl-5.18.2
    PERLBREW_ROOT=/Users/schwern/perl5/perlbrew
    PERLBREW_VERSION=0.67
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About