POOF::Exception - Utility class used by POOF.


POOF documentation Contained in the POOF distribution.

Index


Code Index:

NAME

Top

POOF::Exception - Utility class used by POOF.

SYNOPSIS

Top

It is not meant to be used directly.

SEE ALSO

Top

POOF man page.

AUTHOR

Top

Benny Millares <bmillares@cpan.org>

COPYRIGHT AND LICENSE

Top


POOF documentation Contained in the POOF distribution.

package POOF::Exception;

use 5.007;
use strict;
use warnings;
use base qw(POOF);
use Carp qw(confess croak);

our $VERSION = '1.0';

#-------------------------------------------------------------------------------
# Properties: Core

sub code : Property Public Virtual
{
    {
        'type' => 'integer',
        'min' => 1,
        'groups' => [qw(Init)],
    }
}

sub description : Property Public Virtual
{
    {
        'type' => 'string',
        'regex' => qr/\b[^ ]+\b/,
        'groups' => [qw(Init)],
    }
}

sub value : Property Public Virtual
{
    {
        'type' => 'string',
        'default' => undef,
        'null' => 1,
        'groups' => [qw(Init)],
    }
}

#-------------------------------------------------------------------------------
# Methods: initialization

sub _init
{
    my $obj = shift;
    my %args = $obj->SUPER::_init( @_ );

    # poplulate known form properties passed to the constructor if they are defined
    @{$obj}{ $obj->pGroup('Init') } = @args{ $obj->pGroup('Init') };

    return (%args);
}


1;
__END__