Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Patch: Apache2::Reload & tied filedhandles

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


richter at ecos

Nov 4, 2005, 7:49 AM

Post #1 of 6 (1437 views)
Permalink
Patch: Apache2::Reload & tied filedhandles

Hi,

I have some trouble with using Apache2::Reload on a packages that has a tied
filehandle.

I get an error message that FILENO is not implemented by this package.

I have made the attached patch, which simply wraps the try to close the file
into an eval and ignores the error. With this patch it works without any
problems for me.

Gerald



---------------------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter [at] ecos Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
---------------------------------------------------------------------------
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------





** Virus checked by BB-5000 Mailfilter **
Attachments: unload.patch (0.56 KB)


gozer at ectoplasm

Nov 7, 2005, 1:24 PM

Post #2 of 6 (1393 views)
Permalink
Re: Patch: Apache2::Reload & tied filedhandles [In reply to]

Gerald Richter wrote:
> Hi,
>
> I have some trouble with using Apache2::Reload on a packages that has a tied
> filehandle.
>
> I get an error message that FILENO is not implemented by this package.
>
> I have made the attached patch, which simply wraps the try to close the file
> into an eval and ignores the error. With this patch it works without any
> problems for me.

There has been a change to ModPerl::Util recently in svn that should also
make your problem go away. Try latest SVN and see if it works.

--
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Attachments: signature.asc (0.25 KB)


gozer at ectoplasm

Nov 7, 2005, 2:47 PM

Post #3 of 6 (1382 views)
Permalink
Re: Patch: Apache2::Reload & tied filedhandles [In reply to]

Philippe M. Chiasson wrote:
> Gerald Richter wrote:
>
>>Hi,
>>
>>I have some trouble with using Apache2::Reload on a packages that has a tied
>>filehandle.
>>
>>I get an error message that FILENO is not implemented by this package.
>>
>>I have made the attached patch, which simply wraps the try to close the file
>>into an eval and ignores the error. With this patch it works without any
>>problems for me.
>
> There has been a change to ModPerl::Util recently in svn that should also
> make your problem go away. Try latest SVN and see if it works.

Actually, I have to learn to use svn diff before opening my mouth. I was
talking about a yet to be checked-in change.

Your patch looks good, and I've checked in a slightly different version. Latest
SVN should fix your problem now.

--
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Attachments: signature.asc (0.25 KB)


richter at ecos

Nov 9, 2005, 12:54 PM

Post #4 of 6 (1402 views)
Permalink
RE: Patch: Apache2::Reload & tied filedhandles [In reply to]

Hi,
>
> Your patch looks good, and I've checked in a slightly
> different version. Latest SVN should fix your problem now.
>

My patch contained a

$@ = '' ;

to avoid problems when an error occurs and some other code checks $@ later
on, in which case it might see this error also it shouldn't see it. What do
you think?

Gerald




** Virus checked by BB-5000 Mailfilter **


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


gozer at ectoplasm

Nov 9, 2005, 2:36 PM

Post #5 of 6 (1398 views)
Permalink
Re: Patch: Apache2::Reload & tied filedhandles [In reply to]

Gerald Richter wrote:
> Hi,
>
>>Your patch looks good, and I've checked in a slightly
>>different version. Latest SVN should fix your problem now.
>
> My patch contained a
>
> $@ = '' ;
>
> to avoid problems when an error occurs and some other code checks $@ later
> on, in which case it might see this error also it shouldn't see it. What do
> you think?

Fixed with 'local $@', a better approach when using eval {}; anyways.

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Attachments: signature.asc (0.25 KB)


richter at ecos

Nov 9, 2005, 8:40 PM

Post #6 of 6 (1368 views)
Permalink
RE: Patch: Apache2::Reload & tied filedhandles [In reply to]

Hi,

>
> Fixed with 'local $@', a better approach when using eval {}; anyways.
>

That sounds good!

Gerald




** Virus checked by BB-5000 Mailfilter **


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.