in reply to Formatted Output on glob-filehandles
From the code in Mail::Mailer I would expect a Mail::Mailer::smtp::pipe object anyway try to define the WRITE method like this:
{ package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; print $fh substr($_[1],0,$_[2]) } } # taken from Tie::Handle or { package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; $fh->PRINT(substr($_[1],0,$_[2])) } } or maybe { package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; $fh->format_write(substr($_[1],0,$_[2])) } }
Of course if the glob really is Mail::Mailer::smtp define the function there :-)
If this doesn't help (this is just a wild guess!) try to use Devel::TraceSubs to see what functions are called with what parameters.
Jenda
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Formatted Output on glob-filehandles
by theqblas (Initiate) on Oct 24, 2002 at 21:37 UTC |