NAME
Class::Wheel - simple class wheel
SYNOPSIS
package Class::Wheel::Subclass;
use strict;
use base 'Class::Wheel';
@__PACKAGE__::FIELDS = qw/fields/;
@__PACKAGE__::STRICT_FIELDS = qw/strict/;
sub init {
my($self,$param) = @_;
warn "Init method called";
return;
}
sub run {
my($self,$param) = @_;
warn "Run method called";
return;
}
sub done {
my($self,$param) = @_;
warn "Done method called";
return;
}
package main;
my $obj = Class::Wheel::Subclass->new({
strict => 1
});
$obj->process(); # run init run done
DESCRIPTION
Class::Wheel - simple class wheel
You can divide creating object with some logic to some steps : init,run,done
and run these methods in method process
Usually if you need your own extra initialization - you can redefine method init
Logic for object - in method run
Some finalize actions you can define in method done
AUTHOR
<plcgi1@gmail.com<gt>
COPYRIGHT AND LICENSE
Copyright (C) 2008 by plcgi1@gmail.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.