in reply to Re: Re: Re: Tie-ing hashes clobbers data
in thread Tie-ing hashes clobbers data
is still a method even if I call it with Foo::new($class). Or what about this:sub Foo::new { bless {}, $_[0]; }
There are times when you wish to specify which class's method to use. Here you can call your method as an ordinary subroutine call, being sure to pass the requisite first argument explicitly /.../ Unlike method calls, function calls don't consider inheritance. (perlobj)my $bar = $foo->can('bar'); $bar->($foo); # Is there any difference between this &bar $foo->$bar; # and this &bar?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Um, no.
by Fletch (Bishop) on Apr 09, 2002 at 18:27 UTC | |
by Anonymous Monk on Apr 09, 2002 at 22:38 UTC | |
by Fletch (Bishop) on Apr 10, 2002 at 02:40 UTC | |
|
Re: Re: Re: Re: Re: Tie-ing hashes clobbers data
by demerphq (Chancellor) on Apr 09, 2002 at 17:01 UTC | |
by Anonymous Monk on Apr 09, 2002 at 21:37 UTC | |
by demerphq (Chancellor) on Apr 09, 2002 at 21:49 UTC | |
by Anonymous Monk on Apr 09, 2002 at 23:21 UTC | |
by demerphq (Chancellor) on Apr 10, 2002 at 11:46 UTC | |
|