I am not sure on how I use Perlbrew with Catalyst

495 Views Asked by At

I am trying to use Perlbrew with Catalyst in a brand new server. Perlbrew is already installed and working with the last Perl. The advantages are promising, but I am not sure about my working method.

When developing, I usually start a shell whith the user I use for developing, and I start the Catalyst server with the debugger (script/myapp_server.pl).

So, if I use Perlbrew, I must init Perbrew, switch to the required version of Perl, and then run the Catalyst server.

If I close the shell, next time I connect using my developing user, I must switch Perl again to the right version. Everytime, by my error-prone human hand, isn't it?

The production enviroment is in the same machine.

So, in the production enviroment, that I use in a shell connected as Root, before I start the Catalyst socket, I must be sure that the right Perl is activated, also by human action.

And all the modules that I add to Perl, must be added to the Perlbrew Perl version used by Root AND to the Perlbrew Perl version used by the developer user.

And the last thing, if I try a new Perbrew Perl version... I think that I must add again all modules to the brand new Perl, in both production and developing enviroments...

Is this the correct way????, or I am doing something really weird, making things overcomplicated instead of using Perlbrew to simplify my life?

Regards: Miguel

1

There are 1 best solutions below

0
On

I would expect that installing your app's distribution using its installer would place the proper #! line in the file.

#!/home/ikegami/usr/perlbrew/perls/5.16.1/bin/perl

If it doesn't or if you don't use the installer to install your app, you edit in that line yourself, or you can launch the script using that specific Perl

/home/ikegami/usr/perlbrew/perls/5.16.1/bin/perl script/myapp_server.pl