Rose::Class
A very simple class base class.
- Provided by: librose-object-perl (Version: 0.860-1)
- Report a bug
A very simple class base class.
package MyClass;
use Rose::Class;
our @ISA = qw(Rose::Class);
sub foo { ... }
...
MyClass->foo(...) or die MyClass->error;
...
Rose::Class is a generic base class for classes. It provides a single class method ("error"), but may be expanded further in the future.
A class that inherits from Rose::Class is not expected to allow objects of that class to be instantiated, since the namespace for class and object methods is shared. For example, it is common for Rose::Object-derived classes to have "error" methods, but this would conflict with the Rose::Class method of the same name.
John C. Siracusa (siracusa@gmail.com)
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.