Skip to content

Commit

Permalink
.arity and .count ignore nameds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 26, 2011
1 parent 77fde07 commit fc90fd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions S06-signature/arity.t
Expand Up @@ -30,12 +30,12 @@ is &a_four.count, 4, '4 count &foo';
is &o_zero.arity, 0, 'arity 0 sub with optional params';
is &o_one.arity, 1, 'arity 1 sub with optional params';
#?niecza skip 'ASK JNTHN: arity ought to ignore named-only params, no?'
is &o_two.arity, 2, 'arity with optional and required named params';
is &o_two.arity, 1, 'arity with optional and required named params';

is &o_zero.count, 2, 'count on sub with optional params';
#?niecza 2 skip 'as above'
is &o_one.count, 2, 'count on sub with optional params';
is &o_two.count, 3, 'count on sub with optional and required named params';
is &o_one.count, 1, 'count on sub with optional params';
is &o_two.count, 1, 'count on sub with optional and required named params';

{
sub b_zero () { };
Expand Down
6 changes: 3 additions & 3 deletions packages/S11-modules/Foo.pm
Expand Up @@ -6,6 +6,6 @@ sub bar is export(:DEFAULT, :others) { 'Foo::bar' } # :DEFAULT, :ALL, :others
sub baz is export(:MANDATORY) { 'Foo::baz' } # (always exported)
sub bop is export { 'Foo::bop' } # :DEFAULT, :ALL
sub qux is export(:others) { 'Foo::qux' } # :ALL, :others
multi waz() is export { 'Foo::waz' } # :ALL, :DEFAULT (implicit export)
multi gaz() is export(:others) { 'Foo::gaz1' } # :ALL, :others
multi gaz($x) is export(:others) { 'Foo::gaz2' } # :ALL, :others
multi waz() is export { 'Foo::waz' } # :ALL, :DEFAULT (implicit export)
multi gaz() is export(:others) { 'Foo::gaz1' } # :ALL, :others
multi gaz($x) is export(:others) { 'Foo::gaz2' } # :ALL, :others

0 comments on commit fc90fd1

Please sign in to comment.