logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Rose::Object - A simple object base class.

Author

       John C. Siracusa (siracusa@gmail.com)

Description

       Rose::Object is a generic object base class.  It provides very little functionality, but a healthy dose
       of convention.

License

       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.

perl v5.34.0                                       2022-05-28                                  Rose::Object(3pm)

Methods

newPARAMS
           Constructs  a  new,  empty, hash-based object based on PARAMS, where PARAMS are name/value pairs, and
           then calls init (see below), passing PARAMS to it unmodified.

       initPARAMS
           Given a list of name/value pairs in PARAMS, calls  the  object  method  of  each  name,  passing  the
           corresponding  value as an argument.  The methods are called in the order that they appear in PARAMS.
           For example:

               $o->init(foo => 1, bar => 2);

           is equivalent to the sequence:

               $o->foo(1);
               $o->bar(2);

Name

       Rose::Object - A simple object base class.

Synopsis

           package MyObject;

           use Rose::Object;
           our @ISA = qw(Rose::Object);

           sub foo { ... }
           sub bar { ... }
           ...

           my $o = MyObject->new(foo => 'abc', bar => 5);
           ...

See Also