use base qw(Class::Modular);
use base qw(Class::Modular);
+ sub new {
+ my $class = shift;
+ my $self = bless {}, ref($class) || $class;
+ $self->SUPER::_init(@_);
+ return $self;
+ }
+
+ [...]
+
+ package Bar;
+
+ sub method_that_bar_provides{
+ print qq(Hello World!\n);
+ }
+
+ sub _methods($$){
+ return qw(method_that_bar_provides);
+ }
+
without modifying the base classes. This allows for code to be more
modular, and reduces code duplication.
without modifying the base classes. This allows for code to be more
modular, and reduces code duplication.
+This module attempts to fill the middle ground between
+L<Class::Mutator> and true classless OOP, like L<Class::Classless>.
+
use Storable qw(dclone); # Used for deep copying objects
BEGIN{
use Storable qw(dclone); # Used for deep copying objects
BEGIN{
- $VERSION = undef || q(SVN Development Version: ).q$Id:$;
+ $VERSION = undef || q(SVN Development Version: ).q$Id$;
($REVISION) = q$LastChangedRevision$ =~ /\$LastChangedRevision:\s+([^\s+])/;
$DEBUG = 0 unless defined $DEBUG;
}
($REVISION) = q$LastChangedRevision$ =~ /\$LastChangedRevision:\s+([^\s+])/;
$DEBUG = 0 unless defined $DEBUG;
}
read them from B<creation_args>
You can also override this method, but if you do so, you should call
read them from B<creation_args>
You can also override this method, but if you do so, you should call
-Class::Modular::_init(@_) if you don't set creation_args.
+Class::Modular::_init($self,@_) if you don't set creation_args.
Because this module works through AUTOLOAD, utilities that use
can($object) instead of $object->can() will fail to see routines that
Because this module works through AUTOLOAD, utilities that use
can($object) instead of $object->can() will fail to see routines that
-are actually there. Params::Validate, an excellent module, is one of
-these offenders.
+are actually there. Params::Validate, an excellent module, is
+currently one of these offenders.