GX::Meta::Package

Module Version: 0.2000_01

NAME

GX::Meta::Package - Package metaclass

SYNOPSIS

None.

DESCRIPTION

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

METHODS

Constructor

new

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

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

    The name of the package, for example "My::Package".

Returns:
Exceptions:

Alternative syntax:

$package = GX::Meta::Package->new( $name );
Arguments:
  • $name ( string )

    The name of the package, for example "My::Package".

Returns:
Exceptions:

Public Methods

assign_to_typeglob

Performs a typeglob assignment.

$package->assign_to_typeglob( $symbol, $reference );
Arguments:
  • $symbol ( string )

    A symbol name.

  • $reference ( reference )

    A scalar, array, hash or code reference.

Exceptions:

clear_typeglob_slot

Clears the specified typeglob slot.

$package->clear_typeglob_slot( $symbol, $slot );
Arguments:
  • $symbol ( string )

    A symbol name.

  • $slot ( string )

    Possible values: "SCALAR", "ARRAY", "HASH", "CODE" or "IO".

Exceptions:

name

Returns the name of the package, for example "My::Package".

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

prefix

Returns the package prefix, for example "My::Package::".

$prefix = $package->prefix;
Returns:
  • $prefix ( string )

qualify

Prepends the package prefix to the given name and returns the result.

$qualified_name = $package->qualify( $name );
Arguments:
  • $name ( string )
Returns:
  • $qualified_name ( string )

symbol_table

Returns a reference to the associated symbol table.

$symbol_table = $package->symbol_table;
Returns:
  • $symbol_table ( HASH reference )

wipe

Undefines every symbol that lives in the associated symbol table. Danger, Will Robinson!

$package->wipe;

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.