SlideShare une entreprise Scribd logo
1  sur  69
Télécharger pour lire hors ligne
How CPAN Testers helped me
     improve my module

  It’s quite hard to write cross-platform CPAN
modules, especially when you use XS to interface
with C libraries. Luckily, CPAN Testers tests your
 modules on many platforms for you. Come see
 how CPAN Testers helped me to create a fully
                 portable module.
                   Léon Brocard



               YAPC::Europe
Who went to. . .




  Barbie’s talk “Smoking   e Onion — Tales of CPAN
  Testers”
Who knows about. . .




  CPAN Testers
Me
 Léon Brocard
 French, live in London
 Like food
 Like the colour orange
 Founded Amsterdam.pm, Bath.pm, Croydon.pm
 Ex-leader of London.pm
 Started YAPC::Europe
 Looking for employment
 Perl hacker
Released Perl


     - -   Perl .     _
     - -   Perl . .
     - -   Perl . .
     - -   Perl . .
distributions on the CPAN

Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Bisect-Perl-UsingGit,
Catalyst-Plugin-CookiedSession, Catalyst-Plugin-SimpleAuth, Compress-LZF_PP,
Compress-LZMA-External, CPAN-IndexPod, CPAN-Metadata-RDF, CPAN-Mini-Live,
CPAN-Unpack, Crypt-Skip32-Base32Crockford, Crypt-Skip32-Base64URLSafe, Dackup,
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, GraphViz, Haul, HTML-Fraction, HTTP-Server-Simple-Kwiki,
Image-Imlib2, Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap,
Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, JSON-YAJL, Kasago, Language-Functional,
LWP-ConnCache-MaxKeepAliveRequests, Mac-EyeTV, MealMaster, Messaging-Courier,
Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3,
Net-Amazon-S3-Client-GPG, Net-Amazon-SimpleQueue, Net-Cassandra, Net-DPAP-Client,
Net-FleetDB, Net-FTP-Throttle, Net-LastFM, Net-MythTV, Net-MythWeb, Net-OpenDHT,
Net-VNC, Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2,
Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Ratings, 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-PSGI, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer,
WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed,
WWW-Search-Google
Out of date



  Written and released during conference:
  CPAN::Mirror::Finder

  CPAN::Webserver
Data structures
  {
       double => 4,
       false   => 0,
       integer => 123,
       map     => {
           array => [ 1, 2, 3 ],
           key   => "value"
       },
       null    => undef,
       number => "3.141",
       string => "a string",
       string2 => "another string",
       true    => 1
  };
Data::Dumper
 {
      double => 4,
      false   => 0,
      integer => 123,
      map     => {
          array => [ 1, 2, 3 ],
          key   => "value"
      },
      null    => undef,
      number => "3.141",
      string => "a string",
      string2 => "another string",
      true    => 1
 };
YAML Ain’t Markup Language
  ---
  double: 4
  false: 0
  integer: 123
  map:
    array:
      - 1
      - 2
      - 3
    key: value
  null: ~
  number: 3.141
  string: a string
  string2: another string
  true: 1
Extensible Markup Language
  <?xml version="1.0" encoding="UTF-8"?>
  <map>
  <integer>123</integer>
  <double>4</double>
  <number>3.141</number>
  <string>a string</string>
  <string>another string</string>
  <null/>
  <true/>
  <false/>
  <map>
    <string>value</string>
    <array>
      <number>1</number>
      <number>2</number>
      <number>3</number>
    </array>
JavaScript Object Notation

  {
      "integer":123,
      "double":4,
      "number":3.141,
      "string":"a string",
      "string2":"another string",
      "null":null,
      "true":true,
      "false":false,
      "map":{"key":"value","array":[1,2,3]}
  }
XML
 <?xml version="1.0" encoding="UTF-8"?>
 <map>
 <integer>123</integer>
 <double>4</double>
 <number>3.141</number>
 <string>a string</string>
 <string>another string</string>
 <null/>
 <true/>
 <false/>
 <map>
   <string>value</string>
   <array>
     <number>1</number>
     <number>2</number>
     <number>3</number>
   </array>
Simple API for XML

  my $b = XML::LibXML::SAX::Builder->new();
  $b->start_document;
  $b->start_element( { Name => ’number’ } );
  $b->characters( { Data => ’3.141’ } );
  $b->end_element( { Name => ’number’ } );
  $b->end_document;
  say $b->result->toString;

  # generates:
  <?xml version="1.0"?>
  <number>3.141</number>
