Skip to content

Commit

Permalink
test that optional params really are optional
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Ragwitz <rafl@debian.org>
  • Loading branch information
rhesa authored and rafl committed Mar 1, 2009
1 parent 260557b commit 0aad982
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/sigs-optional.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use strict;
use warnings;
use Test::More tests => 2;

{
package Optional;
use MooseX::Method::Signatures;
method foo ($class: $arg?) {
$arg;
}
}

is( Optional->foo(), undef);
is( Optional->foo(1), 1);

0 comments on commit 0aad982

Please sign in to comment.