On Fri, Jul 13, 2001 at 02:35:37AM -0700, der.hans wrote:
> Am 13. Jul, 2001 schwäzte will trillich so:
> 
> > how can i do that with
> >     # perl
> >     $VERSION = '$some-magic-CVS-incantation$';
> 
> OK, you've got single-quotes here again. You'll need those or $Revision
> becomes a variable to perl.

good point. that's what i actually use--

> I do:
> 
> $version = '# $Revision: 1.2 $';

AHA. checking "ExtUtils::MM_Unix.pm" i find the parse_version
subroutine* which does a linear scan for the FIRST line that
matches the regex, EVEN IF IT'S A COMMENT--

so i moved my code to the top where the first four lines are
exactly:

        package Something::Or::Other;
        use strict;
        use vars qw( @ISA $VERSION );
        $VERSION = ('$Revision: 1.2.3.4.5.6.7.8.9 $' =~ m/Revision: 
(\d+\.\S+)/)[0];

previously i'd had

        # much commentary followed by:
        # $VERSION = "something useless that didn't work"
        $VERSION = ('..' =~ //)[0];
        # and more gunk here

and of course parse_version STOPPED at the comment containing
$VERSION, because it matched the regex. grr!

works much better, now...

--

* and typical of the software mr. gates's deems "viral", open
  source allows me to determine the cause of the problem, and
  its solution, on my own -- if only i'm persistent enough.

  no wonder he's frightened.

-- 
DEBIAN NEWBIE TIP #12 from Will Trillich <[EMAIL PROTECTED]> 
:
Where is the DOCUMENTATION? It's all over the place... and there's
lots of it. Much was written for non-debian distributions, and
much was written long, long ago. But try these anyhow: on your
own system, try "man" and "info" and "apropos", and also look
under /usr/share/doc/<package>* ... Online, there's linuxdoc.org,
debianhelp.org, and debian.org/doc/ of course.  Also try
http://newbiedoc.sourceforge.net/general/index-deb-help-sys.html
and
        apt-get install dhelp

Also see http://newbieDoc.sourceForge.net/ ...

Reply via email to