I am not an expert on these issues - but I remember something about
apache.pm not handling the $/ for readline correctly.  You can check the
archives
by searching for readline.  When you are using the class object call you
are
using a different readline implementation that is working correctly.

You could probably either call readline via the class method,
or just read the entire file into an array instead of a scalar - depending
on what you were going to do with it next.

cliff rayman
genwax.com

"Francis J. Lacoste" wrote:

> Hi,
>
> I've run into into a very peculiar problem using HTML::Embperl 1.2.0
> with
> apache 1.3.6 and mod_perl 1.21.
>
> I'm using a tied file handle in an embperl page :
>
> <html>
>  <head>
>   <title>Test</title>
>  </head>
>  <body>
>   [-
>   use GnuPG::Tie::Encrypt;
>
>   tie *GNUPG, 'GnuPG::Tie::Encrypt', gnupg_path => '/usr/bin/gpg',
>                                      armor => 1, recipient => 'Francis'
>   or die "Error tying variable\n";
>   print GNUPG "Hello world\n";
>   local $/ = undef;
>   $text = <GNUPG>;
>   close GNUPG;
>   untie *GNUPG;
>   -]
>
>   <pre>[+ $text +]</pre>
>  </body>
> </html>
>
> The line $text = <GNUPG> is somehow a noop. The call to the
> underlying READLINE implementation is never made. (I know I have
> a print STDERR at the beginning of the method.)
>
> The same thing happen if I use the line
>
> $text = readline GNUPG;
>
> But if I use :
>
> $text = (tied *GNUPG)->READLINE;
>
> it works fine.
>
> If I modify the previous snippets to run as a plain mod_perl handler,
> everythings
> works as expected.
>
> Any ideas what may be causing the problem ?
>
> Thanks for your insights.
>
> --
> Francis J. Lacoste                   iNsu Innovations Inc.
> Vice-Président développement          Tél.: (514) 336-5544
> [EMAIL PROTECTED]              Fax.: (514) 336-8128

Reply via email to