Help for this page

Select Code to Download


  1. or download this
    package Person;
    use Moo;
    ...
    has age  => (is => 'rw', isa => Int->where(q{ $_ > 0 }));
     
    1;
    
  2. or download this
    package Person;
    use Moo;
    ...
    has age  => (is => 'rw', isa => PositiveInt);
     
    1;
    
  3. or download this
    package Person;
    use Moo;
    ...
    has age  => (is => 'rw', isa => IntRange[0,200]);  # 200 is a realisti
    +c age limit
     
    1;