HO::abstract - helper for abstract classes and methods
package Class::Is::Abstract; use HO::abstract 'class';
Note the abstract class places an init method not a new method in the package namespace. Thatswhy the order of use statements is important.
init
new
package Wrong; use HO::class; use HO::abstract;
Here no init method is known when HO::class is called. Importing one from HO::abstract does not matter.
use Right; use HO::abstract; use HO::class;
Now Right-\new> will die correctly.
Right-\
Sebastian Knapp, <rock@ccls-online.de>
Copyright (C) 2007-2011 by Sebastian Knapp
You may distribute this code under the same terms as Perl itself.
To install HO::class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HO::class
CPAN shell
perl -MCPAN -e shell install HO::class
For more information on module installation, please visit the detailed CPAN module installation guide.