This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id:
78257
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
GAAS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.90
Fixed in:
0.91



Subject: Deal with non-seekable IO
Programs that use an emulated IO class are now required to implement tell/seek/read.  In Text-CSV_XS-0.88 it was enough to implement getline().  Could you make Text-CSV_XS deal with this kind of simplified IO classes?

With Text-CSV_XS-0.90 this program dies with:
0.90
Can't locate object method "tell" via package "MyIO" at demo line 17.

-----------------------------------------------------------
BEGIN {
    package MyIO;
    sub new { return bless { c => 3 }, shift }
    sub getline {
my $self = shift;
return undef if $self->{c} == 0;
return join(",", 1 .. $self->{c}--) . "\n";
    }
}
 
 
use Text::CSV_XS ();
print $Text::CSV_XS::VERSION, "\n";
 
my $io = MyIO->new;
my $csv = Text::CSV_XS->new;
while (my $row = $csv->getline($io)) {
    use Data::Dump; dd $row;
 I guess your "Rip out the tell/seek introduced in 0.90" change in 0.91 made this problem go away.  At least my test programs are happy now.
Subject: Re: [rt.cpan.org #78257] Deal with non-seekable IO
Date: Sat, 13 Oct 2012 15:38:20 +0200
To: bug-Text-CSV_XS@rt.cpan.org
From: "H.Merijn Brand" <h.m.brand@xs4all.nl>
On Sat, 13 Oct 2012 02:59:09 -0400, "Gisle_Aas via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote:
Show quoted text
> Queue: Text-CSV_XS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=78257 > > > I guess your "Rip out the tell/seek introduced in 0.90" change in 0.91 made > this problem go away. At least my test programs are happy now.
Correct. It started out as a nice idea to be even more helpful in case of trouble, but grew to be impossible - at least with my knowledge - to get to a shape where everything would be happy: not worth the trouble. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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