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: 62319
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: Nobody in particular
Requestors: bpphillips+bitcard [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: filenames should be shortened if necessary
I was trying to profile some code that exists on a fairly lengthy NFS directory path. My include path had short symlinks to that path so NYTProf's attempt to strip off the INC prefix were unsuccessful. This resulted in a filename that was too long for the filesystem (ext3) to handle. I'm not sure if the filenames are supposed to be easily recognizable but I would suggest that if it's too long (i.e. > 255 characters) that some sort of shortening be applied before trying to write the file. Perhaps using an MD5 hash to ensure uniqueness or something? I ended up hard-coding the canonical path into the path prefix stripping code to get it to work but I'd hope this is a (probably rare) corner case that NYTProf could handle. Thanks!
On Wed Oct 20 13:23:55 2010, bphillips wrote: Show quoted text
> I was trying to profile some code that exists on a fairly lengthy NFS > directory path. My include path had short symlinks to that path so > NYTProf's attempt to strip off the INC prefix were unsuccessful. This > resulted in a filename that was too long for the filesystem (ext3) to > handle.
As a way of example in case the above wasn't clear: # the actual path is /some/insanely/long/path/to/my/apps/lib/directory @INC = qw(/short/symlink/to/lib); Since the actual path isn't in @INC, it's not stripped correctly. The HTML filename that's generated will look something like this: ./some-insanely-long-path-to-my-apps-lib-direcotry-My-Module.html I'm hoping it would be fairly easy to check the length of the file and if it's too long (I realize this isn't very portable but it seems that the most common filesystems support up to 255 characters for filenames) a hash would be computed.
Fixed (in r1397). Thanks!