develooper Front page | perl.perl5.porters | Postings from January 2003

[perl #20557] Bug in Sys::Syslog in perl 5.8.0

Paul Schmidt
January 27, 2003 07:27
[perl #20557] Bug in Sys::Syslog in perl 5.8.0
Message ID:
# New Ticket Created by  Paul Schmidt 
# Please include the string:  [perl #20557]
# in the subject line of all future correspondence about this issue. 
# <URL: >

If this is the wrong place for this report I apologize.  Please point me
at the correct destination and I will forward this accordingly.

In the Sys::Syslog::syslog that's bundled with 5.8.0 around line 277
there's a spurious or more likely, a misplaced "&connect unless
$connnected;".  Since it appears before the sub is finished parsing all
it's parameters it breaks the %m/$! functionality by resetting $!.

So it either needs to be moved after the line:

	$message = sprintf($mask, @_);


local($errno) = $!;

needs to be added at the beginnning of the function and

	$mask =~ s/%m/$!/g;

needs to be changed to

	$mask =~ s/%m/$errno/g;

Thanx for all the work you all put into making perl the treasure it
is.  Hope this helps.

Paul R. Schmidt Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About