Skip Menu |
 

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 48386
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.29



Subject: Failing test on Win32 when installing without Win32::EventLog
Hi, If you try to install Sys::Syslog (tested with 0.27) on a Win32 box without Win32::EventLog you will get the following error during syslog.t: # Failed test 'no warnings' # at C:/STRAWB~1/perl/site/lib/Test/NoWarnings.pm line 45. # There were 1 warning(s) # Previous test 0 '' # Warning: something's wrong at C:\strawberry\cpan\build\Sys-Syslog-0.27-pigLok\blib\lib/Sys/Syslog.pm line 124. # at C:\strawberry\cpan\build\Sys-Syslog-0.27-pigLok\blib\lib/Sys/Syslog.pm line 124 # require Sys/Syslog.pm called at (eval 10) line 2 # main::BEGIN() called at C:\strawberry\cpan\build\Sys-Syslog-0.27-pigLok\blib\lib/Sys/Syslog.pm line 0 # eval {...} called at C:\strawberry\cpan\build\Sys-Syslog-0.27-pigLok\blib\lib/Sys/Syslog.pm line 0 # eval 'package main; # use Sys::Syslog @{$args[0]}; # 1; # # ;' called at C:/STRAWB~1/perl/lib/Test/More.pm line 805 # Test::More::_eval('package main;\x{a}use Sys::Syslog @{$args[0]};\x{a}1;\x{a}', 'ARRAY(0xaf993c)') called at C:/STRAWB~1/perl/lib/Test/More.pm line 780 # Test::More::use_ok('Sys::Syslog', ':standard', ':extended', ':macros') called at t/syslog.t line 48 # # Looks like you failed 1 test of 216. t/syslog.t ........... The problem is in this part of Syslog.pm: ... my $is_Win32 = $^O =~ /Win32/i; if (can_load("Sys::Syslog::Win32")) { unshift @connectMethods, 'eventlog'; } elsif ($is_Win32) { warn $@; } ... It is not a good idea to do "warn $@;" (in case we have not Win32::EventLog) and at the same time to have a "no warning" test in syslog.t - it is obvious that it has to fail. The possible fixes: 1) remove 'warn $@;' 2) replace 'warn $@;' with 'print STDERR "WARNING: Win32::EventLog not present, Sys::Syslog functionality will be limited\n";' 3) skip no warning test in syslog.t if on Win32 and without Win32::EventLog 4) require Win32::EventLog as a prerequisite on Win32 system The issue is quite annoying if Sys::Syslog is somewhere in dependency chain of another module that wont install smoothly due to this bug. Thanks for any feedback to this RT. -- kmx
Download (untitled) / with headers
text/plain 789b
Some additional observations : a) the problem is specific to Strawberry Perl, because on ActiveState, Win32::EventLog is pre-installed by default. b) function Syslog::connect_eventlog() relies on Sys::Syslog::Win32 ... but this module is only generated and installed when Win32::EventLog is present c) the notice about absence of Win32::EventLog in Makefile.PL (lines 57-63) is obsolete, because old libwin32 distribution is now split into separate modules. d) because of that splitting, Win32::EventLog can now be installed on its own, without all other Win32 modules, so that would be a lightweight dependency. So my conclusion is that the easy way to solve installation problems on Strawberry Perl would simply be to make Win32::EventLog a mandatory dependency on Win32 systems.
Subject: Re: [rt.cpan.org #48386] Failing test on Win32 when installing without Win32::EventLog
Date: Mon, 14 Sep 2009 02:03:25 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 246b
Show quoted text
> So my conclusion is that the easy way to solve installation problems on > Strawberry Perl would simply be to make Win32::EventLog a mandatory > dependency on Win32 systems. >
I agree, that will work and will be quite easy to patch. -- kmx
Hi, may I ask you when do you approximately plan to do the next release? Thanks. -- kmx
Subject: Re: [rt.cpan.org #48386] Failing test on Win32 when installing without Win32::EventLog
Date: Mon, 18 Apr 2011 16:22:26 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 284b
With deep apologies for the delay, Makefile.PL has been modified according to your recommandations. Release 0.29 of Sys::Syslog was just uploaded on the CPAN, sponsored by the Perl QA Hackathon 2011 in Amsterdam. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.