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.
Modern Perl for the
Unfrozen Paleolithic
Perl Programmer
John SJ Anderson ⭐︎ Infinity Interactive ⭐︎ @genehack
Pittsburgh ...
I'M JUST A CAVEMAN
DERN PERL FRIGHTENS AND CON
Quite a few
things have
changed...
...but many
haven't
You're just in time
for the Perl6
release party
We're still
using Perl5!
Many
language
improvements
defined($this) ? $this : $that
defined-or
$this // $that
defined-or
subroutine
signatures
sub add ($one, $two) {
return $one + $two;
}
new tools
"system" perl:
"system" perl:
just say no
/usr/bin/perl
/usr/bin/perl
perlbrew.pl
https://github.com/tokuhirom/plenv
advantages
• Solves "vendor Perl lockin" issues
• Install multiple Perls in your home directory
• ... or elsewhere
• Trivi...
plenv > perlbrew
• Less magic messing around with PATH
• Can "pin" Perl different ways: globally, per-shell, or
per-direct...
perlbrew > plenv
• Kickass website
ing of installing in your $H
local::lib
local::lib
• Install your own copies of modules
• In your $HOME (so no special permissions needed)
• Can also install per-...
speaking of installing stuff…
cpanminus
cpanm
% cpan Git::Wrapper
CPAN: Storable loaded ok (v2.54)
Reading '/Users/genehack/.cpan/Metadata'
Database was generated on Sa...
GENEHACK/Git-Wrapper-0.045.tar.gz
[17/1516]
/opt/plenv/versions/5.23.2/bin/perl5.23.2 Makefile.PL -- OK
Running make for G...
(still not done
but I got tired
of pasting.)
% cpanm Git::Wrapper
--> Working on Git::Wrapper
Fetching http://www.cpan.org/authors/id/G/GE/GENEHACK/Git-Wrapper-0.045.t...
speaking of stuff on CPAN…
https://metacpan.org/
search.cpan.org
https://metacpan.org/
https://metacpan.org/
https://github.com/CPAN-API/metacpan-web
Duck Duck Go
Duck Duck Go
speaking of modules...
JSON::MaybeXS
CGI.pm
is
gone
(not really)
speaking of Perl websites…
http://cpanratings.perl.org/
http://cpanratings.perl.org/
https://metacpan.org/
http://cpants.cpanauthors.org/
http://cpants.cpanauthors.org/
https://metacpan.org/
http://prepan.org/
g of staying up to date on Perl
http://perlweekly.com/
http://blogs.perl.org/users/sawyer_x/
speaking of
retrospectives…
questions?
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Modern Perl for the Unfrozen Paleolithic  Perl Programmer
Upcoming SlideShare
Loading in …5
×

Modern Perl for the Unfrozen Paleolithic Perl Programmer

3,131 views

Published on

Hello, unfrozen Paleolithic Perl programmers! Welcome to 2015!

First, let’s start with the good news: yes, we’re still programming in Perl5 in 2015 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate "Big Giant Hole in Ice" incident, will likely still work just fine on the current release of Perl5 -- even if you originally wrote it against Perl 4 or even Perl 3.

Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!

But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!

Published in: Internet

Modern Perl for the Unfrozen Paleolithic Perl Programmer

  1. 1. Modern Perl for the Unfrozen Paleolithic Perl Programmer John SJ Anderson ⭐︎ Infinity Interactive ⭐︎ @genehack Pittsburgh Perl Workshop 2015 ⭐︎ 11 Oct 2015
  2. 2. I'M JUST A CAVEMAN DERN PERL FRIGHTENS AND CON
  3. 3. Quite a few things have changed...
  4. 4. ...but many haven't
  5. 5. You're just in time for the Perl6 release party
  6. 6. We're still using Perl5!
  7. 7. Many language improvements
  8. 8. defined($this) ? $this : $that defined-or
  9. 9. $this // $that defined-or
  10. 10. subroutine signatures
  11. 11. sub add ($one, $two) { return $one + $two; }
  12. 12. new tools
  13. 13. "system" perl:
  14. 14. "system" perl: just say no
  15. 15. /usr/bin/perl
  16. 16. /usr/bin/perl
  17. 17. perlbrew.pl
  18. 18. https://github.com/tokuhirom/plenv
  19. 19. advantages • Solves "vendor Perl lockin" issues • Install multiple Perls in your home directory • ... or elsewhere • Trivially switch from Perl version to Perl version • Able to install modules without special permissions • Easy to stay up to date with Perl development
  20. 20. plenv > perlbrew • Less magic messing around with PATH • Can "pin" Perl different ways: globally, per-shell, or per-directory
  21. 21. perlbrew > plenv • Kickass website
  22. 22. ing of installing in your $H
  23. 23. local::lib
  24. 24. local::lib • Install your own copies of modules • In your $HOME (so no special permissions needed) • Can also install per-project modules • Integrates well with other tools
  25. 25. speaking of installing stuff…
  26. 26. cpanminus cpanm
  27. 27. % cpan Git::Wrapper CPAN: Storable loaded ok (v2.54) Reading '/Users/genehack/.cpan/Metadata' Database was generated on Sat, 10 Oct 2015 01:17:02 GMT Running install for module 'Git::Wrapper' CPAN: LWP::UserAgent loaded ok (v6.13) Fetching with LWP: http://cpan.schatt.com/authors/id/G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz CPAN: YAML loaded ok (v1.15) CPAN: Digest::SHA loaded ok (v5.95) Fetching with LWP: http://cpan.schatt.com/authors/id/G/GE/GENEHACK/CHECKSUMS CPAN: Compress::Zlib loaded ok (v2.068) Checksum for /Users/genehack/.cpan/sources/authors/id/G/GE/GENEHACK/Git-Wrapper- 0.045.tar.gz ok tmp-47326 for tmp-47326: No such file or directory at /opt/plenv/versions/5.23.2/lib/perl5/5.23.2/CPAN/Distribution .pm line 468. CPAN: File::Temp loaded ok (v0.2304) CPAN: CPAN::Meta::Requirements loaded ok (v2.133) CPAN: Parse::CPAN::Meta loaded ok (v1.4417) CPAN: CPAN::Meta loaded ok (v2.150005) CPAN: Module::CoreList loaded ok (v5.20150820) Configuring G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz with Makefile.PL Locating bin:git... found at /opt/git/bin/git. Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Git::Wrapper Writing MYMETA.yml and MYMETA.json
  28. 28. GENEHACK/Git-Wrapper-0.045.tar.gz [17/1516] /opt/plenv/versions/5.23.2/bin/perl5.23.2 Makefile.PL -- OK Running make for G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz cp lib/Git/Wrapper/File/RawModification.pm blib/lib/Git/Wrapper/File/RawModification.pm cp lib/Git/Wrapper.pm blib/lib/Git/Wrapper.pm cp lib/Git/Wrapper/Statuses.pm blib/lib/Git/Wrapper/Statuses.pm cp lib/Git/Wrapper/Exception.pm blib/lib/Git/Wrapper/Exception.pm cp lib/Git/Wrapper/Log.pm blib/lib/Git/Wrapper/Log.pm cp lib/Git/Wrapper/Status.pm blib/lib/Git/Wrapper/Status.pm Manifying 6 pod documents GENEHACK/Git-Wrapper-0.045.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/opt/plenv/versions/5.23.2/bin/perl5.23.2" "-MExtUtils::Command::MM" "- MTest::Harness" "-e" "und ef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ............... 1/6 # Testing Git::Wrapper 0.045 t/00-load.t ............... ok t/author-err.t ............ skipped: these tests are for testing by the author t/basic.t ................. # Testing git version: 2.5.2 t/basic.t ................. ok t/git_binary.t ............ ok t/parse_args.t ............ ok t/path_class.t ............ # Testing git version: 2.5.2 t/path_class.t ............ ok t/release-pod-coverage.t .. skipped: these tests are for release candidate testing t/release-pod-syntax.t .... skipped: these tests are for release candidate testing All tests successful. Files=8, Tests=67, 1 wallclock secs ( 0.04 usr 0.02 sys + 0.39 cusr 0.31 csys = 0.76 CPU) Result: PASS GENEHACK/Git-Wrapper-0.045.tar.gz
  29. 29. (still not done but I got tired of pasting.)
  30. 30. % cpanm Git::Wrapper --> Working on Git::Wrapper Fetching http://www.cpan.org/authors/id/G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz ... OK Configuring Git-Wrapper-0.045 ... OK Building and testing Git-Wrapper-0.045 ... OK Successfully installed Git-Wrapper-0.045
  31. 31. speaking of stuff on CPAN…
  32. 32. https://metacpan.org/
  33. 33. search.cpan.org
  34. 34. https://metacpan.org/
  35. 35. https://metacpan.org/
  36. 36. https://github.com/CPAN-API/metacpan-web
  37. 37. Duck Duck Go
  38. 38. Duck Duck Go
  39. 39. speaking of modules...
  40. 40. JSON::MaybeXS
  41. 41. CGI.pm is gone
  42. 42. (not really)
  43. 43. speaking of Perl websites…
  44. 44. http://cpanratings.perl.org/
  45. 45. http://cpanratings.perl.org/
  46. 46. https://metacpan.org/
  47. 47. http://cpants.cpanauthors.org/
  48. 48. http://cpants.cpanauthors.org/
  49. 49. https://metacpan.org/
  50. 50. http://prepan.org/
  51. 51. g of staying up to date on Perl
  52. 52. http://perlweekly.com/
  53. 53. http://blogs.perl.org/users/sawyer_x/
  54. 54. speaking of retrospectives…
  55. 55. questions?

×