Author image Marvin Humphrey
and 1 contributors

NAME

Boilerplater::Type::Boilerplater - An object Type.

DESCRIPTION

Boilerplater::Type::Object supports object types for all classes. The type's specifier must match the last component of the class name -- i.e. for the class "Crustacean::Lobster" it must be "Lobster".

METHODS

new

    my $type = Boilerplater::Type::Object->new(
        specifier   => "Obj",     # required
        parcel      => "Boil",    # default: the default Parcel.
        const       => undef,     # default undef
        indirection => 1,         # default 1
        incremented => 1,         # default 0
        decremented => 0,         # default 0
    );
  • specifier - Required. Must follow the rules for Boilerplater::Class class name components.

  • parcel - A Boilerplater::Parcel or a parcel name.

  • const - Should be true if the Type is const. Note that this refers to the object itself and not the pointer.

  • indirection - Level of indirection. Must be 1 if supplied.

  • incremented - Indicate whether the caller must take responsibility for an added refcount.

  • decremented - Indicate whether the caller must account for for a refcount decrement.

The Parcel's prefix will be prepended to the specifier by new().

incremented

Returns true if the Type is incremented.

decremented

Returns true if the Type is decremented.

COPYRIGHT AND LICENSE

Copyright 2008-2009 Marvin Humphrey

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.