Modern Perl

2,778 views

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,778
On SlideShare
0
From Embeds
0
Number of Embeds
154
Actions
Shares
0
Downloads
35
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Modern Perl

  1. 1. Modern Perl
  2. 2. “the world's best and most effective Perl programmers take full advantage of the CPAN to make up for missing language features, to improve their productivity, and because solving a problem once and for all and sharing it is the ultimate expression of laziness, impatience, and hubris” - chromatic
  3. 3. Perl: The Foundation
  4. 4. CPAN: The Framework
  5. 5. 15,000+ Modules
  6. 6. 7,000+ Authors
  7. 7. ~50 Uploads a Day
  8. 8. 201 Mirrors
  9. 9. Massive.
  10. 10. Standard OO Perl:
  11. 11. package Person; sub new { my ($class, %args) = @_; die(„Name is required‟) if !$args{name}; die(„Name must be a string‟) if ref $args{name}; return bless %args, $class; } sub hello { my ($self) = @_; print „Hi, my name is, „ . $self->{name} . “n”; }
  12. 12. Modern OO Perl:
  13. 13. package Person; use Moose; use MooseX::Method::Signature; has „name‟ => ( is => ‟rw‟, isa => ‟Str‟, required => 1, ); method hello { say „Hi, my name is, „ . $self->name(); }
  14. 14. Modern Perl Code is
  15. 15. Concise
  16. 16. Robust
  17. 17. Maintainable
  18. 18. Agile
  19. 19. CPAN.
  20. 20. Knowing Perl is not Syntax
  21. 21. Know your Tools
  22. 22. Know CPAN
  23. 23. Be Involved
  24. 24. The Short List
  25. 25. use strict; use warnings; use autodie;
  26. 26. List::Utils List::MoreUtils IO::File IO::Dir Sub::Name Sub::Exporter IPC::Cmd DateTime
  27. 27. DBIx::Class Rose::DB CGI::Application Catalyst HTTP::Engine POE
  28. 28. Test::More Test::Exception Test::Data Test::Warn
  29. 29. Moose MooseX::Method::Signature MooseX::Declare MooseX::MultiMethods MooseX::Types MooseX::Getopt Mouse
  30. 30. Perl 5.10
  31. 31. More Reading • http://www.modernperlbooks.com/mt/ • http://www.enlightenedperl.org/ • http://blog.timbunce.org/ • irc.perl.org #moose, #dbix-class, #catalyst, etc

×