The code is an example of how to use UNIVERSAL::VERSION(). This is a snippet from the upcoming PDF::Template v0.07.
$self->{PDF_VERSION} = 0; for my $version (reverse 1 .. 4) { eval "UNIVERSAL::VERSION('pdflib_pl', $version.0)"; unless ($@) { $self->{PDF_VERSION} = $version; last; } } die "Cannot find pdflib_pl version",$/ unless $self->{PDF_VERSION};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Figuring out which version of a loaded module
by xmath (Hermit) on Feb 26, 2003 at 15:30 UTC | |
by dragonchild (Archbishop) on Feb 26, 2003 at 15:54 UTC | |
by xmath (Hermit) on Feb 26, 2003 at 16:11 UTC |