Skip Menu |

This queue is for tickets about the Event CPAN distribution.

Report information
The Basics
Id: 95205
Status: resolved
Priority: 0/
Queue: Event

People
Owner: jpritikin [...] pobox.com
Requestors: andy.melnikov [...] gmail.com
Cc:
AdminCc:

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



Subject: Warning if 'after' option is present but undefined
Below is the relevant code fragment from timer.pm: my $has_at = exists $arg{at}; my $has_after = exists $arg{after}; croak "'after' and 'at' are mutually exclusive" if $has_at && $has_after; if ($has_after) { my $after = delete $arg{after}; $o->at(Event::time() + $after); $has_at=1; $o->interval($after) if !exists $arg{interval}; } elsif ($has_at) { $o->at(delete $arg{at}); } It turns out "after" key is present but the value is undefined, so I get a warning. I suggest to rewrite both $has_after and $has_at: my $has_at = exists $arg{at} and defined($arg{at}); my $has_after = exists $arg{after} and defined($arg{after});
On Wed Apr 30 07:14:25 2014, http://nponeccop.livejournal.com/ wrote: Show quoted text
> I suggest to rewrite both $has_after and $has_at: > > my $has_at = exists $arg{at} and defined($arg{at}); > my $has_after = exists $arg{after} and defined($arg{after});
Thanks for the suggestion. I applied your patch.