Yet Another JSON Library



  “YAJL is a small event-driven (SAX-style) JSON
  parser written in ANSI C, and a small validating
  JSON generator”
  http://lloyd.github.com/yajl/
YAJL example
  yajl_gen g;
  const unsigned char * buf;
  size_t len;

  g = yajl_gen_alloc(NULL);
  yajl_gen_map_open(g);
  yajl_gen_string(g, "number", 6);
  yajl_gen_number(g, "3.141", 5);
  yajl_gen_map_close(g);

  yajl_gen_get_buf(g, &buf, &len);
  # {"number":3.141}
  fwrite(buf, 1, len, stdout);
  yajl_gen_clear(g);
  yajl_gen_free(g);
A dream


 my $generator = JSON::YAJL::Generator->new();
 $generator->map_open();
 $generator->string("number");
 $generator->number("3.141");
 $generator->map_close();
 say $generator->get_buf;
 # {"number":3.141}
Wait, C?


  XS – eXternal Subroutine
  h xs -x
  SWIG – Simpli ed Wrapper and Interface Generator
  FFI – Foreign Function Interface
Hack hack hack

  Perl is written in C with macros
  perlguts — Introduction to the Perl API
  perlxs — XS language reference manual
  perlxstut — Tutorial for writing XSUBs
  perlport — Writing portable Perl
  Works on my machine, so ship it
   .   Mon Apr      : :    CEST
CPAN Testers

  CPAN Testers is an e ort to set up a Quality
  Assurance (QA) team for CPAN modules.
     e objective of the group is to test as many of the
  distributions on CPAN as possible, on as many
  platforms as possible.
     e ultimate goal is to improve the portability of the
  distributions on CPAN, and provide good feedback
  to the authors.
Volunteers


  Volunteers testing recent CPAN uploads
  On a variety of operating systems
  On a variety of platforms
  On a variety of Perl versions
e subject

From: Andreas J. Konig (ANDK)
Subject: FAIL JSON-YAJL-0.01 v5.8.7 GNU/Linux
Date: 2011-04-11T10:25:15Z

This distribution has been tested as part of
the CPAN Testers project, supporting the
Perl programming language. See
http://wiki.cpantesters.org/ for more
information or email questions to
cpan-testers-discuss@perl.org
Grades


  PASS    distribution built and tested correctly
  FAIL    distribution failed to test correctly
  UNKNOWN distribution failed to build, had no
          test suite or outcome was inconclu-
          sive
  NA      distribution is not applicable to this
          platform and/or version of Perl
Preamble
  Dear Leon Brocard,

  This is a computer-generated report for
  JSON-YAJL-0.01 on perl 5.8.7, created by
  CPAN-Reporter-1.1902.

  Thank you for uploading your work to CPAN.
  However, there was a problem testing your
  distribution.

  If you think this report is invalid, please
  consult the CPAN Testers Wiki for suggestions
  on how to avoid getting FAIL reports for
  missing library or binary dependencies,
  unsupported operating systems, and so on:
Tester comments



  This report is from an automated smoke
  testing program and was not reviewed by
  a human for accuracy.
Program output

  Output from ’./Build test’:

  t/pod.t ..... ok
  Can’t load ’/home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/arch/auto/JSON/YAJL/Generator/G
   at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JSON/YAJL.pm line 4
  Compilation failed in require at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JSON/Y
  BEGIN failed--compilation aborted at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JS
  Compilation failed in require at t/simple.t line 5.
  BEGIN failed--compilation aborted at t/simple.t line 5.
  t/simple.t ..
  Dubious, test returned 9 (wstat 2304, 0x900)
  No subtests run

  Test Summary Report
  -------------------
  t/simple.t (Wstat: 2304 Tests: 0 Failed: 0)
    Non-zero exit status: 9
    Parse errors: No plan found in TAP output
  Files=2, Tests=2, 0 wallclock secs ( 0.03 usr    0.00 sys +   0.07 cusr   0.02 csys =   0.12 CPU)
  Result: FAIL
  Failed 1/2 test programs. 0/2 subtests failed.
