develooper Front page | perl.perl5.porters | Postings from May 2013

Re: RFC: Removing from the core distribution

Thread Previous | Thread Next
Tatsuhiko Miyagawa
May 28, 2013 05:56
Re: RFC: Removing from the core distribution
Message ID:
On Mon, May 27, 2013 at 4:21 AM, Johan Vromans <> wrote:

> If I'd want a trivial web app that shows me yesterday's SinFest comic,
> I'd use and 10-20 lines of Perl code. It would work on every web
> host that has Perl.

I'm pretty sure that script would involve the code to fetch HTML page
from SinFest and parse it. It requires LWP (or some other HTTP
library) which is not in core. You can instead use wget, curl,
HTTP::Tiny for sure - none of them are guaranteed to be available on
"every web host that has Perl" anyway.

Instead, if you want to ensure your script works even when is
not shipped with Perl, or with an even worse provider that strips
modules like from perl core library (I know a few):

    > cpanm -l vendor --reinstall CGI

and add 'use lib "./vendor/lib/perl5"' to your script, then upload the
whole code and vendor directory, and you're done. You don't even need
a shell access or local::lib integration.

Adding LWP or HTTP::Tiny to that is also as trivial, so long as XS
module is not involved [1].

(Fatpacker is an alternative to this to do the same thing, but only
required if you need a single file executable)

[1] At this moment, installing requires FCGI which needs XS
binary to be built. As you can see on the thread I believe this will
be resolved soon so that it's not the case.

Tatsuhiko Miyagawa

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About