> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes:
"Jeff> but the second one is recommended, it looks more like the OO way.
It's more than just recommended. The indirect object form is actively
discouraged, because we've been finding more and more examples where
the inherent imbiguity in i
On Feb 15, 2008 11:56 PM, howa <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Currently I have seen two way to create objects in Perl:
>
> 1. my $a = new Apple...
> 2. my $a = Apple->new();
>
> What are the differences, and which one is recommended?
>
Both are fine:
$ perl -le 'package A;sub new{print shif
Hi,
Currently I have seen two way to create objects in Perl:
1. my $a = new Apple...
2. my $a = Apple->new();
What are the differences, and which one is recommended?
Thanks.
Howard.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.
Hi!
I have some questions about OOP in Perl.
1. In my class I have lot of methods, but some of them just parse a file or
pass a string to a different format (like in C, Im thinking that they are
private), In perl, whats the better way to call a private method:
$state = $this->city2state(&q
Pablo Fischer wrote:
> Thanks!
>
> After sending my question I found in a website the topic of 'private' methods,
> and shows code like this:
>
> my $method_name = sub {
> my $this = shift;
>
> _blablabla_
> };
>
> And to access it :
>
> $this->$method_name("Arg1");
>
> Now, this it really
On Fri, Aug 08, 2003 at 12:05:47AM + Pablo Fischer wrote:
> I have some questions about OOP in Perl.
>
> 1. In my class I have lot of methods, but some of them just parse a file or
> pass a string to a different format (like in C, Im thinking that they are
> private), In
On Wednesday, August 13, 2003, at 12:34 AM, R. Joseph Newton wrote:
Pablo Fischer wrote:
Thanks!
After sending my question I found in a website the topic of 'private'
methods,
and shows code like this:
my $method_name = sub {
my $this = shift;
_blablabla_
};
And to access it :
$this-
Thanks!
After sending my question I found in a website the topic of 'private' methods,
and shows code like this:
my $method_name = sub {
my $this = shift;
_blablabla_
};
And to access it :
$this->$method_name("Arg1");
Now, this it really works for 'private' methods?
Thanks!
--
Pa