SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Ten modules I haven’t yet talked
              about

 I have modules on the CPAN and I haven’t yet
given a talk about most of them. I’ll pick ten useful
   but less-known modules of mine and give two
            minute introductions to each.
                   Léon Brocard


           London Perl Workshop
Me


 Léon Brocard
 French, live in London
 Like food
 Like the colour orange
 Founded Amsterdam.pm, Bath.pm, Croydon.pm
 Now in London.pm
 Started YAPC::Europe
 Perl hacker
distributions on the CPAN

Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Catalyst-Plugin-CookiedSession,
Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod,
CPAN-Metadata-RDF, CPAN-Mini-Webserver, CPAN-Unpack, Crypt-Skip32-Base32Crockford,
Crypt-Skip32-Base64URLSafe, Data-Page, Data-UUID-Base64URLSafe, DateTime-Stringify,
Devel-ebug, Devel-ebug-HTTP, Devel-Profit, Email-Send-Gandi, Email-Send-Gmail,
File-Copy-Reliable, Fir, Games-GuessWord, Git-PurePerl, GraphViz, Haul,
HTML-Fraction, HTML-TagCloud, HTTP-Server-Simple-Kwiki, Image-Imlib2,
Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap,
Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, Kasago, Language-Functional, Mac-EyeTV,
MealMaster, Messaging-Courier, Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib,
Net-Amazon-S3, Net-Amazon-SimpleQueue, Net-DPAP-Client, Net-FTP-Throttle,
Net-Mosso-CloudFiles, Net-OpenDHT, Net-Stomp, Net-VNC, Number-DataRate,
OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2, Parse-BACKPAN-Packages,
Parse-CPAN-Authors, Parse-CPAN-Packages, Perl-Metric-Basic, PPIx-IndexOffsets,
PPIx-LineToSub, Search-Mousse, String-Koremutake, Template-Plugin-Page,
Template-Stash-Strict, Term-ProgressBar-Quiet, Test-Expect,
Test-WWW-Mechanize-Catalyst, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer,
WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed,
WWW-Search-Google
Let’s pick ten

  App-Cache, Data-UUID-Base64URLSafe
  Crypt::Skip32::Base32Crockford,
  Email-Send-Gmail, Games-GuessWord,
  HTML-Fraction,
  Image-Imlib2-Thumbnail,
  Image-WorldMap, Net-FTP-Throttle,
  String-Koremutake,
  Term-ProgressBar-Quiet
  Term-ProgressBar-Simple.
