Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Recap: The Future of Perl 5

by Ovid (Cardinal)
on Aug 23, 2018 at 13:03 UTC ( [id://1220917]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fib {
      my $nth = shift;
      return $nth if $nth <= 1;
      return fib( $nth - 1 ) + fib( $nth - 2 );
    }
    
  2. or download this
    sub fib {
      croak("…")  if @_ != 1;
    ...
      return $nth if $nth <= 1;
      return fib( $nth - 1 ) + fib( $nth - 2 );
    }
    
  3. or download this
    sub fib(UInt $nth) {
      return $nth if $nth <= 1;
      return fib( $nth - 1 ) + fib( $nth - 2 )
    }
    
  4. or download this
    class Point
        attr_accessor :x
    ...
            return Point.new @y, @x
        end
    end
    
  5. or download this
    class Point {
      public $x, $y;
    ...
      }
    
    }
    
  6. or download this
    class Point:
        def __init__(self, x, y):
    ...
    
        def inverted(self):
            return Point(self.y,self.x)
    
  7. or download this
    package Point;
    use Carp 'croak';
    ...
    }
    
    1;
    
  8. or download this
    class Point {
        has Num ($x, $y);
    ...
            return Point->new( x => $y, y => $x );
        }
    }
    
  9. or download this
    class Cache::LRU {
        use Hash::Ordered;
    ...
            return $x->set( $key, $x->delete($key) );
        }
    }
    
  10. or download this
    package Cache::LRU {
        use Hash::Ordered;
    ...
    
        __PACKAGE__->meta->make_immutable;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1220917]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-16 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found