NAME

PerlBean::Method - contains bean method information

SYNOPSIS

TODO

ABSTRACT

Abstract PerlBean method information

DESCRIPTION

PerlBean::Method class for bean method information.

CONSTRUCTOR

new(OPT_HASH_REF)

Creates a new PerlBean::Method object. OPT_HASH_REF is a hash reference used to pass initialization options. OPT_HASH_REF is mandatory. On error an exception Error::Simple is thrown.

Options for OPT_HASH_REF may include:

body

Passed to set_body().

description

Passed to set_description().

exception_class

Passed to set_exception_class(). Defaults to 'Error::Simple'.

interface

Passed to set_interface().

method_name

Passed to set_method_name(). Mandatory option.

parameter_description

Passed to set_parameter_description().

perl_bean

Passed to set_perl_bean().

METHODS

get_package()

Returns the package name. The package name is obtained from the PerlBean to which the PerlBean::Attribute belongs. Or, if the PerlBean::Attribute does not belong to a PerlBean, main is returned.

get_super_method()

Search the superclasses hierarchy for an identically named PerlBean::Method and return it. If no method is found undef is returned.

write_code(FILEHANDLE)

Write the code for the method to FILEHANDLE. FILEHANDLE is an IO::Handle object. On error an exception Error::Simple is thrown.

write_pod(FILEHANDLE)

Write the documentation for the method to FILEHANDLE. FILEHANDLE is an IO::Handle object. On error an exception Error::Simple is thrown.

set_body(VALUE)

Set the method's body. VALUE is the value. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
get_body()

Returns the method's body.

set_description(VALUE)

Set the method description. VALUE is the value. On error an exception Error::Simple is thrown.

get_description()

Returns the method description.

set_exception_class(VALUE)

Set the class to throw in eventual interface inplementations. VALUE is the value. Default value at initialization is 'Error::Simple'. VALUE may not be undef. On error an exception Error::Simple is thrown.

get_exception_class()

Returns the class to throw in eventual interface inplementations.

set_interface(VALUE)

State that the method is defined as interface. VALUE is the value. On error an exception Error::Simple is thrown.

is_interface()

Returns whether the method is defined as interface or not.

set_method_name(VALUE)

Set the method's name. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
^\w+$
get_method_name()

Returns the method's name.

set_parameter_description(VALUE)

Set the parameter description. VALUE is the value. On error an exception Error::Simple is thrown.

get_parameter_description()

Returns the parameter description.

set_perl_bean(VALUE)

Set the PerlBean to which this method belongs. VALUE is the value. On error an exception Error::Simple is thrown.

VALUE must be a (sub)class of:
PerlBean
get_perl_bean()

Returns the PerlBean to which this method belongs.

SEE ALSO

PerlBean, PerlBean::Attribute, PerlBean::Attribute::Boolean, PerlBean::Attribute::Factory, PerlBean::Attribute::Multi, PerlBean::Attribute::Multi::Ordered, PerlBean::Attribute::Multi::Unique, PerlBean::Attribute::Multi::Unique::Associative, PerlBean::Attribute::Multi::Unique::Associative::MethodKey, PerlBean::Attribute::Multi::Unique::Ordered, PerlBean::Attribute::Single, PerlBean::Collection, PerlBean::Method::Constructor, PerlBean::Style

BUGS

None known (yet.)

HISTORY

First development: January 2003

AUTHOR

Vincenzo Zocca

COPYRIGHT

Copyright 2003 by Vincenzo Zocca

LICENSE

This file is part of the PerlBean module hierarchy for Perl by Vincenzo Zocca.

The PerlBean module hierarchy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The PerlBean module hierarchy 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 GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the PerlBean module hierarchy; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA