Samson Monaco Tutankhamen > Proc-Command > File::Package

Download:
Proc-Command-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.11   Source  

NAME ^

File::Package - test load a program module with a package of the same name

SYNOPSIS ^

  use File::Package

  $package       = File::Package->is_package_loaded($package)
  $error         = File::Package->load_package($package)

DESCRIPTION ^

One very useful test of the installation of a package is whether or not the package loaded. If it did not load, the reason it did not load is helpful diagnostics.

This information is readily available when loaded at a local site. However, it the load occurs at a remote site and the load crashes Perl, the remote tester usually will not have this information readily available.

The load_package method attempts to capture any load problems by loading the package with a "require " under an eval and capturing all the "warn" and $@ messages. The error messages are returned so that they may be appropriately tested and if not as expected the actual and expected included in failure report back to the author of the package.

METHODS ^

is_package_loaded method

 $package = File::Package->is_package_loaded($package)

The is_package_loaded method determines if a package vocabulary is present.

For example, if File::Basename is not loaded

 ==> File::Package->is_package_loaded('File::Basename')

 ''
=head1 REQUIREMENTS

Coming soon.

NOTES ^

AUTHOR

The holder of the copyright and maintainer is

<support@SoftwareDiamonds.com>

COPYRIGHT NOTICE

Copyrighted (c) 2002 Software Diamonds

All Rights Reserved

BINDING REQUIREMENTS NOTICE

Binding requirements are indexed with the pharse 'shall[dd]' where dd is an unique number for each header section. This conforms to standard federal government practices, 490A ("3.2.3.6" in STD490A). In accordance with the License, Software Diamonds is not liable for any requirement, binding or otherwise.

LICENSE

Software Diamonds permits the redistribution and use in source and binary forms, with or without modification, provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

SOFTWARE DIAMONDS, http::www.softwarediamonds.com, PROVIDES THIS SOFTWARE 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWARE DIAMONDS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING USE OF THIS SOFTWARE, EVEN IF ADVISED OF NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE POSSIBILITY OF SUCH DAMAGE.

syntax highlighting: