I can't IRC at work, but I opened https://github.com/moose/moose/pull/23
I added some class consumption examples in the top level Manual.pod and Manual/Classes.pod I had a quick look at perlootut too https://metacpan.org/module/RJBS/perl-5.18.0/pod/perlootut.pod and it might be worth it to submit a similar patch for that document since there doesn't seem to be an explicit example. Let me know what you think. Thanks. Mark ________________________________ From: Darren Duncan <dar...@darrenduncan.net> To: moose@perl.org Sent: Tuesday, June 11, 2013 12:08 AM Subject: Re: Accessing object constructors from the 'main' On 2013.06.10 2:41 PM, Dave Rolsky wrote: > On Sat, 8 Jun 2013, Faelin McCaley Landy wrote: > >> The Moose::Manual is very well written, but is definitely lacking in >> explanation of a very key step in product development: how on Earth do you >> actually use your objects in a script?! >> Specifically, my problem is that I want to have a main.pl from which I call >> Obj->new( ... ); >> What I can't figure out is how I'm supposed to do this from a different file >> than the original Obj definition. Currently, I'm making it work by >> use Moose; >> extends 'Obj'; > > How about "use Obj" ? > > Moose classes are Perl packages no different from any other package. Faelin's question almost strikes me as from someone who hasn't used objects at all in Perl and found Moose first as "the" way to do it. Does perhaps the Moose manual need a little more for people that don't know how objects in general work in Perl, that is, actually spell out the "and then you use your new class like this: use Obj; Obj->new()" etc. I mean, isn't one of the main points of Moose to help beginners not have to think about the old way of doing objects when they're starting out? So state what we may consider the obvious, as some Perl beginners it may not be obvious to. -- Darren Duncan