in reply to Re: Re: Figuring out which version of a loaded module
in thread Figuring out which version of a loaded module
So your exact script could be reduced to:
$self->{PDF_VERSION} = int pdflib_pl->VERSION or die "Cannot find pdflib_pl version\n"; $self->{PDF_VERSION} = 4 if $self->{PDF_VERSION} > 4;
•Update: OK, correction, if $pdflib_pl::VERSION is a v-string it messes up, but I have never seen a module that uses that (none of the core modules are, nor are the tons of other modules installed on my computer).
In fact, perldoc perlmodlib and perlmodstyle actually says explicitly $VERSION should be a floating-point number.
|
|---|