Aion

 view release on metacpan or  search on metacpan

lib/Aion/Types.md  view on Meta::CPAN

## Rat

Rational numbers.

```perl
"6/7" ~~ Rat     # -> 1
"-6/7" ~~ Rat    # -> 1
6 ~~ Rat         # -> 1
"inf" ~~ Rat     # -> 1
"+Inf" ~~ Rat    # -> 1
"NaN" ~~ Rat     # -> 1
"-nan" ~~ Rat    # -> 1
6.5 ~~ Rat       # -> 1
"6.5 " ~~ Rat    # -> ''
```

## Num

The numbers.

```perl

lib/Aion/Types.pm  view on Meta::CPAN


use Aion::Type;
use Attribute::Handlers;
use List::Util qw/all any/;
use Exporter qw/import/;
use Scalar::Util qw/looks_like_number reftype blessed/;
use Sub::Util qw/prototype set_prototype subname set_subname/;

require Exporter;
our @EXPORT = our @EXPORT_OK = grep {
	*{$Aion::Types::{$_}}{CODE}	&& !/^(_|(NaN|import|all|any|looks_like_number|reftype|blessed|prototype|set_prototype|subname set_subname)\z)/n
} keys %Aion::Types::;

sub UNIVERSAL::Isa : ATTR(CODE) {
    my ($pkg, $symbol, $referent, $attr, $data, $phase, $file, $line) = @_;
    my $args_of_meth = "Arguments of method `" . *{$symbol}{NAME} . "`";
    my $returns_of_meth = "Returns of method `" . *{$symbol}{NAME} . "`";
    my $return_of_meth = "Return of method `" . *{$symbol}{NAME} . "`";

	my @signature = map { ref($_)? $_: $pkg->can($_)->() } @$data;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.656 second using v1.00-cache-2.02-grep-82fe00e-cpan-72ae3ad1e6da )