Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Calling methods of object instance A from object instance B

by erroneousBollock (Curate)
on Nov 29, 2007 at 01:53 UTC ( #653742=note: print w/ replies, xml ) Need Help??


in reply to Calling methods of object instance A from object instance B

Now I'd like for instance use methods of first mentioned object instance in second mentioned object.
I tried simply by sending object A instance as parameter to method of object B and call method but it seems it doesn't work....
If I understand what you're saying, it should work fine.

$A->methodfoo($B); # methodfoo will call $_[1]->methodbar();

Could you post a cut-down example of your code that still exhibits the problem? Also, please remember to read Writeup Formatting Tips.

-David


Comment on Re: Calling methods of object instance A from object instance B
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-09-21 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls