Skip Menu |

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

Report information
The Basics
Id: 58962
Status: resolved
Priority: 0/
Queue: Text-FixedWidth

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

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



Subject: Feature request: parse() method should allow for a returned/cloned object
It would be nice when parsing streams inside of async system of fixed width data if one didn't have to re-initialize and or clone the object prior to parsing in order to get an object representation of the parsed data. Something like: my $format = Text::FixedWidth->new; $format->set_attributes(@attributes); my $data_object = $format->parse( string => $str, clone => 1 ); $data_object->get_foobar; # parsed data $format->get_foobar; # unset If you think this is a good idea and don't have the time I could probably whip up a patch pretty quick. Thanks, - Jason
On Tue Jun 29 20:02:27 2010, JMMILLS wrote: Show quoted text
> my $data_object = $format->parse( string => $str, clone => 1 );
Looks fine to me. Doesn't look like you're changing the current API, so adding that should be 100% backwards compatible. Yes? Show quoted text
> If you think this is a good idea and don't have the time I could > probably whip up a patch pretty quick.
I'd happily accept any such patch. :) http://github.com/jhannah/text-fixedwidth I promise I'll apply it quickly if you write it. :) Thanks, j irc.perl.org jhannah
Fixed in github.