Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: GLOB reference problemby ELISHEVA (Prior) |
on Oct 05, 2009 at 10:53 UTC ( [id://799219]=note: print w/replies, xml ) | Need Help?? |
When you want to extend an existing class, you have two options: inheritance and aggregation. If you go the inheritance route your new method would look something like this:
If you go the aggregation route you might do something like this:
If you want your own class to be implemented using a hash, you would go with the aggregation approach since Net::FTP doesn't return a hash. If you want to return the same kind of implementation as Net::FTP, then you would follow the inheritance pattern. You might find the sections on inheritance and aggregation in perltoot worth a read. Best, beth
In Section
Seekers of Perl Wisdom
|
|