Also



  Prerequisites (and version numbers)
  Environment variables (PATH, SHELL etc.)
  Perl special variables and OS-speci c diagnostics
  Perl module toolchain versions installed
Summary of perl con guration
  Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
    Platform:
      osname=linux, osvers=2.6.26-1-amd64, archname=x86_64-linux-thread-multi-ld
      uname=’linux k81 2.6.26-1-amd64 #1 smp mon dec 15 17:25:36 utc 2008 x86_64 gnulinux ’
      config_args=’-Dprefix=/usr/local/perl-5.8.7-threaded -Uversiononly -Dusedevel -Ui_db -Dus
      hint=recommended, useposix=true, d_sigaction=define
      usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
      useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
      use64bitint=define use64bitall=define uselongdouble=define
      usemymalloc=n, bincompat5005=undef
    Compiler:
      cc=’cc’, ccflags =’-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -p
      optimize=’-O2’,
      cppflags=’-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/us
      ccversion=’’, gccversion=’4.3.2’, gccosandvers=’’
      intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
      d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
      ivtype=’long’, ivsize=8, nvtype=’long double’, nvsize=16, Off_t=’off_t’, lseeksize=8
      alignbytes=16, prototype=define
    Linker and Libraries:
      ld=’cc’, ldflags =’ -L/usr/local/lib’
      libpth=/usr/local/lib /lib /usr/lib
      libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
      perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
      libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a
      gnulibc_version=’2.7’
    Dynamic Linking:
      dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=’-Wl,-E’
      cccdlflags=’-fpic’, lddlflags=’-shared -L/usr/local/lib’
e error

Can’t load
‘/home/sand/.cpan/build/JSON-YAJL- . -vYmtrJ-
/blib/arch/auto/JSON/YAJL/Generator/Generator.so’
for module JSON::YAJL::Generator:
/home/sand/.cpan/build/JSON-YAJL- . -vYmtrJ-
/blib/arch/auto/JSON/YAJL/Generator/Generator.so:
unde ned symbol: newSVpvn_utf at
/usr/local/perl- . . -threaded/lib/ . . /x _ -linux-
thread-multi-ld/DynaLoader.pm line
    .
perlapi says


  Creates a new SV and copies a string into it. If utf is
  true, calls "SvUTF _on" on the new SV.
  SV* newSVpvn_utf8(NULLOK const
  char* s, STRLEN len, U32 utf8)
  Introduced in . , as pointed out by Andreas J. König.
Devel::PPPort - Perl/Pollution/Portability

  Perl’s API has changed over time, gaining new
  features, new functions, increasing its exibility, and
  reducing the impact on the C namespace
  environment (reduced pollution). e header le
  written by this module, typically ppport.h, attempts
  to bring some of the newer Perl API features to older
  versions of Perl, so that you can worry less about
  keeping track of old releases, but users can still reap
  the bene t.
Release .



  Include ppport.h
   .   Mon Apr       : :   CEST
Release .




  Unde ned symbol "DPPP_my_newSVpvn_ ags"
Release .       ( )



  ppport.h is runnable
  #define NEED_newSVpvn_flags
  #define NEED_sv_2pv_flags
Release .        ( )



  do not include stdint.h as we do not need it
   .   Tue Apr      : :   CEST
Release .



  got: .                      expected: .
  Stop using .   for testing oats
  What Every Computer Scientist Should Know About
  Floating-Point Arithmetic — David Goldberg
Release .       ( )


  symbol isinf: referenced symbol not found
  #if defined (__SVR4) && defined (__sun)
  #ifndef isinf
  #include
  #define isinf(x) (!finite((x)) && (x)==(x))
  #endif
  #endif
Release .        ( )



  Error: ’const char *’ not in typemap in Generator.xs,
  line
  add const char * to the typemap to support Perl .
Release .        ( )



  throw exceptions upon YAJL error states
   .   Wed Apr      :   :   CEST
Release .


  Half the tests failed!
  error: too few arguments to function ’Perl_croak’
  use aTHX_ when Perl_croak-ing to work on threaded
  Perls
  Perl_croak(aTHX_ "YAJL: Keys must be strings");
Release .        ( )



  expecting: Regexp ((?-xism:Invalid number)) found:
  YAJL: Keys must be strings
  Only test inf and nan on Perl . . and later
   .     u Apr      : :   CEST
