Justin B Rye <justin.byam.rye@gmail.com> writes: > I'd love to be able to provide a version that's in grammatical > English, but I don't understand what it's trying to say well enough to > make it say it. And this is why I copied upstream's description instead of trying to write an english one. Perhaps it would be easier to ask debian-japanese@l.d.o to translate [0]. That being said, I read the rest of the documentation and the code examples and it looks like this module is a glorified hash from class names to objects of that class. If you want to have a single instance of, for example, WWW::Mechanize in many different files/functions/etc, you do C<Object::Container->register('WWW::Mechanize')> somewhere and then you can retrieve that instance of WWW::Mechanize from anywhere else with C<Object::Container->get('WWW::Mechanize')>. The description compares this module to Class::Singleton, which is also used to make singletons out of classes. To use Class::Singleton, you subclass it and it gives you a nice C<instance> method that returns the single instance. A better long description might be: # This module is an object container with an OO interface. It is used to # make singletons out of ordinary classes. # . # Class::Singleton is a similar module, which makes subclasses # singletons. Unlike Class::Singleton, Object::Container can make any # class a singleton. # . # Object::Registrar is another similar module, but it does not support # lazy loading [0]: https://metacpan.org/module/TYPESTER/Object-Container-0.14/lib/Object/Container/ja.pod -- Marius Gavrilescu
Attachment:
pgpx1vuolsHQ2.pgp
Description: PGP signature