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

Arrgh! revised proposed (backwards-compatible) VERSION stub

Thread Previous
From:
david nicol
Date:
February 4, 2004 22:31
Subject:
Arrgh! revised proposed (backwards-compatible) VERSION stub
Message ID:
1075962606.1046.103.camel@plaza.davidnicol.com

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()
# EOF
#	$_[1] > $VERSION and die <<EOF;
# asking for Foo::Bar version $_[1] and this is only $VERSION
# EOF
# };
	



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