in reply to why "Bless" in OO Perl
bless attaches a class name to a reference. When I call a method on the reference, Perl looks in that class to find the method.
The return value is just the reference, now with the class label attached to it. See the bless entry in perlfunc for the details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: why "Bless" in OO Perl
by Zaxo (Archbishop) on May 03, 2006 at 16:21 UTC |