In order to debug my perl code I need to find out what version of mod_perl
is installed.
How do I find out the version of mod_perl
I have installed?
VERSION is a UNIVERSAL method of all Perl classes. You can use it to get the module version (if it has been set which it usually has). Here is a one liner where you only have to add the module name once: perl -le 'eval "require $ARGV " and print $ARGV ->VERSION' Some::Module
confirms that you have mod_perl installed and its version is 1.21. However, just because you have got mod_perl linked in there, that does not mean that you have configured your server to handle Perl scripts with mod_perl. You will find configuration assistance at ModPerlConfiguration
You can use $PERL_VERSION or $^V too as the revision, version, and subversion of the Perl interpreter, represented as a “version” object. This variable first appeared in perl version 5.6.0; earlier versions of perl will see an undefined value.
If your web hosting provider don’t provide access to a shell, use the following perl program to find out perl version: #!/usr/bin/perl # Available under BSD License.
Try:
perl -Mmod_perl\ 999
If that doesn't work, try:
perl -Mmod_perl2\ 999
The first checks for mod_perl, version 999. Since that doesn't exist, it will output the actual version you have installed or an error saying it can't be found in the @INC. The second does the same thing, but for mod_perl2.
Example output for me:
> perl -Mmod_perl2\ 999
mod_perl2 version 999 required--this is only version 2.000005. BEGIN failed--compilation aborted.
In general:
perl -Mmod_perl -E 'say $mod_perl::VERSION'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With