Perl6::SignatureParse, query, and pretty-print Perl 6 signatures | |
Download |
Perl6::Signature Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Gaal Yahas
- Publisher web site:
- http://search.cpan.org/~gaal/
Perl6::Signature Tags
Perl6::Signature Description
Parse, query, and pretty-print Perl 6 signatures Perl6::Signature is a Perl module that models routine signatures as specified in Synopsis 6 of the Perl 6 documentation. These signatures offer a rich language for expressing type constraints, default values, and the optionality (among other things) of routine parameters.Included is a parser for the Signature language, accessors and convenience methods for querying Signature objects, and a pretty-printer for producing their canonical textual representation.SYNOPSIS use Perl6::Signature; my $sig = Perl6::Signature- >parse( ':($self: $x, Int $y = 42 where { $_ % 2 == 0 }, :$z is copy)'); print $sig- >s_requiredPositionalCount; # 1 print $sig- >s_positionalList- >- >p_label # "x" print $sig- >s_namedList- >- >p_hasAccess; # "copy" print $sig- >to_string; # ":($self: $x, Int $y = 42 where { $_ % 2 == 0 }, :$z is copy)" Requirements: · Perl
Perl6::Signature Related Software