]> git.donarmstrong.com Git - class_modular.git/.git/commitdiff
* Add more documentation to Class::Modular
authorDon Armstrong <don@donarmstrong.com>
Wed, 15 Sep 2004 06:23:33 +0000 (06:23 +0000)
committerDon Armstrong <don@donarmstrong.com>
Wed, 15 Sep 2004 06:23:33 +0000 (06:23 +0000)
git-svn-id: file:///srv/don_svn/class_modular/trunk@23 96c6a18b-02ce-0310-9fca-9eb62c757ba6

lib/Class/Modular.pm

index 95921ce2dfcf89b5e808d08c70fd23830fef07cb..71f86b89f223bbab840dbfc12e3c1700004957e9 100644 (file)
@@ -16,6 +16,25 @@ Class::Modular -- Modular class generation superclass
 
      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);
+     }
+
      [...]
 
      use Foo;
@@ -36,6 +55,9 @@ functions. Less generic functions can be included or overridden
 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>.
+
 =head1 FUNCTIONS
 
 =cut
@@ -48,7 +70,7 @@ use Carp;
 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;
 }
@@ -104,7 +126,7 @@ Stores the arguments used at new so modules that are loaded later can
 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.
 
 =cut
 
@@ -446,8 +468,8 @@ __END__
 
 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.
 
 =head1 COPYRIGHT