File::ReadBackwards, use integer

X

xhoster

I'm having trouble using File::ReadBackwards on large files.

The problem is that the line:
my $read_size = $seek_pos % $max_read_size || $max_read_size ;
yields -1 when $seek_pos is large.

I've "solved" the problem by commenting out the line:
#use integer;


But I'm sure that "use integer" wasn't put there just be ornery, so now I
wonder what awful thing is going to happen because I commented it out.

Any thoughts?

Thanks,

Xho
 
A

Anno Siegel

I'm having trouble using File::ReadBackwards on large files.

The problem is that the line:
my $read_size = $seek_pos % $max_read_size || $max_read_size ;
yields -1 when $seek_pos is large.

I've "solved" the problem by commenting out the line:
#use integer;


But I'm sure that "use integer" wasn't put there just be ornery, so now I
wonder what awful thing is going to happen because I commented it out.

That "use integer" governs 220 lines of code. That's not a whole lot,
but it would be hard to find all places where "integer" might make a
difference. I'd ask Uri why it's there.

Even without looking at the code, "use integer" is likely to introduce a
2GB limit -- the documentation doesn't seem to mention such a thing.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top