develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #34339][PATCH] "perldoc lib" doesn't describe actualbehavior of "use lib"

Thread Previous
From:
H.Merijn Brand
Date:
June 26, 2008 02:26
Subject:
Re: [perl #34339][PATCH] "perldoc lib" doesn't describe actualbehavior of "use lib"
Message ID:
20080626112538.2a211d01@pc09.procura.nl
On Thu, 26 Jun 2008 08:54:04 +0200, "Rafael Garcia-Suarez"
<rgarciasuarez@gmail.com> wrote:

> 2008/6/25 H.Merijn Brand <h.m.brand@xs4all.nl>:
> > On Wed, 25 Jun 2008 16:40:57 +0200, Renée Bäcker
> > <renee.baecker@smart-websolutions.de> wrote:
> >
> > Attached is a patch for lib_pm.PL
> >
> > I would shorten that a bit to
> >
> > --- lib_pm.PL.orig      2008-06-25 13:58:11.000000000 +0200
> > +++ lib_pm.PL   2008-06-25 13:57:11.000000000 +0200
> > @@ -223,11 +223,17 @@
> >  checks to see if a directory called $dir/$archname/auto exists.
> >  If so the $dir/$archname directory is assumed to be a corresponding
> >  architecture specific directory and is added to @INC in front of $dir.
> > +lib.pm also checks if directories called $dir/$version and
> > +$dir/$version/$archname exist and adds these directories to @INC.
> >
> > -The current value of C<$archname> can be found with this command:
> > +The current values of C<$version> and C<$archname> can be found with
> > +this command:
> >
> > -    perl -V:archname
> > +    perl -V:version\|archname
> 
> This syntax (\|) is probably not very portable across command-line
> interfaces, though.

but I found it a bit verbose to repeat the same command line twice with
just another variable. Besides that, I also think it is worth promoting
the lesser widespread knowledge that -V: takes a perl regex.  What does
the documentation for 'perl -e' use?

	perl -V:'version|archname'

Which won't work on windows or

	perl "-V:version|archname"

which might break elsewhere  (though for this pattern, I see no obvious
breakage, I tried *nix (tcsh & bash), Strawberry and Cygwin).

-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous


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