Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Re: Method Calls on multiple objects

by Limbic~Region (Chancellor)
on Mar 27, 2004 at 14:48 UTC ( #340263=note: print w/replies, xml ) Need Help??

in reply to Re: Method Calls on multiple objects
in thread Method Calls on multiple objects

Or am I missing something?
Not really. You would have to modify it only slightly to allow argument passing. The big difference is that with:
$obj_merged->bark( 'mailman' );
You get the benefit of not having to remember how many/which objects (which could be of different classes) are in the merged object. It also becomes a heck of a lot easier depending on how many times you want to bark at the moon. This is why I do not think my second example would be desireable to the person asking either.

Keep in mind I am not suggesting a new module for CPAN by any stretch of the imagination - just something to help someone who asked.

Cheers - L~R

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://340263]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2021-12-06 08:59 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (32 votes). Check out past polls.