#31 "** Fatal: Can't locate" Errors

v0.9
closed-fixed
Browsing (93)
8
2001-11-28
2001-11-20
No

Lxr 0.9 from the latest cvs cannot generate html of
unknown type files. i.e. files w/ unspecified
extentions.
for instance, if you click on "Makefile.linux" which
is supposedly the linux version of a Makefile, you
can't grab the browsably generated html code from lxr,
but you'll get something like

-----------
** Fatal: Can't locate LXR/Lang/Generic.pm in @INC
(@INC contains: /usr/lib/perl5/5.6.0/i386-
linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6
.0/i386-
linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/sit
e_perl . /etc/httpd/ /etc/httpd/lib/perl) at (eval 18)
line 3.

** Fatal: Can't locate object method "new" via
package "LXR::Lang::Generic" at (eval 19) line 1.

** Fatal: Unable to create LXR::Lang::Generic Lang
object, at xxxx/lxr/lib/LXR/Common.pm line 71.
-----------

instead.

it is more preferable to make a plain text output
<pre>ed w/ the html header/footers than a crash in
perl.

tia.

Discussion

  • Malcolm Box

    Malcolm Box - 2001-11-21

    Logged In: YES
    user_id=215386

    This "Can't locate" bug is under investigation, but at the
    moment there's no easy way to reliably reproduce it, nor to
    fix it.

    I don't think this is specific to unknown filetypes - I've
    seen this error occur in other situations.

    You could try adding:

    use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" };

    to the top of the "source" script (after "use strict;") and
    see if this helps.

    Otherwise, you can add a line like:

    PerlSetEnv PERL5LIB /path/to/lxr/lxr/lib

    to your .htaccess file which might help.

     
  • Malcolm Box

    Malcolm Box - 2001-11-21
    • summary: " Fatal: Can't locate" Errors --> " Fatal: Can't locate" Errors
    • priority: 5 --> 8
     
  • Hideaki Suzuki

    Hideaki Suzuki - 2001-11-21
    • summary: " Fatal: Can't locate" Errors --> " Fatal: Can't locate" Errors
     
  • Hideaki Suzuki

    Hideaki Suzuki - 2001-11-21

    Logged In: YES
    user_id=254086

    my lxr testbed from the latest cvs already has had "use lib
    do {....};" at the top of the "source" script.

    PerlSetEnv does helps in my case.
    i appreciate your comment & hope the investigation will
    turn out nicely.

     
  • Malcolm Box

    Malcolm Box - 2001-11-28
    • assigned_to: nobody --> mbox
    • summary: " Fatal: Can't locate" Errors --> " Fatal: Can't locate" Errors
    • status: open --> closed-fixed
     
  • Malcolm Box

    Malcolm Box - 2001-11-28

    Logged In: YES
    user_id=215386

    Fixed by adding a PERL5LIB line to .htaccess.
    Due to the way mod_perl works, any additions to @INC made by
    the script are only used on the first compile of the
    script. So if we need to load a module after that then it
    won't work, hence the transient errors.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks