Workflow

 view release on metacpan or  search on metacpan

lib/Workflow/Factory.pm  view on Meta::CPAN


    return _initialize_instance($class);
}

sub _initialize_instance {
    my ($class) = @_;

    unless ( $INSTANCES{$class} ) {
        $log->debug( "Creating empty instance of '$class' factory for ",
                     "singleton use" );
        my $instance = bless {} => $class;
        $instance->init();
        $INSTANCES{$class} = $instance;
    }
    return $INSTANCES{$class};
}

sub _delete_instance {
    my ($class) = @_;

    if ( $INSTANCES{$class} ) {

lib/Workflow/Persister/DBI/AutoGeneratedId.pm  view on Meta::CPAN


$Workflow::Persister::DBI::AutoGeneratedId::VERSION = '2.05';

my @FIELDS = qw( log from_handle handle_property func_property );
__PACKAGE__->mk_accessors(@FIELDS);

sub new {
    my ( $class, $params ) = @_;

    my $self =
        bless { log => Log::Any->get_logger( category => $class ) }, $class;
    for (@FIELDS) {
        $self->$_( $params->{$_} ) if ( $params->{$_} );
    }
    if ( my $handle_type = $self->from_handle ) {
        unless ( $handle_type =~ /^(database|statement)$/ ) {
            configuration_error "Parameter 'from_handle' must be 'database' ",
                "or 'statement' (Given: '$handle_type')";
        }
        unless ( $self->handle_property ) {
            configuration_error "If you specify 'from_handle' you must ",



( run in 0.370 second using v1.01-cache-2.11-cpan-65fba6d93b7 )