Your SlideShare is downloading. ×

Perl in the Real World

412

Published on

Presented at the YAPC::Europe 2010 conference in Pisa, Italy

Presented at the YAPC::Europe 2010 conference in Pisa, Italy

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
412
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Perl in the Real WorldJon Allen (JJ) – jj@opusvl.com YAPC::Europe 2010 Perl in the Real World Open Source Business Systems www.opusvl.com
  • 2. About OpusVL•  Open Source development company•  Based in Rugby, UK•  Founded in 2000 –  Celebrated our 10th anniversary in January 2010•  Provide Open Source business systems –  National retailers, financial institutions, SMEs –  Solutions, not code Perl in the Real World Open Source Business Systems www.opusvl.com
  • 3. What do we do?•  Bespoke software development –  Back-office / financial systems –  eCommerce –  Intranet applications•  Proud to use Perl –  And Moose, Catalyst, DBIx::Class, cpanminus, Test::More, etc http://xkcd.com/208/ Perl in the Real World Open Source Business Systems www.opusvl.com
  • 4. Intranet project•  National chain of car dealerships (UK)•  Very large feature set•  Multiple domains –  Sales, HR, Customer Service, Finance•  Future plans –  Integrate all back-office systems Perl in the Real World Open Source Business Systems www.opusvl.com
  • 5. Architecture•  Two key design considerations:•  Entensible –  Long life-cycle, always adding new features•  Maintainable –  Modular design, develop and update individual components independently of the whole system Perl in the Real World Open Source Business Systems www.opusvl.com
  • 6. Pluggable Catalyst apps•  Create a "base" application –  Common functions, views, models etc –  Authentication and access control –  Standard user interface components•  Write application plugins as CatalystX:: components•  Combine these together into a new Catalyst app Perl in the Real World Open Source Business Systems www.opusvl.com
  • 7. CatalystX::AppBuilder•  Programmable configuration for Catalyst applications –  Define your application in code –  Extend in the next app, then extend again and so on•  Handles inheritance path for components –  e.g. a chain of template directories for Catalyst::View::TT –  $self->inherited_path_to(root,templates) Perl in the Real World Open Source Business Systems www.opusvl.com
  • 8. CatalystX::InjectComponent•  Injects Controller, Model, and View components into a Catalyst application after setup_components => sub { my $class = shift; CatalystX::InjectComponent->inject( into => $class, component => My::Other::Controller::JJ, as => Controller::NewName, ); }•  Create components with CatalystX::Starter Perl in the Real World Open Source Business Systems www.opusvl.com
  • 9. Deployment•  Base OS – typically Debian•  Three environments –  Development –  Staging –  Production•  Always compile Perl from source –  System Perl belongs to the OS, custom Perl 5.10.1 for applications Perl in the Real World Open Source Business Systems www.opusvl.com
  • 10. First rule of Installation Club•  Everything installed to Staging and Production must be packaged as CPAN-style modules –  Standard module layout –  Makefile.PL, t/*, Pod documentation –  All modules are versioned •  Very simple to regress to a previous release•  Perl is the OS –  Unlike native OS packages, CPAN works on Debian, RHEL, Mac OS X, Solaris, etc Perl in the Real World Open Source Business Systems www.opusvl.com
  • 11. Use the toolchain, Luke•  Install using cpanminus –  Resolves dependencies –  Very fast –  Standard install procedure for each project –  cpanm --sudo --installdeps .•  Components of a large system can be managed and upgraded independently Perl in the Real World Open Source Business Systems www.opusvl.com
  • 12. Future•  Internal CPAN mirror –  Include all custom code –  Task:: modules to set up client environments•  Internal Perldoc –  Develop on top of Perldoc::Server•  Dont fight it, feel it –  CPAN toolchain gives many benefits –  Well worth using! Perl in the Real World Open Source Business Systems www.opusvl.com
  • 13. Conclusion•  Clients care about results, not code –  The technology is our job•  Perl gives us the tools to deliver•  The Perl Community makes it possible•  Thank you! Perl in the Real World Open Source Business Systems www.opusvl.com

×