develooper Front page | perl.perl5.porters | Postings from August 2010

Re: Mutually dependent classes

Thread Previous | Thread Next
Eric Brine
August 5, 2010 07:54
Re: Mutually dependent classes
Message ID:
On Wed, Aug 4, 2010 at 8:21 PM, Mark J. Reed <> wrote:

> Dumb question maybe, but if I have two classes which need to call
> methods on each other's objects, how can I define them without getting
> 'redefined subroutine' warnings (and possibly assorted other
> circular-reference problems)?

Your code does not emit such warnings.

>perl -we"use Parent; use Child;"

>perl -we"use Child; use Parent;"


p5p is for development of Perl itself. Please direct future help questions
to htttp://

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About