Skip Menu |

This queue is for tickets about the Fortran-Format CPAN distribution.

Report information
The Basics
Id: 47484
Status: open
Priority: 0/
Queue: Fortran-Format

People
Owner: Nobody in particular
Requestors: erik.andersen [...] liu.se
Cc:
AdminCc:

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



Subject: Bug with "x"
Date: Wed, 1 Jul 2009 11:29:54 +0200
To: <bug-Fortran-Format [...] rt.cpan.org>
From: Erik Andersén <erik.andersen [...] liu.se>
use Fortran::Format; my $f = Fortran::Format->new("a2,x,a3"); my $x = "0123456789"; my @y = $f->read($x,1, 1); print "@y\n"; Result Can't locate object method "read_once" via package "Fortran::Format::Edit::X" at /home/erik/projekt/ladok-mysql/Fortran/Format.pm line 769, <$fh> line 1. our $VERSION = '0.90'; erian24@sake-linux:~/tmp$ perl -v This is perl, v5.10.0 built for i486-linux-gnu-thread-multi Linux sake-linux.unit.liu.se 2.6.22.18-co-0.7.4 #1 PREEMPT Wed Apr 15 18:57:39 UTC 2009 i686 GNU/Linux With best regards, Erik Andersén
Subject: Re: [rt.cpan.org #47484] Bug with "x"
Date: Wed, 1 Jul 2009 08:17:14 -0400
To: bug-Fortran-Format [...] rt.cpan.org
From: Ivan Tubert-Brohman <itub [...] cpan.org>
Oops, I evidently never tested reading formats with "X". Thanks for pointing this out. I'll try to fix it when I have some time, but I can't make any promises. Ivan On Wed, Jul 1, 2009 at 5:30 AM, Erik Andersén via RT<bug-Fortran-Format@rt.cpan.org> wrote: Show quoted text
> Wed Jul 01 05:30:24 2009: Request 47484 was acted upon. > Transaction: Ticket created by erik.andersen@liu.se >       Queue: Fortran-Format >     Subject: Bug with "x" >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: erik.andersen@liu.se >      Status: new >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=47484 > > > > use Fortran::Format; > my $f = Fortran::Format->new("a2,x,a3"); > my $x = "0123456789"; > my @y = $f->read($x,1, 1); > print "@y\n"; > > Result > > Can't locate object method "read_once" via package > "Fortran::Format::Edit::X" at > /home/erik/projekt/ladok-mysql/Fortran/Format.pm line 769, <$fh> line 1. > > > our $VERSION = '0.90'; > > erian24@sake-linux:~/tmp$ perl -v > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi > > Linux sake-linux.unit.liu.se 2.6.22.18-co-0.7.4 #1 PREEMPT Wed Apr 15 > 18:57:39 UTC 2009 i686 GNU/Linux > > > With best regards, > > Erik Andersén > >
From: jini.zh [...] gmail.com
It seems it hasn't been fixed yet. I hope this patch will help you: diff --git a/Format.pm b/Format.pm index 1b34c4c..06e2efa 100644 --- a/Format.pm +++ b/Format.pm @@ -1101,6 +1101,12 @@ sub write_once { ""; } +sub read_once { + my ($self) = @_; + $self->writer->position( relative => 1 ); + "" +}; + package Fortran::Format::Edit::SLASH; our @ISA = "Fortran::Format::Node";