I have a perl mason file and one of the lines looks like this:
$result = PI::Membership::Service->cancel(name => $name)
What exactly does that mean? Is it calling another module? Is it object oriented perl code?
Thanks
It is calling (invoking) the subroutine PI::Membership::Service::cancel
with three arguments.
"PI::Membership::Service"
"name"
$name
Given normal naming conventions, this is calling a subroutine called cancel
in the package PI::Membership::Service
, defined in a file named PI/Membership/Service.pm
somewhere along your @INC
path (there are many abnormal naming conventions, however, so there is no guarantee you will find such a file). And if the PI::Membership::Service
package (class) inherits from one or more other packages, the cancel
subroutine might actually be defined in one of those packages.
More details in perlobj
.