Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 34234
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: akaplan [...] cpan
Requestors: andy [...] halogix.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08
Fixed in: (no value)



Subject: AutoLoader borks source file location from debugger
Download (untitled) / with headers
text/plain 926b
By email from andy@halogix.[nospam]com: Hi, I love your work, it's making my work easier :-) Just one thing that I can't get quite working though: Show quoted text
> perl -d:NYTProf -MBSD::Resource -e 'getrlimit(RLIMIT_NOFILE)' > nytprofhtml
Borks out with the following error: Show quoted text
> > Generating report... > > Unable to locate source file: blib/lib/BSD/Resource.pm (autosplit
into blib/lib/auto/BSD/Resource/getrlimit.al) Show quoted text
> > at /usr/bin/nytprofhtml line 113 > > Unable to open blib/lib/BSD/Resource.pm (autosplit into
blib/lib/auto/BSD/Resource/getrlimit.al) for reading: No such file or directory Show quoted text
> > Try running again in the same directory as you ran Devel::NYTProf,or
ensure @INC is correct. Show quoted text
> > at
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Devel/NYTProf/Reader.pm line 294 Show quoted text
> >
Devel::NYTProf::Reader::report('Devel::NYTProf::Reader=HASH(0x88b7e84)') called at /usr/bin/nytprofhtml line 113 Any ideas? Andrew [snip]
Download (untitled) / with headers
text/plain 1.7k
On Wed Mar 19 08:46:28 2008, AKAPLAN wrote: Show quoted text
> By email from andy@halogix.[nospam]com: > > Hi, I love your work, it's making my work easier :-) Just one thing > that > I can't get quite working though: >
> > perl -d:NYTProf -MBSD::Resource -e 'getrlimit(RLIMIT_NOFILE)' > > nytprofhtml
> > Borks out with the following error: >
> > > Generating report... > > > Unable to locate source file: blib/lib/BSD/Resource.pm (autosplit
> into blib/lib/auto/BSD/Resource/getrlimit.al)
> > > at /usr/bin/nytprofhtml line 113 > > > Unable to open blib/lib/BSD/Resource.pm (autosplit into
> blib/lib/auto/BSD/Resource/getrlimit.al) for reading: No such file or > directory
> > > Try running again in the same directory as you ran
> Devel::NYTProf,or > ensure @INC is correct.
> > > at
> /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- > multi/Devel/NYTProf/Reader.pm > line 294
> > >
> Devel::NYTProf::Reader::report('Devel::NYTProf::Reader=HASH(0x88b7e84)') > called at /usr/bin/nytprofhtml line 113 > > Any ideas? > > Andrew [snip]
The problem is explained in detail in the error, however it might appear ambiguous because the file path strings isn't quoted (I'll fix that too). The module you are using uses AutoLoader, and the sub you are calling (getrlimit) calls into an AutoLoaded XS library. Apparently the AutoLoader will append the library to the source file path string thereby invalidating it. E.g.: Source is "blib/lib/BSD/Resource.pm" but it is reported as "blib/lib/BSD/Resource.pm (autosplit into blib/lib/auto/BSD/Resource/getrlimit.al)." So nytprofhtml is trying to open that whole silly string. What is the fix for this that wouldn't be slow? Suggestions are welcome, otherwise this will be fixed in 0.09. Thanks Andy.
Download (untitled) / with headers
text/plain 322b
This issue is the major fix in 0.09. The paths are now cleaned and resolve properly. Additionally the line hit counts will match the original source file (not the autosplit, autoloaded module). Test 14 has been added which explicitly tests this problem. Update, try again and reopen this if there are further problems.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.