GX::Meta::Module

Module Version: 0.2000_01

NAME

GX::Meta::Module - Module metaclass

SYNOPSIS

None.

DESCRIPTION

This module provides the GX::Meta::Module class.

METHODS

Constructor

new

Returns a new GX::Meta::Module metaobject.

$module = GX::Meta::Module->new( %attributes );
Attributes:
  • name ( string ) [ required ]

    The name of the module, for example "My::Module".

Returns:
Exceptions:

Alternative syntax:

$module = GX::Meta::Module->new( $name );
Arguments:
  • $name ( string )

    The name of the module, for example "My::Module".

Returns:
Exceptions:

Public Methods

filename

Returns the localized name of the module file, for example "My/Module.pm" on a UNIX system.

$filename = $module->filename;
Returns:
  • $filename ( string )

find_file

Returns the absolute path to the file the module would currently be loaded from, or undef if the module file cannot be found in any of the @INC paths.

$path = $module->find_file;
Returns:
  • $path ( string | undef )

inc_file

Returns the absolute path to the file the module was loaded from, or undef if the module is not loaded or was not loaded from a file.

$path = $module->inc_file;
Returns:
  • $path ( string | undef )

inc_key

Returns the %INC key for the module.

$key = $module->inc_key;
Returns:
  • $key ( string )

inc_value

Returns / sets the %INC value for the module.

$value = $module->inc_value;
$value = $module->inc_value( $value );
Arguments:
  • $value ( scalar ) [ optional ]
Returns:
  • $value ( scalar )

is_installed

Returns true if the module is installed, otherwise false.

$result = $module->is_installed;
Returns:
  • $result ( bool )

is_loaded

Returns true if the module is loaded, otherwise false.

$result = $module->is_loaded;
Returns:
  • $result ( bool )

name

Returns the name of the module, for example "My::Module".

$name = $module->name;
Returns:
  • $name ( string )

SEE ALSO

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.