develooper Front page | perl.beginners.cgi | Postings from October 2014

Re: cgi and inheritance

Thread Previous
From:
John SJ Anderson
Date:
October 6, 2014 13:41
Subject:
Re: cgi and inheritance
Message ID:
CABJ3DF8yuYArLFQTJTwGz8hOj2ytT46jeLDA+SOJVtY38Xt-QA@mail.gmail.com
On Mon, Oct 6, 2014 at 6:33 AM, Patton, Billy <Billy.Patton@h3net.com> wrote:
> I’ve recently inherited some code that hasn’t been touched in over 5 years. It’s all cgi and OOPerl.
> I’ve ran across this one statement that I don’t understand.
>
> $self->log->error(*)

That's calling the 'error()' method, on the result returned by calling
the 'log()' method, on the current object ($self).

You could also write that as:

    my $log = $self->log();
    $log->error(*)

(I'm assuming '*' is a stand-in for the actual arguments.)

chrs,
john.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About