Skip to content

Commit

Permalink
shut up warning about constant in void context on old perls
Browse files Browse the repository at this point in the history
  • Loading branch information
apocalypse committed Apr 17, 2011
1 parent c6695f4 commit 4ebeb9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/POE/Kernel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ BEGIN {

# Second BEGIN block so that USE_TIME_HIRES is treated as a constant.
BEGIN {
# the +0 is to shut up Useless use of a constant in void context warning in certain perls :(
eval {
require Time::HiRes;
Time::HiRes->import(qw(time sleep));
} if USE_TIME_HIRES();
} if USE_TIME_HIRES() + 0;

# Set up a "constant" sub that lets the user deactivate
# automatic exception handling
Expand Down

0 comments on commit 4ebeb9f

Please sign in to comment.