Do you mean that users of the module should use $ftp->{parent}->ls? If that's what you mean, then I think that would be a bad idea. It violates encapsulation, and looks like a fragile interface indeed.
But if you mean that the Custom::FTP should have its own ls method that calls $ftp->{parent}->ls, then my original comment still holds. That is exactly what the_slycer was implying when he wrote, "one way around this is to write a custom ls subroutine in the Custom::FTP module."
As a side note, the solutions offered in the original thread are good ones. You should read them and try to understand them. And if you have any questions about those solutions, you should ask. It's not that I don't want you to ask questions, but just that I want to help you ask the right questions. :-)
|