develooper Front page | perl.perl5.porters | Postings from February 2004

Arrgh! revised proposed (backwards-compatible) VERSION stub

Thread Previous
david nicol
February 4, 2004 22:31
Arrgh! revised proposed (backwards-compatible) VERSION stub
Message ID:

We should leave in the UNIVERSAL::VERSION functionality of course.
If everyone did this, a new, improved C<use> that was aware of
multiple installed versions could eval each one's VERSION method
and install the first one that lives

# Uncomment and edit when version incompatibilities are introduced:
# sub VERSION{
# 	$_[1] < 2.3 and die <<EOF;
# version 2.3 and later releases of Foo::Bar take an
# array-reference as the eighth argument to baz()
#	$_[1] > $VERSION and die <<EOF;
# asking for Foo::Bar version $_[1] and this is only $VERSION
# };

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About