App-Cache
 Easy application-level caching

 # in your class, stores in something like
 # ~/.parse_backpan_packages/cache/
 my $cache = App::Cache->new({ ttl => 60*60 });
 $cache->delete(’test’);
 my $data = $cache->get(’test’);
 my $code = $cache->get_code(quot;codequot;,
   sub { $self->calculate() });
 my $html = $cache->get_url(
   quot;http://www.google.com/quot;);
 $cache->set(’test’, ’one’);
 $cache->set(’test’, { foo => ’bar’ });
 my $scratch = $cache->scratch;
 $cache->clear;
App-Cache

 # in CPAN::Mini::Webserver
 my $cache = App::Cache->new(
   { ttl => 60 * 60 }
 );
 my $parse_cpan_authors = $cache->get_code(
    ’parse_cpan_authors’,
    sub {
      Parse::CPAN::Authors->new(
        $authors_filename->stringify
      )
    }
 );
Crypt::Skip ::Base Crockford

  Crypt::Skip + Encode::Base ::Crockford =
  database record IDs in URLs
  my $key = pack( ’H20’, quot;112233445566778899AAquot; );
  my $cipher = Crypt::Skip32::Base32Crockford->new($key);
  my $n = 3493209676;
  my $b32 = $cipher->encrypt_number_b32_crockford($n);
  # 1PT4W80
  my $m = $cipher->decrypt_number_b32_crockford($b32);
  # 3493209676
Email-Send-Gmail
  Send Messages using Gmail
  use Email::Send;
  use Email::Send::Gmail;
  use Email::Simple::Creator;

  my $email =   Email::Simple->create(
    header =>   [
      From      => ’magicmonitoring@gmail.com’,
      To        => ’acme@astray.com’,
      Subject   => ’Server down’,
    ],
      body =>   ’The server is down, panic!’,
  );
Email-Send-Gmail

  my $sender = Email::Send->new(
    {
      mailer       => ’Gmail’,
      mailer _args => [
        username => ’magicmonitoring@gmail.com’,
        password => ’XXXISABADPASSWORD’,
      ]
    }
  );
  eval { $sender->send($email) };
  die quot;Error sending email: $@quot; if $@;
Games-GuessWord
 Guess the letters in a word (i. e. Hangman)
 my $g = Games::GuessWord->new(
   file => quot;/path/to/wordlistquot;
 );
 print   quot;Score: quot; . $g->score . quot;nquot;;
 print quot;Chances: quot; . $g->chances . quot;nquot;;
 print quot;Answer: quot; . $g->answer . quot;nquot;;
 my @guesses = $g->guesses;
 $g->guess(quot;tquot;);
 # ...
 if ($g->won) {
   print quot;You won!nquot;;
   $g->new_word;
 }
HTML-Fraction


 Encode fractions as HTML entities
 my $fraction = HTML::Fraction->new;
 print $fraction->tweak($html);
 # 1/5 is ⅕

 which is displayed as ⁄
Image-Imlib - umbnail
 Generate a set of thumbnails of an image
 my $t = Image::Imlib2::Thumbnail->new();
 foreach my $thumbnail
   ($t->generate( $image, $directory )) {
   my $name = $thumbnail->{name};
   my $width= $thumbnail->{width};
   my $height = $thumbnail->{height};
   my $type = $thumbnail->{type};
   my $filename = $thumbnail->{filename};
   print quot;$name/$type is $width x $heightquot;;
   print quot; at $filenamenquot;;
 }
Image-Imlib - umbnail
 By default it generates thumbnails of the same
 dimension that Flickr generates:
   Type          Name          Width    Height
   Landscape     Square        75       75
   Landscape     Thumbnail     100      75
   Landscape     Small         240      180
   Landscape     Medium        500      375
   Landscape     Large         1024     768
   Portrait      Square        75       75
   Portrait      Thumbnail     75       100
   Portrait      Small         180      240
   Portrait      Medium        375      500
   Portrait      Large         768      1024
Image-WorldMap

 Create graphical world maps of data
 use Image::WorldMap;
 my $map = Image::WorldMap->new(
   quot;earth-small.pngquot;, quot;maian/8quot;
 );
 $map->add(4.91, 52.35, quot;Amsterdam.pmquot;);
 $map->add(-2.355399, 51.3828, quot;Bath.pmquot;);
 $map->add(-0.093999, 51.3627, quot;Croydon.pmquot;);
 $map->draw(quot;test.pngquot;);
Image-WorldMap

 CPAN Mirrors
Net-FTP-      rottle


    rottle FTP connections
  my $ftp = Net::FTP::Throttle->new(
      quot;ftp.example.comquot;,
      MegabitsPerSecond => 2
    )
    or die quot;Cannot connect: $@quot;;
  # then as with Net::FTP
String-Koremutake


  Convert to/from Koremutake Memorable Random
  Strings
  use String::Koremutake;
  my $k = String::Koremutake->new;

  my $s = $k->integer_to_koremutake(65535);
  # botretre
  my $i = $k->koremutake_to_integer(’koremutake’);
  # 10610353957
Term-ProgressBar-Simple
  Edmund extended my Term-ProgressBar-Quiet:
  provides a simple progress meter if run interactively
  use Term::ProgressBar::Simple;
  my @todo     = ( (’x’) x 10 );
  my $progress = Term::ProgressBar::Quiet->new(
      scalar(@todo),
  );

  foreach my $todo (@todo) {
      # do something with $todo
      $progress++;
  }
  $progress->message(’All done’);
Term-ProgressBar-Quiet



  progress: 10% [===                ]0m06s Left
  progress: 40% [==========         ]0m04s Left
  All done
  progress: 100% [==================]D 0h00m10s
anks




Any questions?

Mais conteúdo relacionado

Mais procurados

Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
 
A Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsA Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsMark Baker
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
Writing Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdWriting Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdRicardo Signes
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsMatt Follett
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Shinya Ohyanagi
 
Get Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP StreamsGet Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP StreamsDavey Shafik
 

Mais procurados (20)

Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
A Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsA Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP Generators
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Writing Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdWriting Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::Cmd
 
Triple Blitz Strike
Triple Blitz StrikeTriple Blitz Strike
Triple Blitz Strike
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
 
Nubilus Perl
Nubilus PerlNubilus Perl
Nubilus Perl
 
Agile Memcached
Agile MemcachedAgile Memcached
Agile Memcached
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1
 
Get Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP StreamsGet Soaked - An In Depth Look At PHP Streams
Get Soaked - An In Depth Look At PHP Streams
 

Destaque

Trysilseminaret, juni 2010
Trysilseminaret, juni 2010Trysilseminaret, juni 2010
Trysilseminaret, juni 2010Oyvind Solstad
 
COLORES.
COLORES.COLORES.
COLORES.atpepe
 
Social Media for Local Business--An Overview
Social Media for Local Business--An OverviewSocial Media for Local Business--An Overview
Social Media for Local Business--An OverviewJosue Sierra
 
General portal solution for magazines
General portal solution for magazinesGeneral portal solution for magazines
General portal solution for magazinesLatte Media
 
T I N Y Notes
T I N Y  NotesT I N Y  Notes
T I N Y Notesfreshjon
 
Twitter For Reflection Jan 2020
Twitter For Reflection Jan 2020Twitter For Reflection Jan 2020
Twitter For Reflection Jan 2020Tony McNeill
 
My 1st 6 months - KM Program
My 1st 6 months - KM ProgramMy 1st 6 months - KM Program
My 1st 6 months - KM ProgramCory Banks
 
KM Experiences
KM ExperiencesKM Experiences
KM ExperiencesCory Banks
 
Applying Knowledge Cory Banks
Applying Knowledge   Cory BanksApplying Knowledge   Cory Banks
Applying Knowledge Cory BanksCory Banks
 
Quality Management and Service Quality
Quality Management and Service QualityQuality Management and Service Quality
Quality Management and Service QualityCory Banks
 
Better Information = Better Business
Better Information = Better BusinessBetter Information = Better Business
Better Information = Better BusinessCory Banks
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10acme
 
Social Networking at the University of Manitoba Health Sciences Libraries
Social Networking at the University of Manitoba Health Sciences LibrariesSocial Networking at the University of Manitoba Health Sciences Libraries
Social Networking at the University of Manitoba Health Sciences Librariescacemlis
 
Drivhuskonferansen Juni2009
Drivhuskonferansen Juni2009Drivhuskonferansen Juni2009
Drivhuskonferansen Juni2009Oyvind Solstad
 

Destaque (20)

Trysilseminaret, juni 2010
Trysilseminaret, juni 2010Trysilseminaret, juni 2010
Trysilseminaret, juni 2010
 
COLORES.
COLORES.COLORES.
COLORES.
 
Intro Presentation
Intro PresentationIntro Presentation
Intro Presentation
 
Social Media for Local Business--An Overview
Social Media for Local Business--An OverviewSocial Media for Local Business--An Overview
Social Media for Local Business--An Overview
 
radiowave
radiowave radiowave
radiowave
 
General portal solution for magazines
General portal solution for magazinesGeneral portal solution for magazines
General portal solution for magazines
 
T I N Y Notes
T I N Y  NotesT I N Y  Notes
T I N Y Notes
 
Twitter For Reflection Jan 2020
Twitter For Reflection Jan 2020Twitter For Reflection Jan 2020
Twitter For Reflection Jan 2020
 
My 1st 6 months - KM Program
My 1st 6 months - KM ProgramMy 1st 6 months - KM Program
My 1st 6 months - KM Program
 
Power
PowerPower
Power
 
KM Experiences
KM ExperiencesKM Experiences
KM Experiences
 
Applying Knowledge Cory Banks
Applying Knowledge   Cory BanksApplying Knowledge   Cory Banks
Applying Knowledge Cory Banks
 
Quality Management and Service Quality
Quality Management and Service QualityQuality Management and Service Quality
Quality Management and Service Quality
 
Better Information = Better Business
Better Information = Better BusinessBetter Information = Better Business
Better Information = Better Business
 
POWER
POWERPOWER
POWER
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
Parque Pignatelli
Parque PignatelliParque Pignatelli
Parque Pignatelli
 
Social Networking at the University of Manitoba Health Sciences Libraries
Social Networking at the University of Manitoba Health Sciences LibrariesSocial Networking at the University of Manitoba Health Sciences Libraries
Social Networking at the University of Manitoba Health Sciences Libraries
 
Drivhuskonferansen Juni2009
Drivhuskonferansen Juni2009Drivhuskonferansen Juni2009
Drivhuskonferansen Juni2009
 
Anfiteatro de mérida
Anfiteatro de méridaAnfiteatro de mérida
Anfiteatro de mérida
 

Semelhante a Ten modules I haven't yet talked about

Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsMarian Marinov
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Michael Wales
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlKent Cowgill
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Robin Fernandes
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Atlassian
 
Dropping ACID with MongoDB
Dropping ACID with MongoDBDropping ACID with MongoDB
Dropping ACID with MongoDBkchodorow
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsandrewnacin
 
Your own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyYour own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyLindsay Holmwood
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
 

Semelhante a Ten modules I haven't yet talked about (20)

Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your plugins
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
Test upload
Test uploadTest upload
Test upload
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with Perl
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
 
Daily notes
Daily notesDaily notes
Daily notes
 
Dropping ACID with MongoDB
Dropping ACID with MongoDBDropping ACID with MongoDB
Dropping ACID with MongoDB
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIs
 
Your own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyYour own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with Ruby
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Sk.php
Sk.phpSk.php
Sk.php
 
Sk.php
Sk.phpSk.php
Sk.php
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
Capistrano2
Capistrano2Capistrano2
Capistrano2
 

Mais de acme

HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3acme
 
Fallacies of distributed computing
Fallacies of distributed computingFallacies of distributed computing
Fallacies of distributed computingacme
 
What's new in Perl 5.12?
What's new in Perl 5.12?What's new in Perl 5.12?
What's new in Perl 5.12?acme
 
What's new In Perl?
What's new In Perl?What's new In Perl?
What's new In Perl?acme
 
Searching CPAN Offline
Searching CPAN OfflineSearching CPAN Offline
Searching CPAN Offlineacme
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked aboutacme
 
Living in the cloud
Living in the cloudLiving in the cloud
Living in the cloudacme
 
Living In The Cloud
Living In The CloudLiving In The Cloud
Living In The Cloudacme
 
Scaling with memcached
Scaling with memcachedScaling with memcached
Scaling with memcachedacme
 
What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?acme
 

Mais de acme (10)

HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3
 
Fallacies of distributed computing
Fallacies of distributed computingFallacies of distributed computing
Fallacies of distributed computing
 
What's new in Perl 5.12?
What's new in Perl 5.12?What's new in Perl 5.12?
What's new in Perl 5.12?
 
What's new In Perl?
What's new In Perl?What's new In Perl?
What's new In Perl?
 
Searching CPAN Offline
Searching CPAN OfflineSearching CPAN Offline
Searching CPAN Offline
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked about
 
Living in the cloud
Living in the cloudLiving in the cloud
Living in the cloud
 
Living In The Cloud
Living In The CloudLiving In The Cloud
Living In The Cloud
 
Scaling with memcached
Scaling with memcachedScaling with memcached
Scaling with memcached
 
What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Ten modules I haven't yet talked about

  • 1. Ten modules I haven’t yet talked about I have modules on the CPAN and I haven’t yet given a talk about most of them. I’ll pick ten useful but less-known modules of mine and give two minute introductions to each. Léon Brocard London Perl Workshop
  • 2. Me Léon Brocard French, live in London Like food Like the colour orange Founded Amsterdam.pm, Bath.pm, Croydon.pm Now in London.pm Started YAPC::Europe Perl hacker
  • 3. distributions on the CPAN Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Catalyst-Plugin-CookiedSession, Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod, CPAN-Metadata-RDF, CPAN-Mini-Webserver, CPAN-Unpack, Crypt-Skip32-Base32Crockford, Crypt-Skip32-Base64URLSafe, Data-Page, Data-UUID-Base64URLSafe, DateTime-Stringify, Devel-ebug, Devel-ebug-HTTP, Devel-Profit, Email-Send-Gandi, Email-Send-Gmail, File-Copy-Reliable, Fir, Games-GuessWord, Git-PurePerl, GraphViz, Haul, HTML-Fraction, HTML-TagCloud, HTTP-Server-Simple-Kwiki, Image-Imlib2, Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap, Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, Kasago, Language-Functional, Mac-EyeTV, MealMaster, Messaging-Courier, Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3, Net-Amazon-SimpleQueue, Net-DPAP-Client, Net-FTP-Throttle, Net-Mosso-CloudFiles, Net-OpenDHT, Net-Stomp, Net-VNC, Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2, Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Packages, Perl-Metric-Basic, PPIx-IndexOffsets, PPIx-LineToSub, Search-Mousse, String-Koremutake, Template-Plugin-Page, Template-Stash-Strict, Term-ProgressBar-Quiet, Test-Expect, Test-WWW-Mechanize-Catalyst, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer, WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed, WWW-Search-Google
  • 4. Let’s pick ten App-Cache, Data-UUID-Base64URLSafe Crypt::Skip32::Base32Crockford, Email-Send-Gmail, Games-GuessWord, HTML-Fraction, Image-Imlib2-Thumbnail, Image-WorldMap, Net-FTP-Throttle, String-Koremutake, Term-ProgressBar-Quiet Term-ProgressBar-Simple.
  • 5. App-Cache Easy application-level caching # in your class, stores in something like # ~/.parse_backpan_packages/cache/ my $cache = App::Cache->new({ ttl => 60*60 }); $cache->delete(’test’); my $data = $cache->get(’test’); my $code = $cache->get_code(quot;codequot;, sub { $self->calculate() }); my $html = $cache->get_url( quot;http://www.google.com/quot;); $cache->set(’test’, ’one’); $cache->set(’test’, { foo => ’bar’ }); my $scratch = $cache->scratch; $cache->clear;
  • 6. App-Cache # in CPAN::Mini::Webserver my $cache = App::Cache->new( { ttl => 60 * 60 } ); my $parse_cpan_authors = $cache->get_code( ’parse_cpan_authors’, sub { Parse::CPAN::Authors->new( $authors_filename->stringify ) } );
  • 7. Crypt::Skip ::Base Crockford Crypt::Skip + Encode::Base ::Crockford = database record IDs in URLs my $key = pack( ’H20’, quot;112233445566778899AAquot; ); my $cipher = Crypt::Skip32::Base32Crockford->new($key); my $n = 3493209676; my $b32 = $cipher->encrypt_number_b32_crockford($n); # 1PT4W80 my $m = $cipher->decrypt_number_b32_crockford($b32); # 3493209676
  • 8. Email-Send-Gmail Send Messages using Gmail use Email::Send; use Email::Send::Gmail; use Email::Simple::Creator; my $email = Email::Simple->create( header => [ From => ’magicmonitoring@gmail.com’, To => ’acme@astray.com’, Subject => ’Server down’, ], body => ’The server is down, panic!’, );
  • 9. Email-Send-Gmail my $sender = Email::Send->new( { mailer => ’Gmail’, mailer _args => [ username => ’magicmonitoring@gmail.com’, password => ’XXXISABADPASSWORD’, ] } ); eval { $sender->send($email) }; die quot;Error sending email: $@quot; if $@;
  • 10. Games-GuessWord Guess the letters in a word (i. e. Hangman) my $g = Games::GuessWord->new( file => quot;/path/to/wordlistquot; ); print quot;Score: quot; . $g->score . quot;nquot;; print quot;Chances: quot; . $g->chances . quot;nquot;; print quot;Answer: quot; . $g->answer . quot;nquot;; my @guesses = $g->guesses; $g->guess(quot;tquot;); # ... if ($g->won) { print quot;You won!nquot;; $g->new_word; }
  • 11. HTML-Fraction Encode fractions as HTML entities my $fraction = HTML::Fraction->new; print $fraction->tweak($html); # 1/5 is ⅕ which is displayed as ⁄
  • 12. Image-Imlib - umbnail Generate a set of thumbnails of an image my $t = Image::Imlib2::Thumbnail->new(); foreach my $thumbnail ($t->generate( $image, $directory )) { my $name = $thumbnail->{name}; my $width= $thumbnail->{width}; my $height = $thumbnail->{height}; my $type = $thumbnail->{type}; my $filename = $thumbnail->{filename}; print quot;$name/$type is $width x $heightquot;; print quot; at $filenamenquot;; }
  • 13. Image-Imlib - umbnail By default it generates thumbnails of the same dimension that Flickr generates: Type Name Width Height Landscape Square 75 75 Landscape Thumbnail 100 75 Landscape Small 240 180 Landscape Medium 500 375 Landscape Large 1024 768 Portrait Square 75 75 Portrait Thumbnail 75 100 Portrait Small 180 240 Portrait Medium 375 500 Portrait Large 768 1024
  • 14. Image-WorldMap Create graphical world maps of data use Image::WorldMap; my $map = Image::WorldMap->new( quot;earth-small.pngquot;, quot;maian/8quot; ); $map->add(4.91, 52.35, quot;Amsterdam.pmquot;); $map->add(-2.355399, 51.3828, quot;Bath.pmquot;); $map->add(-0.093999, 51.3627, quot;Croydon.pmquot;); $map->draw(quot;test.pngquot;);
  • 16. Net-FTP- rottle rottle FTP connections my $ftp = Net::FTP::Throttle->new( quot;ftp.example.comquot;, MegabitsPerSecond => 2 ) or die quot;Cannot connect: $@quot;; # then as with Net::FTP
  • 17. String-Koremutake Convert to/from Koremutake Memorable Random Strings use String::Koremutake; my $k = String::Koremutake->new; my $s = $k->integer_to_koremutake(65535); # botretre my $i = $k->koremutake_to_integer(’koremutake’); # 10610353957
  • 18. Term-ProgressBar-Simple Edmund extended my Term-ProgressBar-Quiet: provides a simple progress meter if run interactively use Term::ProgressBar::Simple; my @todo = ( (’x’) x 10 ); my $progress = Term::ProgressBar::Quiet->new( scalar(@todo), ); foreach my $todo (@todo) { # do something with $todo $progress++; } $progress->message(’All done’);
  • 19. Term-ProgressBar-Quiet progress: 10% [=== ]0m06s Left progress: 40% [========== ]0m04s Left All done progress: 100% [==================]D 0h00m10s