On 2006-04-23, at 02:49:14 -0700, Yitzchak Scott-Thoennes wrote:

> On Sun, Apr 23, 2006 at 11:34:12AM +0200, Marcus Holland-Moritz wrote:
> > On 2006-04-23, at 02:26:54 -0700, Yitzchak Scott-Thoennes wrote:
> > 
> > > On Sun, Apr 23, 2006 at 11:01:17AM +0200, Marcus Holland-Moritz wrote:
> > > > The only thing worth mentioning is that with perl 5.003,
> > > > the following happens:
> > > > 
> > > >   [EMAIL PROTECTED] $ perl5.003 Makefile.PL                          
> > > >   Can't locate ExtUtils/Command.pm in @INC at Makefile.PL line 4.
> > > >   BEGIN failed--compilation aborted at Makefile.PL line 4.
> > > 
> > > Yes, run-time "require VERSION" is almost always the wrong thing to do.
> > > 
> > > > I'd suggest the following change:
> > > > 
> > > > --- Makefile.PL.orig    2006-04-23 10:58:31.000000000 +0200
> > > > +++ Makefile.PL 2006-04-23 10:58:50.000000000 +0200
> > > > @@ -1,4 +1,4 @@
> > > > -require 5.004_05;
> > > > +BEGIN { require 5.004_05 }
> > > 
> > > "use 5.004_05;" would be better.
> > 
> > No, it wouldn't.
> > 
> >   [EMAIL PROTECTED] $ head -n 5 Makefile.PL
> >   use 5.004_05;
> >   
> >   use ExtUtils::MakeMaker;
> >   use ExtUtils::Command qw( touch rm_f );
> >   
> >   [EMAIL PROTECTED] $ perl5.003 Makefile.PL 
> >   syntax error at Makefile.PL line 1, near "use 5.004_05"
> >   Execution of Makefile.PL aborted due to compilation errors.
> 
> Which version is this?

It's 5.003.

  Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
    Platform:
      osname=linux, osver=2.6.15.1, archname=i686-linux
      uname='linux gandalf 2.6.15.1 #2 preempt mon feb 6 22:08:36 met 2006 i686 
intel(r) pentium(r) 4 cpu 1.80ghz genuineintel gnulinux '
      hint=recommended, useposix=true, d_sigaction=define
    Compiler:
      cc='cc', optimize='-O2', gccversion=3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, 
pie-8.7.8)
      cppflags='-Dbool=char -DHAS_BOOL'
      ccflags ='-Dbool=char -DHAS_BOOL'
      stdchar='char', d_stdstdio=, usevfork=false
      voidflags=15, castflags=0, d_casti32=define, d_castneg=define
      intsize=4, alignbytes=4, usemymalloc=n, randbits=31
    Linker and Libraries:
      ld='cc', ldflags =' -L/usr/local/lib'
      libpth=/usr/local/lib /lib /usr/lib
      libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt
      libc=/lib/libc.so.6, so=so
    Dynamic Linking:
      dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags='-rdynamic'
      cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
  
  @INC: /tmp/perl/install/default/perl5.003/lib/i686-linux/5.003 
/tmp/perl/install/default/perl5.003/lib 
/tmp/perl/install/default/perl5.003/lib/site_perl/i686-linux 
/tmp/perl/install/default/perl5.003/lib/site_perl .

> perlfunc for perl 5.003_07 claims use VERSION works.

perlfunc for 5.003 doesn't mention it:

       use Module LIST
       use Module
               Imports some semantics into the current package from the named
               module, generally by aliasing certain subroutine or variable
               names into your package.  It is exactly equivalent to

                   BEGIN { require Module; import Module LIST; }

               The BEGIN forces the require and import to happen at compile
               time.  The require makes sure the module is loaded into memory
               if it hasn't been yet.  The import is not a builtin--it's just
               an ordinary static method call into the "Module" package to
               tell the module to import the list of features back into the
               current package.  The module can implement its import method
               any way it likes, though most modules just choose to derive
               their import method via inheritance from the Exporter class
               that is defined in the Exporter module. See Exporter.

               If you don't want your namespace altered, explicitly supply an
               empty list:

                   use Module ();

               That is exactly equivalent to

                   BEGIN { require Module; }

               Because this is a wide-open interface, pragmas (compiler direc-
               tives) are also implemented this way.  Currently implemented
               pragmas are:

                   use integer;
                   use diagnostics;
                   use sigtrap qw(SEGV BUS);
                   use strict  qw(subs vars refs);
                   use subs    qw(afunc blurfl);

               These pseudomodules import semantics into the current block
               scope, unlike ordinary modules, which import symbols into the
               current package (which are effective through the end of the
               file).

               There's a corresponding "no" command that unimports meanings
               imported by use.

                   no integer;
                   no strict 'refs';

               See perlmod for a list of standard modules and pragmas.

Marcus

-- 
If I had only known, I would have been a locksmith.
                -- Albert Einstein

Reply via email to