Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Wisdom about "packaging" or transporting Perl apps

by bradcathey (Prior)
on May 27, 2010 at 02:04 UTC ( [id://841866]=perlquestion: print w/replies, xml ) Need Help??

bradcathey has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monasterians,

I'm actually seeking more wisdom than know-how. Here's the tee up:

About 5 years ago we developed a CMS built around Perl and several popular CPAN modules—at the core CGI::Application, some of it's plugins, HTML::Template, and HTML::FillInForm, to name a few. I've continued to finesse the application, adding JSON support, etc, but still never getting away from the original code and modules.

Why is the discussion of the CPAN modules necessary? Well, because of all the modules necessary to support the CMS, I've always hosted my client's sites on my server. However, we are getting pressure to compete with open source platforms like Joomla and Drupal and install it on other servers. Well, we are thinking that being dependent on all these CPAN modules, which maybe difficult to install on unfamiliar servers, could limit us.

Is there a way to package our CPAN dependent system easily on other servers that I'm not aware? The thought of rewriting the entire thing in PHP (Drupal and Joomla) seems daunting (not a big fan of PHP). It would be great to have it install like either of these, or Wordpress: upload a .tar.gz file, unpack it, and Bob's your uncle.

Thoughts?

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot
  • Comment on Wisdom about "packaging" or transporting Perl apps

Replies are listed 'Best First'.
Re: Wisdom about "packaging" or transporting Perl apps
by mr_mischief (Monsignor) on May 27, 2010 at 05:46 UTC

    If you stay within the typically installed and maintained modules for sites that use CPanel and bundle everything else in the libraries directory of your project (with appropriate adjustments to your use paths, of course) you should be fine for most other servers your target audience will use. Either they'll be on a CPanel or Plesk managed server or they'll have arrangements to do things themselves or to hire it done.

    Typically, but not always, I distribute to my clients in two separate archive files. One is the project proper. The other is the dependencies, precompiled with a compatible perl, cc, processor, and OS if they are not pure-perl modules. I keep them separate from the system perl and usually separate from each other in case the projects depend on different interfaces in different versions of the same module. Deployment consists of uploading and extracting the project, and if that doesn't work, uploading and extracting the dependencies in the same folder. If I need anything outside the web root, I make sure the relative paths are saved in the archives.

    If your customer are running something like perl 5.6.2 on Irix 6, then they'll know how to do all their own module installations. At least they should, or have access to someone who does.

Re: Wisdom about "packaging" or transporting Perl apps
by marto (Cardinal) on May 27, 2010 at 09:36 UTC
Re: Wisdom about "packaging" or transporting Perl apps
by scorpio17 (Canon) on May 27, 2010 at 13:24 UTC

    Are you familiar with Bugzilla ? It's a bug tracking tool, written in perl. It's a large project and requires lots of modules from CPAN. But it comes with a script called checksetup.pl that automatically detects which ones are missing, and will actually go fetch and install anything that you don't have. You might consider taking a look under the hood and see if there's anyway you could adapt it for your purposes.

Re: Wisdom about "packaging" or transporting Perl apps
by Anonymous Monk on May 27, 2010 at 03:59 UTC

      Wow! I'd never heard of either of these. Amazing stuff, hope, and wisdom.

      Thanks good monks.

      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Re: Wisdom about "packaging" or transporting Perl apps
by leocharre (Priest) on May 27, 2010 at 13:22 UTC
    Stick with cpan modules. Delegate the responsibility of deps to whomever has root access on servers. That's how I roll. Similar situation.

    I have a few very complicated doc maintenance type systems- all perl/bash- mostly perl- also CGI::Application head to toe for the gui.

    Screw the install like wordpress- using cpan is easier. Btw, I love wordpress, I even install it for clients and friends. I just wget the source, tarxvf, and replace public_html with .. anyhow.. Comparing these things, it's like apples and organges. I say stick with perl/cpan the way it is, don't try to do clever tricks like prepackaging deps, etc. You'll shoot your eye out.

      Much of the hosting marketplace precludes the customer from having root access or any pull with those who do. It's true that's the low end of the hosting industry, but what do you think most small businesses that are not part of the industry use? They don't understand the differences, and $5 a month sounds much better than $50 a month to them.

      BTW, I assure you I have both my eyes.

        BTW, I assure you I have both my eyes.

        Fingers and toes? :D

Re: Wisdom about "packaging" or transporting Perl apps
by andreas1234567 (Vicar) on May 27, 2010 at 19:30 UTC
    I have not tried this myself: If you can deploy on a Debian-based distribution, you can leverage the large number of CPAN modules for which there are .deb equivalents available. Installing these are generally quick and easy, and the dependency management is pretty darn good.

    All modules you mention are available, but you would have to check if that applies to every module you require:

    libcgi-application-perl libhtml-template-perl libhtml-fillinform-perl libjson-xs-perl
    A downside is that the .deb modules are not always current with CPAN.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://841866]
Approved by toolic
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-18 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found