"bless" causes the object to be of a certain class.
In this case, we are given an object which happens to be of class "Net::FTP::A", and we force it to be of class "My::Net::FTP::A". Since "My::Net::FTP::A" is a subclass of "Net::FTP::A", everything will still work. We simply override the little bit that we want to be different. In our overriding version, we do a little bit... then we chain through to the original version. Since the original version is owned by the parent class (or "super-class"), we use the special form $obj->SUPER::method() to call it.
UPDATED
"SUPER" means look up the given method, skipping the definition in the current class. In this case, the method is found in the immediate parent, even though SUPER could, if necessary, search all the way back to UNIVERSAL.
Does that clarify it at all?
| [reply] [d/l] |