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};
In reply to Figuring out which version of a loaded module by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |