Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Teaching Perl For Fun    and Advocacy       By John Napiorkowski,   Sponsored by Shutterstock, LLC           Copyright 2012
Images Courtesy of   Shutterstockhttp://www.shutterstock.com/jobs.mhtml
With Thanks ToGeneral Assembly   http://generalassemb.ly/
http://www.onyxneon.com/books/modern_perl/index.html
What Sucks About      Perl?
Line Noise /                                 Write Only          Ugly  Only good for Scripts                              ...
For me, Inspiration is   helping someone construct their own  version of the idea,which is appropriate to    their needs a...
my $first_class = Perl->o_fun
One Liner Example$perl -MModern::Perl -ne say "Hello ". $_JohnHello John
Step By Step• Command Interpreter• Switches• Code• STDIN/OUT• Implicit Arguments
As A Script #!/usr/bin/env perluse Modern::Perl;say "Hello ". shift;
$ perl myscript.pl JohnHello John
A Reusable Objectpackage HelloName;use Moose;has name => (is=> "ro", required=>1);sub hello {  my ($self) = @_;  return "H...
Using Your Object #!/usr/bin/env perluse Modern::Perl;use HelloName;my $obj = HelloName->new(name=>shift);say $obj->hello;
$ perl myscript2.pl JohnHello John
Testing  use HelloName;use Test::Most;my $obj = HelloName->new(name=>John);is $obj->name, John;is $obj->hello, Hello John;...
$ prove -v hello-name.thello-name.t ..ok 1ok 21..2okAll tests successful.Files=1, Tests=2, 0 wallclock secsResult: PASS
As a Website  use Modern::Perl;use HelloName;my $obj = HelloName->new( name =>  $ENV{HelloName_name} );my $app = sub {   r...
$ HelloName_name=John plackup app.psgiHTTP::Server::PSGI: Accepting connectionsat http://0:5000/
perldoc plackup
A Running Website!
How To Learn More•   Modern Perl book•   Task::Kensho•   perl.org•   Books (Catalyst Book)•   IRC and Mailing lists
Classes 2 - 8•   Perl: History, ecosystem, community and installing.•   More Perl than I got paid to know at my first job.•...
(Guest Lecture on Task::Kensho)++
APEIRON++
GeneralAssembly::Guestbookhttps://github.com/jjn1056/GeneralAssembly-Guestbook
“Perl was always  designed to be an Evolving Language”- Larry Wall, Original Perl Language Designer
Student Feedback•   Liked implicit arguments and return values.•   Neutral on syntax and $@%*.•   Appreciation for cpanm, ...
Stumbled a bit on installing Perl and CPAN modules, anda bit of trouble understanding local::lib.
Jury out on documentation and learning tools
The First Class is    Great :)
The Second Class   should have beenfocused exclusively on     Installing Perl
“More Perl than I got paid to know at my first job.”     Maybe next time use an old script as an example?
Make Better Use of Social Media
Guest Lecturer was a good idea
(system Perl)--
Paper Handouts /  Take-aways?
http://www.shutterstock.com/jobs.mhtml
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
Yapc2012
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
Moose
Next
Upcoming SlideShare
Moose
Next
Download to read offline and view in fullscreen.

Share

Yapc2012

Download to read offline

An overview of stuff I learned teaching perl last year, and what I might do differently if I did it again in the future

Related Books

Free with a 30 day trial from Scribd

See all

Yapc2012

  1. 1. Teaching Perl For Fun and Advocacy By John Napiorkowski, Sponsored by Shutterstock, LLC Copyright 2012
  2. 2. Images Courtesy of Shutterstockhttp://www.shutterstock.com/jobs.mhtml
  3. 3. With Thanks ToGeneral Assembly http://generalassemb.ly/
  4. 4. http://www.onyxneon.com/books/modern_perl/index.html
  5. 5. What Sucks About Perl?
  6. 6. Line Noise / Write Only Ugly Only good for Scripts There are BetterNot Modern Options Fine for Text ProcessingPerl Is Dead Hard To Learn Terrible Docs CPAN is Busted!
  7. 7. For me, Inspiration is helping someone construct their own version of the idea,which is appropriate to their needs and conceptual context.
  8. 8. my $first_class = Perl->o_fun
  9. 9. One Liner Example$perl -MModern::Perl -ne say "Hello ". $_JohnHello John
  10. 10. Step By Step• Command Interpreter• Switches• Code• STDIN/OUT• Implicit Arguments
  11. 11. As A Script #!/usr/bin/env perluse Modern::Perl;say "Hello ". shift;
  12. 12. $ perl myscript.pl JohnHello John
  13. 13. A Reusable Objectpackage HelloName;use Moose;has name => (is=> "ro", required=>1);sub hello { my ($self) = @_; return "Hello ".$self->name;}1;
  14. 14. Using Your Object #!/usr/bin/env perluse Modern::Perl;use HelloName;my $obj = HelloName->new(name=>shift);say $obj->hello;
  15. 15. $ perl myscript2.pl JohnHello John
  16. 16. Testing use HelloName;use Test::Most;my $obj = HelloName->new(name=>John);is $obj->name, John;is $obj->hello, Hello John;done_testing;
  17. 17. $ prove -v hello-name.thello-name.t ..ok 1ok 21..2okAll tests successful.Files=1, Tests=2, 0 wallclock secsResult: PASS
  18. 18. As a Website use Modern::Perl;use HelloName;my $obj = HelloName->new( name => $ENV{HelloName_name} );my $app = sub { return [ 200 => [ "Content-Type" => "text/plain"], [ $obj->hello ], ];};
  19. 19. $ HelloName_name=John plackup app.psgiHTTP::Server::PSGI: Accepting connectionsat http://0:5000/
  20. 20. perldoc plackup
  21. 21. A Running Website!
  22. 22. How To Learn More• Modern Perl book• Task::Kensho• perl.org• Books (Catalyst Book)• IRC and Mailing lists
  23. 23. Classes 2 - 8• Perl: History, ecosystem, community and installing.• More Perl than I got paid to know at my first job.• Creating your first Perl Application and following community standards.• Perl: Review idioms and common solutions.• Objects: Moose, strategies for reusability.• Working: Building the Guestbook Application• Summary: Review, things to avoid, where to go next.
  24. 24. (Guest Lecture on Task::Kensho)++
  25. 25. APEIRON++
  26. 26. GeneralAssembly::Guestbookhttps://github.com/jjn1056/GeneralAssembly-Guestbook
  27. 27. “Perl was always designed to be an Evolving Language”- Larry Wall, Original Perl Language Designer
  28. 28. Student Feedback• Liked implicit arguments and return values.• Neutral on syntax and $@%*.• Appreciation for cpanm, local::lib, perlbrew.• Plack is a hit...• ...and so was Moose!
  29. 29. Stumbled a bit on installing Perl and CPAN modules, anda bit of trouble understanding local::lib.
  30. 30. Jury out on documentation and learning tools
  31. 31. The First Class is Great :)
  32. 32. The Second Class should have beenfocused exclusively on Installing Perl
  33. 33. “More Perl than I got paid to know at my first job.” Maybe next time use an old script as an example?
  34. 34. Make Better Use of Social Media
  35. 35. Guest Lecturer was a good idea
  36. 36. (system Perl)--
  37. 37. Paper Handouts / Take-aways?
  38. 38. http://www.shutterstock.com/jobs.mhtml
  • Chankey007

    Jun. 24, 2014

An overview of stuff I learned teaching perl last year, and what I might do differently if I did it again in the future

Views

Total views

1,494

On Slideshare

0

From embeds

0

Number of embeds

9

Actions

Downloads

6

Shares

0

Comments

0

Likes

1

×