Release .


   x minor documentation typo
  don’t test inf and nan under MSWin
  add an interface to the parser
  take advantage of typemaps and declarations to
  minimize XS code
   .   Sat Apr      : :   CEST
Release .
  link to YAJL website, as pointed out by Olivier
  Mengué
  add homepage, repository and bugtracker
  distribution metadata
  add LICENSE le
  add a SAX builder example
  add a tokenising example
  add a tokenising, parsing with Marpa example
  improved documentation, clearer tests
   .   Mon Apr        :   :   CEST
Release .



  update to YAJL . .
   .   Mon Jun     : :   BST
Release .


  don’t test inf and nan under MirOS BSD
  work around not nding isinf under Solaris
  work around missing sprintf_s under Windows
   .   Wed Jul    :   :   BST
Release .


  work aroud the fact that win mingw/gcc doesn’t
  have sprintf_s (for Strawberry Perl)
  move dSP to top of callback_call to compile under
  Microso Visual Studio .
   .     u Aug     : :   BST
Microso Visual C++ does not support long long:
yajlyajl_parse.h(77) : error C2632: ’long’
  followed by ’long’ is illegal
yajlyajl_parser.h(74) : error C2632: ’long’
  followed by ’long’ is illegal
...
How to become a CPAN Tester



  CPAN::Reporter
  http://wiki.cpantesters.org/
CPAN Testers Leaderboard


   st ,          ,       Chris Williams (BINGOS)
   nd ,              ,   Andreas J. König (ANDK)
   rd        ,           Dan Collins (DCOLLINS)
  ...
        th   ,           Léon Brocard (LBROCARD)
Summary


  ,     test reports
      perls
       platforms
 All helping to make CPAN modules more portable
On next at        :

  Liel¯ z¯le: Perl Lists, Arrays, and Hashes vivi ed:
      a a
  lazy, in nite, at, slurpy, typed, bound, and LoL’d,
  Patrick Michaud
  Auditorija    : Encryption on the Web for everyone,
  Lars D
  Auditorija : Terms of endearment — the
  ElasticSearch query language explained, Clinton
  Gormley
  Auditorija    : Perlude: a taste of haskell in perl, Marc
  Chantreux

Contenu connexe

Tendances

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
 
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
 
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
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
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
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0Elena Kolevska
 
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
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupKacper Gunia
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 

Tendances (20)

Ruby 1.9
Ruby 1.9Ruby 1.9
Ruby 1.9
 
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
 
Triple Blitz Strike
Triple Blitz StrikeTriple Blitz Strike
Triple Blitz Strike
 
Agile Memcached
Agile MemcachedAgile Memcached
Agile Memcached
 
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
 
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
 
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
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
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
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0
 
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
 
Redis for your boss
Redis for your bossRedis for your boss
Redis for your boss
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Nubilus Perl
Nubilus PerlNubilus Perl
Nubilus Perl
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 

En vedette (20)

Web Development in Perl
Web Development in PerlWeb Development in Perl
Web Development in Perl
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
 
Modern Perl Catch-Up
Modern Perl Catch-UpModern Perl Catch-Up
Modern Perl Catch-Up
 
Belém (Lisboa)
Belém (Lisboa)Belém (Lisboa)
Belém (Lisboa)
 
NCE Tourism Bergen
NCE Tourism BergenNCE Tourism Bergen
NCE Tourism Bergen
 
Monasterio de Miramar (Valldemossa)
Monasterio de Miramar (Valldemossa)Monasterio de Miramar (Valldemossa)
Monasterio de Miramar (Valldemossa)
 
Cumhuriyetin Düşmanları
Cumhuriyetin DüşmanlarıCumhuriyetin Düşmanları
Cumhuriyetin Düşmanları
 
Arbol de amigos (hojas)
Arbol de amigos (hojas)Arbol de amigos (hojas)
Arbol de amigos (hojas)
 
Comdays.ch
Comdays.chComdays.ch
Comdays.ch
 
De paso por Astorga
De paso por AstorgaDe paso por Astorga
De paso por Astorga
 
Dich vu webapplication
Dich vu webapplicationDich vu webapplication
Dich vu webapplication
 
Gurriato
GurriatoGurriato
Gurriato
 
How to quad boot a macbook
How to quad boot a macbookHow to quad boot a macbook
How to quad boot a macbook
 
