---
name: "Exporter::Declare::Meta"
section: "3pm"
platform: "linux"
package: "libexporter-declare-perl"
version: "0.114-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Exporter::Declare::Meta"
---

# Exporter::Declare::Meta(3pm)

The meta object which stores meta-data for all exporters.

## NAME

Exporter::Declare::Meta - The meta object which stores meta-data for all exporters.

## DESCRIPTION

All classes that use Exporter::Declare have an associated Meta object. Meta objects track available exports, tags, and options.

## METHODS

- $class-\>new( $package )

  Created a meta object for the specified package. Also injects the **export\_meta()** sub into the package namespace that returns the generated meta object.

- $class-\>new\_from\_exporter( $package )

  Create a meta object for a package that already uses Exporter.pm. This will not turn the class into an Exporter::Declare package, but it will create a meta object and **export\_meta()** method on it. This si primarily used for reexport purposes.

- $package = $meta-\>**package()**

  Get the name of the package with which the meta object is associated.

- $meta-\>**add\_alias()**

  Usually called at construction to add a package alias function to the exports.

- $meta-\>add\_export( $name, $ref )

  Add an export, name should be the item name with sigil (assumed to be sub if there is no sigil). `$ref` should be a ref blessed as an Exporter::Declare::Export subclass.

- $meta-\>get\_export( $name )

  Retrieve the Exporter::Declare::Export object by name. Name should be the item name with sigil, assumed to be sub when sigil is missing.

- $meta-\>export\_tags\_push( $name, @items )

  Add `@items` to the specified tag. Tag will be created if it does not already exist. `$name` should be the tag name **WITHOUT** -/: prefix.

- @list = $meta-\>export\_tags\_get( $name )

  Get the list of items associated with the specified tag.  `$name` should be the tag name **WITHOUT** -/: prefix.

- @list = $meta-\>**export\_tags\_list()**

  Get a list of all export tags.

- $bool = $meta-\>is\_tag( $name )

  Check if a tag with the given name exists.  `$name` should be the tag name **WITHOUT** -/: prefix.

- $meta-\>options\_add( $name )

  Add import options by name. These will be boolean options that take no arguments.

- my @list = $meta-\>**options\_list()**

  - $meta-\>arguments\_add( $name )

  Add import options that slurp in the next argument as a value.

- $bool = $meta-\>is\_option( $name )

  Check if the specified name is an option.

- $bool = $meta-\>is\_argument( $name )

  Check if the specified name is an option that takes an argument.

- $meta-\>add\_parser( $name, sub { ... })

  Add a parser sub that should be associated with exports via Devel::Declare

- $meta-\>get\_parser( $name )

  Get a parser by name.

- $ref = $meta-\>get\_ref\_from\_package( $item )

  Returns a reference to a specific package variable or sub.

- $meta-\>reexport( $package )

  Re-export the exports in the provided package. Package may be an Exporter::Declare based package or an Exporter based package.

- $meta-\>merge( $meta2 )

  Merge-in the exports and tags of the second meta object.

## AUTHORS

Chad Granum exodist7@gmail.com

## COPYRIGHT

Copyright (C) 2010 Chad Granum

Exporter-Declare is free software; Standard perl licence.

Exporter-Declare is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the license for more details.
