Author image Marvin Humphrey
and 1 contributors

NAME

Boilerplater::Parcel - Collection of code.

DESCRIPTION

A Parcel is a cohesive collection of code, which could, in theory, be published as as a single entity.

Boilerplater supports two-tier manual namespacing, using a prefix, an optional class nickname, and the local symbol:

  prefix_ClassNick_local_symbol
  

Boilerplater::Parcel supports the first tier, specifying initial prefixes. These prefixes come in three capitalization variants: prefix_, Prefix_, and PREFIX_.

CLASS METHODS

singleton

    Boilerplater::Parcel->singleton(
        name  => 'Crustacean',
        cnick => 'Crust',
    );

Add a Parcel singleton to a global registry. May be called multiple times, but only with compatible arguments.

  • name - The name of the parcel.

  • cnick - The C nickname for the parcel, which will be used as a prefix for generated global symbols. Must be mixed case and start with a capital letter. Defaults to name.

default_parcel

   $parcel ||= Boilerplater::Parcel->default_parcel;

Return the singleton for default parcel, which has no prefix.

OBJECT METHODS

get_prefix get_Prefix get_PREFIX

Return one of the three capitalization variants for the parcel's prefix.

COPYRIGHT

Copyright 2006-2009 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.30.