Guest User

Untitled

a guest
Dec 9th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. ┌─[tadzik@yavin4]─[~]
  2. └─[%]─> cat foo.pl
  3. use feature 'say';
  4.  
  5. package Foo {
  6. use Moo;
  7. has 'a', is => 'ro';
  8. }
  9.  
  10. package Bar {
  11. use Moo;
  12. has 'b', is => 'ro';
  13. }
  14.  
  15. say Foo->new(a => 7)->a;
  16. say Bar->new(b => 3)->b;
  17. ┌─[tadzik@yavin4]─[~]
  18. └─[%]─> time perl foo.pl
  19. 7
  20. 3
  21. perl foo.pl 0.05s user 0.00s system 95% cpu 0.054 total
Add Comment
Please, Sign In to add comment