O'Reilly Open Source Convention.
Books Safari Bookshelf Conferences O'Reilly Network

Arrow Home
Arrow Registration
Arrow Speakers
Arrow Keynotes
Arrow Tutorials
Arrow Sessions
Arrow At-a-Glance
Arrow BOFs
Arrow Events
Arrow Community
Arrow Exhibitors
Arrow Sponsors
Arrow Hotel/Travel
Arrow Venue Map
Arrow See & Do
Arrow Press
Arrow Mail List

O'Reilly Open Source Convention


Cross-Platform Packaging and Deployment with PAR
Autrijus Tang, OurInternet, Inc. | The Elixir Initiative

Track: Perl
Date: Tuesday, July 08
Time: 8:45am - 12:15pm
Location: Willamette

What is PAR (Perl Archive Toolkit)?

  • Do what JAR (Java Archive) does for Perl
  • Benefit of using PAR
  • Self-contained scripts

    Getting Started

  • Simple module packaging
  • Using modules inside a PAR file
  • Using it with customized @INC

    Command-line Tools

  • par.pl: Run files from an archive
  • scandeps.pl: scan scripts for dependencies
  • pp: turn a Perl program into a self-contained script

    Making Binary Executables

  • Common idioms
  • Comparison to perlcc, perlapp and perl2exe
  • Deploying cross-platform applications

    The Anatomy of a PAR file

  • Directory layout
  • Special files: Build.PL, SIGNATURE, MANIFEST and META.yml
  • Accessing packed files

    Perl Servlets with Apache::PAR

  • Scenarios for Apache1 and Apache2
  • Self-contained configuration files
  • On-demand library fetching over network

    Implementation Details

  • Code References in @INC
  • Source Filtering
  • DynaLoader::bootstrap

    Deployment tips

  • Module::Build integration
  • CPANPLUS::Dist integration

    Tang supplies additional background: "I created PAR by a combination of neccessity, passion for obscure features, and the amazing altruistic ethics among Perl hackers. The result is a package that deals with three of the most common needs of Perl programmers--determining the dependency tree needed for some code to run; deploying cross-platform compiled libraries; and shipping binary versions of their scripts without Perl being present on the target system. Both leaders of PerlApp and Perl2Exe, PAR's two direct (and proprietary) competitors, generously shared their source code, ideas and wisdom to my then-fledging project, for which I'm very amazed and grateful. One of the things attendees will be able to apply to their own projects after my session is how to debunk the myth that deploying and maintaining large-scale Perl applications is any difficult.

    "Before PAR, it was very difficult to ship Perl applications, especially web applications, without fiddling with complex custom-made installation scripts (just imagine Java without .jar files.), and dealing with various module incompatibilities. Now it's as simple as copying a .par or a .exe file to the target machine, and modify one line of Apache configuration. This opens new possibilities for the long neglected client-side Perl application market."

    Tang's prediction for the future? "Technology will one day cease to be treated as something other than life itself; thus it's not so much as one 'affects' another, but intertwined within the unconsicous natural ability, much as we cease to see the pattern recognition software built in our eyes as a 'technology.' Then, and only then, will we be able to look past the Human Condition."

  • O'Reilly Home | Privacy Policy

    © 2003, O'Reilly Media, Inc.