Rose::Object(3pm) | User Contributed Perl Documentation | Rose::Object(3pm) |
Rose::Object - A simple object base class.
package MyObject; use Rose::Object; our @ISA = qw(Rose::Object); sub foo { ... } sub bar { ... } ... my $o = MyObject->new(foo => 'abc', bar => 5); ...
Rose::Object is a generic object base class. It provides very little functionality, but a healthy dose of convention.
$o->init(foo => 1, bar => 2);
is equivalent to the sequence:
$o->foo(1); $o->bar(2);
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.
2022-05-28 | perl v5.34.0 |