[Israel.pm] Re: callbacks during FTP
Shlomi Fish
shlomif at iglu.org.il
Wed Feb 4 22:10:11 PST 2004
On Wednesday 04 February 2004 23:23, Yehuda Berlinger wrote:
> For the life of me, I can't figure out why there is no call back in
> Net::FTP's get and put functions.
>
> I created a subclass of Net::FTP, copied over the get and put
> functions and added a callback argument and a single line:
>
> &{$cb}($buf,$len) if ref $cb eq 'CODE';
>
> to both functions and it works great.
>
Hmmm... Object Oriented Programming Abused. ;-)
This reminds me that when customizing DocBook/XML, you sometimes need to copy
the entire function (or template as it is called in XSL). Then, you have to
make a minor change there. So instead of making sure the stylesheets
themselves have this option somewhere, you need to create duplicate code.
Well, at least the internals of the stylesheets are very stable, but it still
has a bad taste in the mouth.
Regards,
Shlomi Fish
--
---------------------------------------------------------------------
Shlomi Fish shlomif at iglu.org.il
Homepage: http://t2.technion.ac.il/~shlomif/
I don't believe in fairies. Oops! A fairy died.
I don't believe in fairies. Oops! Another fairy died.
More information about the Perl
mailing list