in reply to Re: Re: Re: Re: Tie-ing hashes clobbers data
in thread Tie-ing hashes clobbers data
Method, procedure, function. It's all the same thing. The thing that differes is how you call them. I'd say thatis still a method even if you call it with Foo::new($class).sub Foo::new { bless {}, $_[0]; }
I can say black is white and white is black all day, but I'm still going to get run over at the next zebra crossing because it's not true. Method calls are invoked using $instance->method_name(). That form searches the @ISA tree. Foo::new() is calling a fully specified subroutine. No amount of wishful thinking will ever make that into a method call. Perl is rather flexible in that it will allow you to call most subroutines either way.
And strictly speaking (in a computer sciencey manner), there is a specific difference between a procedure and a function. Compare and contrast foldoc's definitions for function and procedure
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Um, no.
by Anonymous Monk on Apr 09, 2002 at 22:38 UTC | |
by Fletch (Bishop) on Apr 10, 2002 at 02:40 UTC |