Exporter::Declare::Export(3pm)

Exporter::Declare::Export3pm

Base class for all export objects.

Overview

All exports are refs, and all are blessed. This class tracks some per-export information via an inside-out objects system. All things an export may need to do, such as inject itself into a package are handled here. This allows some complicated, or ugly logic to be abstracted out of the exporter and metadata classes.

Methods

$class->new( $ref, exported_by => $package, %data )

Create a new export from $ref. You must specify the name of the class doing the exporting.

$export->inject( $package, $name, @args )

This will inject the export into $package under $name. @args are ignored in most cases. See Exporter::Declare::Export::Generator for an example where they are used.

$package = $export->exported_by()

Returns the name of the package from which this export was originally exported.

@params = $export->required_specs()

Documented for subclassing purposes. This should always return a list of required parameters at construction time.

$export->DESTROY()

Documented for subclassing purposes. This takes care of cleanup related to storing data in an inside-out objects system.

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8
  2. 9–10
  3. 11
  4. 12–13

Authors

Chad Granum [email protected]

From libexporter-declare-perl 0.114-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.