Steve Purkis > Pangloss > Pangloss::Object

Download:
Pangloss-0.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Pangloss::Object - base class for all Pangloss objects.

SYNOPSIS ^

 package Foo;
 use base qw( Pangloss::Object );

 # Pangloss::accessors is loaded for you:
 use accessors qw( bar );

 my $foo = Foo->new( @optional_args )->bar('baz');

 $Pangloss::DEBUG{ Foo } = 1;
 $Pangloss::DEBUG{ ALL } = 1;

 $foo->emit( 'a message' );

DESCRIPTION ^

Base class for Pangloss objects.

METHODS ^

$obj = $class->new( @args )

creates and returns a new object, if $obj->init( @args ) returns a true value.

$bool = $obj->init( @args )

does nothing by default. a false return value means initialization failed.

$obj = $obj->emit( $msg )

emits $msg if debugging is enabled for this object's class. can also be called as a class method.

CLASS VARIABLES ^

%Pangloss::DEBUG

hash of classes to enable debugging for, via emit(). If 'ALL' is set, debugging for all Pangloss classes is enabled.

AUTHOR ^

Steve Purkis <spurkis@quiup.com>

SEE ALSO ^

Pangloss, Similar to OpenFrame::Object.

syntax highlighting: