[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-porters
Subject: [perl #36435] File::Basename::dirname() incorrectly handles /foo/bar/
From: "schwern () windhund ! schwern ! org (via RT)" <perlbug-followup () perl ! org>
Date: 2005-06-30 7:14:49
Message-ID: rt-3.0.11-36435-116400.3.86064327559531 () perl ! org
[Download RAW message or body]
# New Ticket Created by schwern@windhund.schwern.org
# Please include the string: [perl #36435]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36435 >
This is a bug report for perl from schwern@windhund.schwern.org,
generated with the help of perlbug 1.35 running under perl v5.8.6.
-----------------------------------------------------------------
[Please enter your report here]
use File::Basename;
print dirname "/var/local/";
I would expect "/var/local/". Instead you get "/var". Normally on Unix
you can't tell the difference between /foo/dir and /foo/file but the trailing
slash disambiguates. File::Spec gets this right.
use File::Spec;
($vol, $dirs, $file) = File::Spec->splitpath("/var/local/");
print $dirs;
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=medium
---
Site configuration information for perl v5.8.6:
Configured by schwern at Tue May 10 16:13:13 PDT 2005.
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=darwin, osvers=7.9.0, archname=darwin-thread-multi-2level
uname='darwin windhund.schwern.org 7.9.0 darwin kernel version 7.9.0: wed mar 30 \
20:11:17 pst 2005; root:xnuxnu-517.12.7.obj~1release_ppc power macintosh powerpc ' \
config_args='-des -Dcc=gcc-3.3 -Dcpp=gcc-3.3 -E -Dprefix=/sw -Dvendorprefix=/sw \
-Dccflags=-I/sw/include -Dldflags=-L/sw/lib -Dperladmin=none -Uinstallusrbinperl \
-Dprivlib=/sw/lib/perl5-core/5.8.6 -Dman3dir=/sw/lib/perl5-core/5.8.6/man/man3 \
-Dman3ext=3pm -Dvendorlib=/sw/lib/perl5/5.8.6 \
-Dvendorman3dir=/sw/lib/perl5/5.8.6/man/man3 -Duseithreads -Dinc_version_list=5.8.1 \
5.8.0 5.6.0 -Adefine:startperl=#!/sw/bin/perl5.8.6 -Dotherlibdirs=/Library/Perl' \
hint=recommended, useposix=true, d_sigaction=define usethreads=define \
use5005threads=undef useithreads=define usemultiplicity=define useperlio=define \
d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef \
uselongdouble=undef usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc-3.3', ccflags ='-I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp \
-fno-strict-aliasing -pipe', optimize='-Os',
cppflags='-no-cpp-precomp -I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp \
-fno-strict-aliasing -pipe' ccversion='', gccversion='3.3 20030304 (Apple Computer, \
Inc. build 1671)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, \
byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, 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 ='-L/sw/lib -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lc
perllibs=-ldl -lm -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-L/sw/lib -bundle -undefined dynamic_lookup \
-L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.6:
/sw/lib/perl5/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/5.8.6
/sw/lib/perl5/5.8.1
/sw/lib/perl5
/sw/lib/perl5/darwin
/sw/lib/perl5-core/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5-core/5.8.6
/sw/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/site_perl/5.8.6
/sw/lib/perl5/site_perl
/sw/lib/perl5/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/5.8.6
/sw/lib/perl5/5.8.1
/sw/lib/perl5
/Library/Perl/5.8.1
/Library/Perl
.
---
Environment for perl v5.8.6:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/schwern
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/schwern/bin:/usr/local/bin:/Users/schwern/bin:/usr/local/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/schwern:/usr/X11R6/bin:.:.
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
PERL_BADLANG (unset)
SHELL=/bin/bash
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic