- 论坛徽章:
- 0
|
you can check perlboot carefully, you should get the point of why shift should be used!
Another document should give you the clear answer for the questions,
Perl Objects, References & Modules
In the perl module:
on class method, first you should get the calling object instance from implied first arguments,
this could be got by using the shift functions, then you could make calculation based on the object currently you calling.
BTW, Perl's the data_encapsulation is not so strict, so sometime for easy operation, you may directly modified the object's data from outside world, but from my point of view, this should be avoided.
in the end, the existing perl module can give you the most practical example/clue. |
|