Digital Storytelling
Digital StorytellingDigital Storytelling
Digital Storytelling
 
TANET.Thông tư 28 và đại lý thuế 07.2010
TANET.Thông tư 28 và đại lý thuế   07.2010TANET.Thông tư 28 và đại lý thuế   07.2010
TANET.Thông tư 28 và đại lý thuế 07.2010
 
Living in the cloud
Living in the cloudLiving in the cloud
Living in the cloud
 
Nettet får føtter
Nettet får føtterNettet får føtter
Nettet får føtter
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
Beautiful Pictures
Beautiful PicturesBeautiful Pictures
Beautiful Pictures
 
Chuong7 tieu hoa
Chuong7 tieu hoaChuong7 tieu hoa
Chuong7 tieu hoa
 

Similaire à How CPAN Testers helped me improve my module

Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpcJohnny Pork
 
Владимир Перепелица "Модули"
Владимир Перепелица "Модули"Владимир Перепелица "Модули"
Владимир Перепелица "Модули"Media Gorod
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4Open Networking Summits
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
Measuring maintainability; software metrics explained
Measuring maintainability; software metrics explainedMeasuring maintainability; software metrics explained
Measuring maintainability; software metrics explainedDennis de Greef
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018Fabio Janiszevski
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)James Titcumb
 
Who pulls the strings?
Who pulls the strings?Who pulls the strings?
Who pulls the strings?Ronny
 
Design for Scalability in ADAM
Design for Scalability in ADAMDesign for Scalability in ADAM
Design for Scalability in ADAMfnothaft
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKonstantin Sorokin
 
r,rstats,r language,r packages
r,rstats,r language,r packagesr,rstats,r language,r packages
r,rstats,r language,r packagesAjay Ohri
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing DaeHyung Lee
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot CampTroy Miles
 
Perl at SkyCon'12
Perl at SkyCon'12Perl at SkyCon'12
Perl at SkyCon'12Tim Bunce
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
ECCB10 talk - Nextgen sequencing and SNPs
ECCB10 talk - Nextgen sequencing and SNPsECCB10 talk - Nextgen sequencing and SNPs
ECCB10 talk - Nextgen sequencing and SNPsJan Aerts
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 

Similaire à How CPAN Testers helped me improve my module (20)

Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
 
Владимир Перепелица "Модули"
Владимир Перепелица "Модули"Владимир Перепелица "Модули"
Владимир Перепелица "Модули"
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
Measuring maintainability; software metrics explained
Measuring maintainability; software metrics explainedMeasuring maintainability; software metrics explained
Measuring maintainability; software metrics explained
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHPNW Dec 2014 Meetup)
 
Who pulls the strings?
Who pulls the strings?Who pulls the strings?
Who pulls the strings?
 
Design for Scalability in ADAM
Design for Scalability in ADAMDesign for Scalability in ADAM
Design for Scalability in ADAM
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
 
Perl 20tips
Perl 20tipsPerl 20tips
Perl 20tips
 
Easy R
Easy REasy R
Easy R
 
r,rstats,r language,r packages
r,rstats,r language,r packagesr,rstats,r language,r packages
r,rstats,r language,r packages
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
Perl at SkyCon'12
Perl at SkyCon'12Perl at SkyCon'12
Perl at SkyCon'12
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Jaap : node, npm & grunt
Jaap : node, npm & gruntJaap : node, npm & grunt
Jaap : node, npm & grunt
 
ECCB10 talk - Nextgen sequencing and SNPs
ECCB10 talk - Nextgen sequencing and SNPsECCB10 talk - Nextgen sequencing and SNPs
ECCB10 talk - Nextgen sequencing and SNPs
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 

Plus 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
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10acme
 
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
 
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
 

Plus 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?
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
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
 
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?
 

