On Feb 21, 2012, at 12:26 PM, Eden Cardim wrote:

>>>>>> "Louis" == Louis Erickson <lerick...@rdwarf.net> writes:
> 
>    Louis> No, I mean ../lib relative to the script's main directory.  If I'm
>    Louis> in / and run the script with a full path, I don't want or expect
>    Louis> ../lib to be added to @INC.  I want and expect the script to find
>    Louis> the paths relative to itself, as the structure of the app as it is
>    Louis> often used are.
> 
> Yes, and Catalyst does try to locate lib (not inc) to the best of it's
> ability, you need one of Makefile.PL, Build.PL or dist.ini in the same
> directory as lib, cos' that's the mechanism it uses for locating an
> uninstalled app. If you don't have those, create at least one, even if it's
> bogus. If you do have them, and you're still having trouble, it's a bug.

Ah!  So, it's trying to use the files created as part of the build process to 
determine where lib is.  That seems fair.

And so:

wwonko@holly:~/projects/MyApp/script $ ./myapp_server.pl 
Can't locate MyApp.pm in @INC (@INC contains: 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/i686-linux 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/i686-linux 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2 .) at 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Module/Runtime.pm
 line 317.
 at 
/home/wwonko/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Catalyst/Script/Server.pm
 line 239
wwonko@holly:~/projects/MyApp/script $ ls ..
Changes  lib/  Makefile.PL  myapp.conf  myapp.psgi  README  root/  script/  t/
wwonko@holly:~/projects/MyApp/script $ 

Which suggests there is, indeed a bug, as there's a Makefile.PL in the same 
directory as lib, right where catalyst.pl put it.

Given the additional information you provided, it's possible for someone else 
to debug this and maybe help solve the problem.

Thank you!

I hope I'll have time to dig into it and see what's going wrong, and make sure 
I am not making matters worse for someone else.  I may not until the weekend.


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to