Bug 800241 - Catalyst fails to locate user application library via Catalyst::ScriptRunner->run('MyApp', 'Server')
Catalyst fails to locate user application library via Catalyst::ScriptRunner-...
Product: Fedora
Classification: Fedora
Component: perl-Catalyst-Runtime (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Iain Arnell
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-06 00:26 EST by Ken Eley
Modified: 2012-03-17 19:44 EDT (History)
3 users (show)

See Also:
Fixed In Version: perl-Catalyst-Runtime-5.90011-1.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-13 14:35:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ken Eley 2012-03-06 00:26:23 EST
Description of problem:
Following the upgrade of perl-Catalyst-Runtime and perl-Catalyst-Runtime-scripts to version 5.90010-1-fc16.noarch the command:

Catalyst::ScriptRunner->run('MyApp', 'Server');

produces the error:

Can't locate MyApp.pm in @INC (@INC contains: /home/ken/ .... )

The error is known to CPAN which reports the error as occurring in version 5.90009 and having been fixed in 5.90010.  Here is a copy for the log for the module:

"5.90010 - 2012-02-18 00:01:00
 Bug fixes:
  - Fix the previous fix to Catalyst::ScriptRunner which was resulting
    in the lib directory not being pushed onto @INC.
    This meant perl ./script/myapp_server.pl failed, however
    perl -Ilib ./script/myapp_server.pl would succeed."

However I see the bug is in ver 5.90010.  I will report the bug as continuing to CPAN.

Version-Release number of selected component (if applicable):

5.90010.  I believe that the error also occurs in 5.90009 as I have seen a bug reported to CPAN for 5.90009, and the code difference shown under Additional info: (which I believe to be responsible) is also seen between 5.90007 and 5.90009.

Additional info
How reproducible:

This is a repeatable error which occurs when ver 5.90010 of perl-Catalyst-Runtime is installed, and is removed when that module and perl-Catalyst-Runtime-scripts are downgraded.  In my case the downgrade resulted in version perl-Catalyst-Runtime-5.90002-1.fc16.noarch and perl-Catalyst-Runtime-scripts-5.90002-1.fc16.noarch.

Steps to Reproduce:
1.  Create a catalyst app
2.  Start the catalyst server
3.  Note the error Can't locate MyApp.pm in @INC (@INC contains: ....)
Actual results:

as above, Note the error Can't locate MyApp.pm in @INC (@INC contains: ....)

Expected results:

the server runs without error

Additional info:

I believe that the bug is due to the following change between ver 5.90007 and 5.90010:

$ diff ScriptRunner.5.90007.pm ScriptRunner.5.90010.pm
> use Catalyst::Utils;
<     lib->import(File::Spec->catdir($FindBin::Bin, '..', 'lib'));
>     if (my $home = Catalyst::Utils::find_home_unloaded_in_checkout()) {
>         lib->import(File::Spec->catdir($home, 'lib'));
>     }
Comment 1 Iain Arnell 2012-03-06 07:58:17 EST
Upstream has a fix committed - and according to catalyst users' mailing list, should be releasing it soon. I prefer to wait for the release rather than patching in Fedora. In the meantime, running ./script/myapp_server.pl from the top-level MyApp directory works for me - only running /path/to/MyApp/script/myapp_server.pl fails when run from some other directory.
Comment 2 Fedora Update System 2012-03-09 11:59:20 EST
perl-Catalyst-Runtime-5.90011-1.fc17 has been submitted as an update for Fedora 17.
Comment 3 Fedora Update System 2012-03-09 11:59:29 EST
perl-Catalyst-Runtime-5.90011-1.fc16 has been submitted as an update for Fedora 16.
Comment 4 Fedora Update System 2012-03-09 12:58:01 EST
Package perl-Catalyst-Runtime-5.90011-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-Catalyst-Runtime-5.90011-1.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-03-13 14:35:00 EDT
perl-Catalyst-Runtime-5.90011-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2012-03-17 19:44:38 EDT
perl-Catalyst-Runtime-5.90011-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.