Skip Menu |

This queue is for tickets about the File-BOM CPAN distribution.

Report information
The Basics
Id: 11277
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: File-BOM

People
Owner: matt.lawrence [...] virgin.net
Requestors: steve [...] purkis.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: 0.07



Subject: open via File::BOM doesn't support seek() ?
Hiya, Ta for File::BOM - quite handy! Unfortunately it seems to be breaking seek(): spurkis@dev:~ $ perl -d -MFile::BOM -MIO::File -e 1 Loading DB routines from perl5db.pl version 1.27 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> $fh = IO::File->new( 't/data/utf8_data.csv' ); DB<2> p <$fh> id,street,town,pc,country,english,french,chinese,arabic 10,"écoles",zoom,12,france,auctions,"Enchères","??","????" DB<3> $fh->seek(0,0) DB<4> p <$fh> id,street,town,pc,country,english,french,chinese,arabic 10,"écoles",zoom,12,france,auctions,"Enchères","??","????" DB<5> $fh = IO::File->new( 't/data/utf8_data.csv', '<:via(File::BOM)' ); DB<6> p <$fh> id,street,town,pc,country,english,french,chinese,arabic 10,"écoles",zoom,12,france,auctions,"Enchères","??","????" DB<7> $fh->seek(0,0) DB<8> p <$fh> DB<9> nothing is printed... -Steve
[SPURKIS - Fri Jan 28 12:28:54 2005]: Show quoted text
> Hiya, > > Ta for File::BOM - quite handy! > > Unfortunately it seems to be breaking seek(): >
Yes, I've just re-read PerlIO::via, and you have to explicitly enable seek() support. I've added an approximation of the supplied test to the distribution and made it pass on my system. Can you verify that your problem is solved before I upload to cpan? Cheers, Matt
Download File-BOM-0.07.tar.gz
application/x-gzip 8.3k

Message body not shown because it is not plain text.

[spurkis@quiup.com - Sat Jan 29 07:50:20 2005]: Show quoted text
> On Jan 28, 2005, at 18:40, via RT wrote: >
> >> Ta for File::BOM - quite handy! > >> > >> Unfortunately it seems to be breaking seek():
>
> > Yes, I've just re-read PerlIO::via, and you have to explicitly enable > > seek() support. > > > > I've added an approximation of the supplied test to the distribution > > and > > made it pass on my system. Can you verify that your problem is solved > > before I upload to cpan?
> > Hmm, I think you forgot to add 't/data/utf8_data.csv' :
Yes. I left it out of MANIFEST. Fixed now. I discovered disttest just after uploading that tarball :( Show quoted text
> And interestingly, w/o a BOM passes, but produces another warning: > [snip] > (any way to get ridda the exrta test output? That warning in > particular is avoidable...)
This has all been fixed. I removed the debugging diag() statement and got rid of that warning. make/Build test succeeds cleanly on my local system now. Show quoted text
> When I try it in the perl debugger: > [snip] > Does the trick!
Excellent. I uploaded it this morning so it should be available soon. Matt