in reply to Understanding a OOp code
$hash is an object. $hash->LicenseData(); calls the "method" LicenseData on the hash object. Without bothering with details, that means a sub named LicenseData is called and passed $hash as the first parameter. The LicenseData sub uses the contents of $hash to do some work.
$hash probably isn't a very good name. If the code were written:
sub LicenseData{ my ($licCode) = @_; my $licObj = LIC_INFO($licCode); return $licObj->LicenseData(); }
it may be a little clearer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Understanding a OOp code
by sachinz2 (Acolyte) on Sep 26, 2016 at 09:23 UTC | |
by haukex (Archbishop) on Sep 26, 2016 at 10:17 UTC | |
by sachinz2 (Acolyte) on Sep 26, 2016 at 11:56 UTC | |
by GrandFather (Saint) on Sep 26, 2016 at 19:52 UTC |