Permalink
Browse files

Make on_success absence not ignored

Not sure, if this is a good thing after all, I can't remember
why I made this required in the first place
  • Loading branch information...
1 parent 6227092 commit 99275f20cc1b6c52484f7c288d6d0fb01c07f2de @yannk committed Sep 16, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Net/AppNotifications.pm
@@ -67,8 +67,11 @@ sub send {
my $early_error = $cbs{on_error} || sub { croak "$_[0]" };
- my $on_success = $param{on_success}
- or $early_error->("On success must be passed");
+ my $on_success = $param{on_success};
+ unless ($on_success) {
+ $early_error->("On success must be passed");
+ return;
+ }
## callback definitions
$cbs{on_posted} = sub {

0 comments on commit 99275f2

Please sign in to comment.