Help for this page

Select Code to Download


  1. or download this
    use Types::Standard qw( Int );
    
    if ( not Int->check($var) ) {
       die "It's supposed to be an integer!\n";
    }
    
  2. or download this
    use Types::Standard qw( Int );
    
    Int->assert_valid($var);
    
  3. or download this
    use Types::Standard qw( Object Num );
    sub transfer_money {
    ...
       
       ...;
    }
    
  4. or download this
    use feature qw( state );  # enable the `state` feature from Perl 5.10+
    use Types::Standard qw( Object Num );
    ...
       
       ...;
    }
    
  5. or download this
    perl -MTypes::Standard=-all -le'print Int->inline_check(q($val))'