-
-
28 Dec 2006 06:02:49 UTC
- Distribution: ModPerl-VersionUtil
- Module version: 0.03
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (1 / 0 / 0)
- Kwalitee
Bus factor: 0- 90.70% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (2.52KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Class::Data::Inheritable
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
ModPerl::VersionUtil - Makes it easier to investigate your mod_perl version.
SYNOPSIS
use ModPerl::VersionUtil; if (ModPerl::VersionUtil->is_mp) { print "It's running under mod_perl."; print "mod_perl version: " . ModPerl::VersionUtil->mp_version_string; } if (ModPerl::VersionUtil->is_mp2) { require Apache2 (); require Apache2::RequestRec(); require Apache2::RequestIO (); } elsif (ModPerl::VersionUtil->is_mp19) { require Apache2; require Apache::RequestRec(); require Apache::RequestIO (); } elsif (ModPerl::VersionUtil->is_mp1) { require Apache; }
DESCRIPTION
This module helps you to investigate your mod_perl version easily.
METHODS
- is_mp
-
Returns true if your application is running under mod_perl.
- is_mp1
-
Returns true if your mod_perl version is 1.0.
- is_mp19
-
Returns true if your mod_perl version is 1.9 which is incompatible with 2.0.
- is_mp2
-
Returns true if your mod_perl version is 2.0 or higher.
- mp_version
-
Returns your mod_perl version as number. (e.g. '1.99920')
- mp_version_string
-
Returns your mod_perl version as string. (e.g. '1.999.20')
ACKNOWLEDGEMENTS
Craig Manley <CMANLEY@cpan.org> gave me a code to handle an external scripts correctly.
AUTHOR
Naoya Ito, <naoya@bloghackers.net>
Some codes are borrowed from the Catalyst web application framework which can handle any versions of mod_perl elegantly.
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 101:
You forgot a '=back' before '=head1'
Module Install Instructions
To install ModPerl::VersionUtil, copy and paste the appropriate command in to your terminal.
cpanm ModPerl::VersionUtil
perl -MCPAN -e shell install ModPerl::VersionUtil
For more information on module installation, please visit the detailed CPAN module installation guide.