.
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 21:45
To: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone()
Hi Tom. You're a bit off-track here with your
appreciation of object methods, but I'll try to
put you straight as well as answer your questions
David wrote:
Rob Dixon wrote:
you couldn't get a new object by simply writing:
my $object2 = $object;
as what you would have is simply a second handle
to the same object, and all changes to one would
be echoed in the other. You would have to do:
my $object2 = clone
David Wilson wrote:
There is a clone module on CPAN.
Take a look at it. It will do what you need.
Tom's original post was about how to call the 'clone'
method of a given object. His assumption was that
clone was a built-in, so he was failing to find
documentation on it. It was not a question
to by a ref as an object. But what
does that mean in actual terms, the access method for
package variables doesn't change.
Thanks again,
Tom Norwood.
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 11:51
To: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone
Hi Tom. You're a bit off-track here with your
appreciation of object methods, but I'll try to
put you straight as well as answer your questions
as they are.
Tom Norwood wrote:
Cheers Rob, below is the clone() from URI::WithBase
(the base class of URI::URL).
sub clone {
my $self = shift;
;
Is this right, and if so how do I find out how to use it myself.
Tom Norwood.
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: 11 March 2003 02:26
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone()
Tom Norwood wrote:
I can't find
http://search.cpan.org/author/RDF/Clone-0.13/Clone.pm
José.
-Original Message-
From: Tom Norwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:28 PM
To: Wiggins d'Anconia
Cc: [EMAIL PROTECTED]
Subject: RE: Inheritance and clone()
I'm looking into writing some OO
Tom Norwood wrote:
I'm looking into writing some OO modules for my sites, and have found
a few
examples
but they don't define their own 'clone' functions. So from what you
said
previously
'clone' must be defined within one of the following:
use HTTP::Status;
use HTTP::Request;
use
PROTECTED]
Sent: 11 March 2003 12:39
To: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone()
Tom Norwood wrote:
I'm looking into writing some OO modules for my sites, and have found
a few
examples
but they don't define their own 'clone' functions. So from what you
said
previously
'clone' must
Rob Dixon wrote:
you couldn't get a new object by simply writing:
my $object2 = $object;
as what you would have is simply a second handle
to the same object, and all changes to one would
be echoed in the other. You would have to do:
my $object2 = clone ($object);
sub
There is a clone module on CPAN.
Take a look at it. It will do what you need.
-David W.
-Original Message-
From: david [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 4:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone()
Rob Dixon wrote:
you couldn't get a new
Tom Norwood wrote:
I can't find much documentation for this function
and related constructor methods. I would be grateful
for any assistance that can be offered.
I admit I am not to familiar with perldoc but
searching (with and without -q) using 'inheritance',
'constructor' and 'clone' keywords
12 matches
Mail list logo