GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Workflow::Base(3) User Contributed Perl Documentation Workflow::Base(3)

Workflow::Base - Base class with constructor

This documentation describes version 1.60 of this package

 package My::App::Foo;
 use base qw( Workflow::Base );

Provide a constructor and some other useful methods for subclasses.

new( @params )

Just create a new object (blessed hashref) and pass along @params to the "init()" method, which subclasses can override to initialize themselves.

Returns: new object

init( @params )

Subclasses may implement to do initialization. The @params are whatever is passed into "new()". Nothing need be returned.

log()

Returns the logger for the instance, based on the instance class.

param( [ $name, $value ] )

Associate arbitrary parameters with this object.

If neither $name nor $value given, return a hashref of all parameters set in object:

 my $params = $object->param();
 while ( my ( $name, $value ) = each %{ $params } ) {
     print "$name = $params->{ $name }\n";
 }

If $name given and it is a hash reference, assign all the values of the reference to the object parameters. This is the way to assign multiple parameters at once. Note that these will overwrite any existing parameter values. Return a hashref of all parameters set in object.

 $object->param({ foo => 'bar',
                  baz => 'blarney' });

If $name given and it is not a hash reference, return the value associated with it, "undef" if $name was not previously set.

 my $value = $object->param( 'foo' );
 print "Value of 'foo' is '$value'\n";

If $name and $value given, associate $name with $value, overwriting any existing value, and return the new value.

 $object->param( foo => 'blurney' );

delete_param( [ $name ] )

Delete parameters from this object.

If $name given and it is an array reference, then delete all parameters from this object. All deleted parameters will be returned as a hash reference together with their values.

 my $deleted = $object->delete_param(['foo','baz']);
 foreach my $key (keys %{$deleted})
 {
   print $key."::=".$deleted->{$key}."\n";
 }

If $name given and it is not an array reference, delete the parameter and return the value of the parameter.

 my $value = $object->delete_param( 'foo' );
 print "Value of 'foo' was '$value'\n";

If $name is not defined or $name does not exists the undef is returned.

clear_params()

Clears out all parameters associated with this object.

normalize_array( \@array | $item )

If given "\@array" return it dereferenced; if given $item, return it in a list. If given neither return an empty list.

Copyright (c) 2003-2022 Chris Winters. All rights reserved.

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

Please see the LICENSE

Please see Workflow
2022-03-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.