Dernier

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Dernier (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

How CPAN Testers helped me improve my module

  • 1. How CPAN Testers helped me improve my module It’s quite hard to write cross-platform CPAN modules, especially when you use XS to interface with C libraries. Luckily, CPAN Testers tests your modules on many platforms for you. Come see how CPAN Testers helped me to create a fully portable module. Léon Brocard YAPC::Europe
  • 2. Who went to. . . Barbie’s talk “Smoking e Onion — Tales of CPAN Testers”
  • 3. Who knows about. . . CPAN Testers
  • 4. Me Léon Brocard French, live in London Like food Like the colour orange Founded Amsterdam.pm, Bath.pm, Croydon.pm Ex-leader of London.pm Started YAPC::Europe Looking for employment Perl hacker
  • 5. Released Perl - - Perl . _ - - Perl . . - - Perl . . - - Perl . .
  • 6. distributions on the CPAN Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Bisect-Perl-UsingGit, Catalyst-Plugin-CookiedSession, Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod, CPAN-Metadata-RDF, CPAN-Mini-Live, CPAN-Unpack, Crypt-Skip32-Base32Crockford, Crypt-Skip32-Base64URLSafe, Dackup, 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, GraphViz, Haul, HTML-Fraction, HTTP-Server-Simple-Kwiki, Image-Imlib2, Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap, Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, JSON-YAJL, Kasago, Language-Functional, LWP-ConnCache-MaxKeepAliveRequests, Mac-EyeTV, MealMaster, Messaging-Courier, Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3, Net-Amazon-S3-Client-GPG, Net-Amazon-SimpleQueue, Net-Cassandra, Net-DPAP-Client, Net-FleetDB, Net-FTP-Throttle, Net-LastFM, Net-MythTV, Net-MythWeb, Net-OpenDHT, Net-VNC, Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2, Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Ratings, 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-PSGI, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer, WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed, WWW-Search-Google
  • 7. Out of date Written and released during conference: CPAN::Mirror::Finder CPAN::Webserver
  • 8.
  • 9. Data structures { double => 4, false => 0, integer => 123, map => { array => [ 1, 2, 3 ], key => "value" }, null => undef, number => "3.141", string => "a string", string2 => "another string", true => 1 };
  • 10. Data::Dumper { double => 4, false => 0, integer => 123, map => { array => [ 1, 2, 3 ], key => "value" }, null => undef, number => "3.141", string => "a string", string2 => "another string", true => 1 };
  • 11. YAML Ain’t Markup Language --- double: 4 false: 0 integer: 123 map: array: - 1 - 2 - 3 key: value null: ~ number: 3.141 string: a string string2: another string true: 1
  • 12. Extensible Markup Language <?xml version="1.0" encoding="UTF-8"?> <map> <integer>123</integer> <double>4</double> <number>3.141</number> <string>a string</string> <string>another string</string> <null/> <true/> <false/> <map> <string>value</string> <array> <number>1</number> <number>2</number> <number>3</number> </array>
  • 13. JavaScript Object Notation { "integer":123, "double":4, "number":3.141, "string":"a string", "string2":"another string", "null":null, "true":true, "false":false, "map":{"key":"value","array":[1,2,3]} }
  • 14. XML <?xml version="1.0" encoding="UTF-8"?> <map> <integer>123</integer> <double>4</double> <number>3.141</number> <string>a string</string> <string>another string</string> <null/> <true/> <false/> <map> <string>value</string> <array> <number>1</number> <number>2</number> <number>3</number> </array>
  • 15. Simple API for XML my $b = XML::LibXML::SAX::Builder->new(); $b->start_document; $b->start_element( { Name => ’number’ } ); $b->characters( { Data => ’3.141’ } ); $b->end_element( { Name => ’number’ } ); $b->end_document; say $b->result->toString; # generates: <?xml version="1.0"?> <number>3.141</number>
  • 16. Yet Another JSON Library “YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small validating JSON generator” http://lloyd.github.com/yajl/
  • 17. YAJL example yajl_gen g; const unsigned char * buf; size_t len; g = yajl_gen_alloc(NULL); yajl_gen_map_open(g); yajl_gen_string(g, "number", 6); yajl_gen_number(g, "3.141", 5); yajl_gen_map_close(g); yajl_gen_get_buf(g, &buf, &len); # {"number":3.141} fwrite(buf, 1, len, stdout); yajl_gen_clear(g); yajl_gen_free(g);
  • 18. A dream my $generator = JSON::YAJL::Generator->new(); $generator->map_open(); $generator->string("number"); $generator->number("3.141"); $generator->map_close(); say $generator->get_buf; # {"number":3.141}
  • 19. Wait, C? XS – eXternal Subroutine h xs -x SWIG – Simpli ed Wrapper and Interface Generator FFI – Foreign Function Interface
  • 20. Hack hack hack Perl is written in C with macros perlguts — Introduction to the Perl API perlxs — XS language reference manual perlxstut — Tutorial for writing XSUBs perlport — Writing portable Perl Works on my machine, so ship it . Mon Apr : : CEST
  • 21. CPAN Testers CPAN Testers is an e ort to set up a Quality Assurance (QA) team for CPAN modules. e objective of the group is to test as many of the distributions on CPAN as possible, on as many platforms as possible. e ultimate goal is to improve the portability of the distributions on CPAN, and provide good feedback to the authors.
  • 22. Volunteers Volunteers testing recent CPAN uploads On a variety of operating systems On a variety of platforms On a variety of Perl versions
  • 23.
  • 24. e subject From: Andreas J. Konig (ANDK) Subject: FAIL JSON-YAJL-0.01 v5.8.7 GNU/Linux Date: 2011-04-11T10:25:15Z This distribution has been tested as part of the CPAN Testers project, supporting the Perl programming language. See http://wiki.cpantesters.org/ for more information or email questions to cpan-testers-discuss@perl.org
  • 25. Grades PASS distribution built and tested correctly FAIL distribution failed to test correctly UNKNOWN distribution failed to build, had no test suite or outcome was inconclu- sive NA distribution is not applicable to this platform and/or version of Perl
  • 26. Preamble Dear Leon Brocard, This is a computer-generated report for JSON-YAJL-0.01 on perl 5.8.7, created by CPAN-Reporter-1.1902. Thank you for uploading your work to CPAN. However, there was a problem testing your distribution. If you think this report is invalid, please consult the CPAN Testers Wiki for suggestions on how to avoid getting FAIL reports for missing library or binary dependencies, unsupported operating systems, and so on:
  • 27. Tester comments This report is from an automated smoke testing program and was not reviewed by a human for accuracy.
  • 28. Program output Output from ’./Build test’: t/pod.t ..... ok Can’t load ’/home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/arch/auto/JSON/YAJL/Generator/G at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JSON/YAJL.pm line 4 Compilation failed in require at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JSON/Y BEGIN failed--compilation aborted at /home/sand/.cpan/build/JSON-YAJL-0.01-vYmtrJ/blib/lib/JS Compilation failed in require at t/simple.t line 5. BEGIN failed--compilation aborted at t/simple.t line 5. t/simple.t .. Dubious, test returned 9 (wstat 2304, 0x900) No subtests run Test Summary Report ------------------- t/simple.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: No plan found in TAP output Files=2, Tests=2, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.07 cusr 0.02 csys = 0.12 CPU) Result: FAIL Failed 1/2 test programs. 0/2 subtests failed.
  • 29. Also Prerequisites (and version numbers) Environment variables (PATH, SHELL etc.) Perl special variables and OS-speci c diagnostics Perl module toolchain versions installed
  • 30. Summary of perl con guration Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=linux, osvers=2.6.26-1-amd64, archname=x86_64-linux-thread-multi-ld uname=’linux k81 2.6.26-1-amd64 #1 smp mon dec 15 17:25:36 utc 2008 x86_64 gnulinux ’ config_args=’-Dprefix=/usr/local/perl-5.8.7-threaded -Uversiononly -Dusedevel -Ui_db -Dus hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc=’cc’, ccflags =’-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -p optimize=’-O2’, cppflags=’-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/us ccversion=’’, gccversion=’4.3.2’, gccosandvers=’’ intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype=’long’, ivsize=8, nvtype=’long double’, nvsize=16, Off_t=’off_t’, lseeksize=8 alignbytes=16, prototype=define Linker and Libraries: ld=’cc’, ldflags =’ -L/usr/local/lib’ libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version=’2.7’ Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=’-Wl,-E’ cccdlflags=’-fpic’, lddlflags=’-shared -L/usr/local/lib’
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. e error Can’t load ‘/home/sand/.cpan/build/JSON-YAJL- . -vYmtrJ- /blib/arch/auto/JSON/YAJL/Generator/Generator.so’ for module JSON::YAJL::Generator: /home/sand/.cpan/build/JSON-YAJL- . -vYmtrJ- /blib/arch/auto/JSON/YAJL/Generator/Generator.so: unde ned symbol: newSVpvn_utf at /usr/local/perl- . . -threaded/lib/ . . /x _ -linux- thread-multi-ld/DynaLoader.pm line .
  • 38. perlapi says Creates a new SV and copies a string into it. If utf is true, calls "SvUTF _on" on the new SV. SV* newSVpvn_utf8(NULLOK const char* s, STRLEN len, U32 utf8) Introduced in . , as pointed out by Andreas J. König.
  • 39. Devel::PPPort - Perl/Pollution/Portability Perl’s API has changed over time, gaining new features, new functions, increasing its exibility, and reducing the impact on the C namespace environment (reduced pollution). e header le written by this module, typically ppport.h, attempts to bring some of the newer Perl API features to older versions of Perl, so that you can worry less about keeping track of old releases, but users can still reap the bene t.
  • 40. Release . Include ppport.h . Mon Apr : : CEST
  • 41.
  • 42. Release . Unde ned symbol "DPPP_my_newSVpvn_ ags"
  • 43. Release . ( ) ppport.h is runnable #define NEED_newSVpvn_flags #define NEED_sv_2pv_flags
  • 44. Release . ( ) do not include stdint.h as we do not need it . Tue Apr : : CEST
  • 45.
  • 46. Release . got: . expected: . Stop using . for testing oats What Every Computer Scientist Should Know About Floating-Point Arithmetic — David Goldberg
  • 47. Release . ( ) symbol isinf: referenced symbol not found #if defined (__SVR4) && defined (__sun) #ifndef isinf #include #define isinf(x) (!finite((x)) && (x)==(x)) #endif #endif
  • 48. Release . ( ) Error: ’const char *’ not in typemap in Generator.xs, line add const char * to the typemap to support Perl .
  • 49. Release . ( ) throw exceptions upon YAJL error states . Wed Apr : : CEST
  • 50.
  • 51. Release . Half the tests failed! error: too few arguments to function ’Perl_croak’ use aTHX_ when Perl_croak-ing to work on threaded Perls Perl_croak(aTHX_ "YAJL: Keys must be strings");
  • 52. Release . ( ) expecting: Regexp ((?-xism:Invalid number)) found: YAJL: Keys must be strings Only test inf and nan on Perl . . and later . u Apr : : CEST
  • 53.
  • 54. Release . x minor documentation typo don’t test inf and nan under MSWin add an interface to the parser take advantage of typemaps and declarations to minimize XS code . Sat Apr : : CEST
  • 55.
  • 56. Release . link to YAJL website, as pointed out by Olivier Mengué add homepage, repository and bugtracker distribution metadata add LICENSE le add a SAX builder example add a tokenising example add a tokenising, parsing with Marpa example improved documentation, clearer tests . Mon Apr : : CEST
  • 57.
  • 58. Release . update to YAJL . . . Mon Jun : : BST
  • 59.
  • 60. Release . don’t test inf and nan under MirOS BSD work around not nding isinf under Solaris work around missing sprintf_s under Windows . Wed Jul : : BST
  • 61.
  • 62. Release . work aroud the fact that win mingw/gcc doesn’t have sprintf_s (for Strawberry Perl) move dSP to top of callback_call to compile under Microso Visual Studio . . u Aug : : BST
  • 63.
  • 64. Microso Visual C++ does not support long long: yajlyajl_parse.h(77) : error C2632: ’long’ followed by ’long’ is illegal yajlyajl_parser.h(74) : error C2632: ’long’ followed by ’long’ is illegal
  • 65. ...
  • 66. How to become a CPAN Tester CPAN::Reporter http://wiki.cpantesters.org/
  • 67. CPAN Testers Leaderboard st , , Chris Williams (BINGOS) nd , , Andreas J. König (ANDK) rd , Dan Collins (DCOLLINS) ... th , Léon Brocard (LBROCARD)
  • 68. Summary , test reports perls platforms All helping to make CPAN modules more portable
  • 69. On next at : Liel¯ z¯le: Perl Lists, Arrays, and Hashes vivi ed: a a lazy, in nite, at, slurpy, typed, bound, and LoL’d, Patrick Michaud Auditorija : Encryption on the Web for everyone, Lars D Auditorija : Terms of endearment — the ElasticSearch query language explained, Clinton Gormley Auditorija : Perlude: a taste of haskell in perl, Marc Chantreux