4

I try to use supervisor with perlbrew, but I can not make it work. For perlbrew I just tried to set the environment variable that go well, but perhaps it is better to make a script that launches perlbrew and plackup, this my configuration file:

[program:MahewinSimpleBlog]
command = perlbrew use perl-5.14.2 && plackup -E deployment -s Starman --workers=10 -p 4000 -a bin/app.pl -D
directory = /home/hobbestigrou/MahewinSimpleBlog
environment = PERL5LIB ='/home/hobbestigrou/MahewinBlogEngine/lib',PERLBREW_ROOT='/home/hobbestigrou/perl5/perlbrew',PATH='/home/hobbestigrou/perl5/perlbrew/bin:/home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games',MANPATH='/home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/man:',PERLBREW_VERSION='0.43',PERLBREW_PERL='perl-5.14.2',PERLBREW_MANPATH='/home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/man',PERLBREW_SKIP_INIT='1',PERLBREW_PATH='/home/hobbestigrou/perl5/perlbrew/bin:/home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/bin',SHLVL='2'
user = hobbestigrou
stdout_file = /home/hobbestigrou/mahewinsimpleblog.log
autostart = true

In the log I see it's not looking at the right place:

Error while loading bin/app.pl: Can't locate Type/Params.pm in @INC (@INC contains: /home/hobbestigrou/MahewinSimpleBlog/lib /home/hobbestigrou/MahewinBlogEngine/lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/hobbestigrou/MahewinBlogEngine/lib/MahewinBlogEngine/Article.pm line 5.

I do not see the problem, maybe perlbrew use done other things

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Hobbestigrou
  • 1,777
  • 1
  • 13
  • 16
  • Ok it's my fault, there was an extra space between PERL5LIB and its value. But I have again a problem. I have no more error, but in my stdout log I have this line A sub-shell is launched with perl-5.14.2 as the activated perl. Run 'exit' to finish it. So it does not start the server. – Hobbestigrou Dec 19 '13 at 14:24

1 Answers1

2

When you installed perlbrew, you added a command to your .bashrc. You're getting that message because that command wasn't run for the shell in question because it's not an interactive shell.

Why don't you explicitly use /home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/bin/perl instead of using perlbrew use?

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • In my bashrc I have this line source $HOME/perl5/perlbrew/etc/bashrc perlbrew use perl-5.14.2 and if I try this line command = /home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/bin/perl /home/hobbestigrou/perl5/perlbrew/perls/perl-5.14.2/bin/plackup -E deployment -s Starman --workers=10 -p 4000 -a bin/app.pl -D it works thanks and sorry. – Hobbestigrou Dec 19 '13 at 15:19