Giter Club home page Giter Club logo

heroku-buildpack-perl's Introduction

Heroku buildpack: Perl

This is a Heroku buildpack that runs any PSGI based web applications using Starman.

Usage

Example usage:

$ ls
cpanfile
app.psgi
lib/

$ cat cpanfile
requires 'Plack', '1.0000';
requires 'DBI', '1.6';

$ heroku create --stack cedar --buildpack https://github.com/miyagawa/heroku-buildpack-perl.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> Perl/PSGI app detected
-----> Installing dependencies

The buildpack will detect that your app has an app.psgi in the root.

Libraries

Dependencies can be declared using cpanfile (recommended) or more traditional Makefile.PL, Build.PL and META.json (whichever you can install with cpanm --installdeps), and the buildpack will install these dependencies using cpanm into ./local directory.

heroku-buildpack-perl's People

Contributors

gmambro avatar miyagawa avatar mzedeler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-buildpack-perl's Issues

remove packages not in cpanfile

would it be possible to modify the build script to remove all packages that are not present in the cpanfile file or to update all packages that don't specify a version to the latest version?

I had an issue where after adding a new package my entire app broke and even reversing the associated commits didn't help because the added package remained somewhere. the only thing that worked was a rollback. to be able to commit new changes, I had to manually go through all dependencies in the cpanfile and specify a version for all of them in order to have cpanm install the latest versions of the packages. took me also a good while to figure out what was going on.

Support perl versions

Currently this buildpack uses /usr/bin/perl which comes with the heroku image, and it's 5.10.1.

Would be nice to pre-build the list of supported perl binaries, host somewhere (Dropbox?) and download them to use. See other heroku buildpack like nodejs

To specify perl version to use, you can use either a) .perl-version of https://github.com/tokuhirom/plenv and b) requires 'perl', '== 5.12.3' in cpanfile.

IBM bluemix?

Never mind. Please delete!

My fork of this, puts a default Catalyst app on IBM Blumix. For whatever that's worth!

Can't locate Plack/Runner.pm

I think I've followed the instructions exactly, but when I try to build I get the following error:

2017-09-21T14:35:34.267466Z app[web.1]: Can't locate Plack/Runner.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /app/local/bin/starman line 3.
2017-09-21T14:35:34.267496Z app[web.1]: BEGIN failed--compilation aborted at /app/local/bin/starman line 3.

I have the cpanfile exactly as stated on the home page. I also tried it without versions, just in case. My procfile is just

web: starman

Any suggestions would be very appreciated. Let me know what other information you think might help.

typo in PATH variable in master branch?

The PATH variables created by the release scripts are different between the master and carton branches. One difference which is expected is the presence of /app/vendor/perl/bin only in the carton branch, since only that branch vendors Perl. The difference which is unexpected to me is that carton has /app/local/bin while master has only local/bin. Is that a typo in the master branch, since it doesn't even begin with a /?

XML::LibXSLT fails to install

Sorry, I am not sure whether the problem is caused by settings of this build pack, but XML::LibXSLT fails to install as I have described in this question:

$ git init
$ echo 'requires "XML::LibXSLT";' > cpanfile
$ echo 'sub { [200,[], ['Hello World']] }' > app.psgi
$ git add cpanfile app.psgi
$ git commit -m "initial commit"
$ heroku create --stack cedar --buildpack https://github.com/miyagawa/heroku-buildpack-perl.git
$ git push heroku master

Despite Heroku having installed the required Ubuntu packages libgdbm3 and libxslt1-dev, compilation fails because gdbm cannot be found. Could this be cause by the PATH setting of this buildpack?

curl --silent https://raw.github.com/miyagawa/cpanminus/master/cpanm returns no content

$ lwp-request -mHEAD -E https://raw.github.com/miyagawa/cpanminus/master/cpanm
HEAD https://raw.github.com/miyagawa/cpanminus/master/cpanm
User-Agent: lwp-request/6.03 libwww-perl/6.05

301 Moved Permanently
Connection: close
Date: Wed, 30 Apr 2014 09:51:40 GMT
Via: 1.1 varnish
Accept-Ranges: bytes
Age: 0
Location: https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm
Server: Apache
Vary: Accept-Encoding
Client-Date: Wed, 30 Apr 2014 09:51:40 GMT
Client-Peer: 103.245.222.133:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Fastly, Inc./CN=www.github.com
Client-SSL-Cipher: RC4-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
X-Cache: MISS
X-Cache-Hits: 0
X-Served-By: cache-ty68-TYO

HEAD https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm
User-Agent: lwp-request/6.03 libwww-perl/6.05

200 OK

so, --location option is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.