Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Don't Repeat Your version number

by tinita (Parson)
on Jul 21, 2006 at 15:12 UTC ( #562883=note: print w/ replies, xml ) Need Help??

in reply to Donít Repeat YourÖ version number

i also thought about that, and in the past i have tried several techniques. i found that it all seems to be too much work. i'm now using:

my $version_pod = <<'=cut'; =pod =head1 NAME Foo.:Bar - blah =head1 VERSION $VERSION = "0.71" =cut our $VERSION = "0.71"; ... sub __test_version { my $v = __PACKAGE__->VERSION; return 1 if $version_pod =~ m/VERSION.*\Q$v/; return; }
and then i have a test that calls the __test_version() method.
this way i have to type the version twice, but hey, that's ok. the point is, i can't forget it as my testsuite would fail.

additionally, Test::Pod fails with your hack. =)

Comment on Re: Don't Repeat Your version number
Download Code
Replies are listed 'Best First'.
Re^2: Don't Repeat Your version number
by Aristotle (Chancellor) on Jul 21, 2006 at 22:01 UTC

    Thatís a nice idea. Complete automation would be better, but if the computer traps forgetfulness, thatís almost as good.

    Makeshifts last the longest.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://562883]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-11-30 19:45 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (778 votes), past polls