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

Hello Perl Monks

I ask for your wisdom from a position of great humbleness. I have tried to get Perl running in Heroku, but this simple task is eluding me for now. I have started with the buildpack here: https://github.com/miyagawa/heroku-buildpack-perl

My understanding is that all I need is an app.psgi file, a cpanfile, and a Procfile. My procfile just calls out to starman, which I think (but don't know) will automatically notice my app.psgi.

It was building fine back when I didn't have an app.psgi and just a hello.pl - but of course that wouldn't do anything. Once I changed to app.psgi (hoping that Starman would launch, correctly hook into it, and use my app.psgi to start serving web pages), I started getting the error "Can't locate Plack/Runner.pm in @INC"

But in my cpanfile I do indeed have Plack listed as a requirement, as stated on the buildpack homepage: requires 'Plack', '1.0000';. My understanding is that Plack::Runner should come along with that. I guess somehow the buildpack isn't properly installing this, but I'm not sure what to do next.

Replies are listed 'Best First'.
Re: Trouble with Perl Heroku buildpack
by Anonymous Monk on Sep 21, 2017 at 07:10 UTC
    Hi, what did you try exactly and what was the output? what docs are you following?
      I ended up solving my own problem. It looks like the content of my Procfile was bad. I had a barebones web: starman, but as I noticed in the buildpack's release file, the default for the buildpack is different. I tried deleting my Procfile to rely on that default, and sure enough it started working. I don't really understand *why* it started working properly, but I will take it :).