On Dec 20, 2003, at 12:31 PM, R. Joseph Newton wrote: [..]

It might be worth a trip to the archives to review this thread.


Joseph

for those following along at home:


<http://coding.derkeiler.com/Archive/Perl/perl.beginners/2003-10/ 0708.html>
being the thread I think Joseph is referring to...
which references
<http://www.perlmonks.org/index.pl?node_id=52089>


return bless { me => 'father' }, $haveSin";

thank you for the references. good point on
the 'clone' v. 'new' class method argument.

I will confess to having cargo culted it from
the POD without worrying about the details.

Since I can not come up with a good argument
why I would want someone passing me a 'reference'
to the class, the old stand bye of

        my $proto = shift;
        my $class = ref($proto) || $proto;

is not something that I will be advocating.

I'd say that about 90% of the time I am using
an OO-ish style it is for the blessed reference
to a function, hence either a named function
in the module, or something that it inherited,
in it's super class. so the

my $baz = new Foo::Bar::Baz;

my @got_back = $baz->method_here(@arglist);

allows me to not have to remember if it is in Baz.pm
or one of the super's. Even IF in that specific instance
I could have done just as well with

my @got_back = Foo::Bar::Baz->method_here(@arglist);

and in some places I do that, because it helps
remind me where I stashed the function...

But I tend to get to Modules based upon the
'things worth keeping and re-using'
rather than the BDUF approach of

        well we need a Base Class that is wide enough
        to allow the following Sub Classes which ....




ciao drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to