Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread Shlomi Fish
On Tuesday 19 September 2006 17:59, Ovid wrote: - Original Message From: Shlomi Fish [EMAIL PROTECTED] my $parser = TAPx::Parser-new( { stream = TAPx::Parser::Iterator-new($test_output_orig), } ); I'd recommend trying

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread Ovid
- Original Message From: Shlomi Fish [EMAIL PROTECTED] H you may wish to differentiate between #2 and #3 by saying that a filename is passed as a plain string, while a string is passed by taking a reference to it. That's what Template Toolkit and other modules are doing.

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread Smylers
Ovid writes: From: Shlomi Fish [EMAIL PROTECTED] H you may wish to differentiate between #2 and #3 by saying that a filename is passed as a plain string, while a string is passed by taking a reference to it. That's what Template Toolkit and other modules are doing. Good

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread demerphq
On 9/20/06, Smylers [EMAIL PROTECTED] wrote: Ovid writes: From: Shlomi Fish [EMAIL PROTECTED] H you may wish to differentiate between #2 and #3 by saying that a filename is passed as a plain string, while a string is passed by taking a reference to it. That's what Template

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread Jonathan Rockway
You of course are aware of what a pain it is to apply this logic? Yes, which is exactly why you shouldn't mess around with references where they're not necessary. I suggest: my $foo = Foo::Bar-new({path = $path}); or my $foo = Foo::Bar-new({data = $data}); Foo::Bar::new looks like: sub new

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread chromatic
On Wednesday 20 September 2006 07:53, demerphq wrote: On 9/20/06, Smylers [EMAIL PROTECTED] wrote: If you get a reference to a blessed object and that object has overloaded stringification then please just treat it as a string, not a reference. You of course are aware of what a pain it

Re: A Suitable Iterator for TAPx::Parser

2006-09-20 Thread A. Pagaltzis
* Ovid [EMAIL PROTECTED] [2006-09-19 17:05]: I'd recommend trying this: my $parser = TAPx::Parser-new( { source = $source } ); I did that to simplify building parsers and it's new as of 0.30. $source can be one of: 1. An array reference of TAP lines. 2. A complete string of TAP

A Suitable Iterator for TAPx::Parser

2006-09-19 Thread Shlomi Fish
Hi all! I thought I could safely rely on using a Test::Run::Iteratory (essentially the same as Test::Harness::Iterator) object as a an argument to stream = in TAPx::Parser. However, then Ovid added more required to the iterator. Switching to TAPx::Parser::Iterator :

Re: A Suitable Iterator for TAPx::Parser

2006-09-19 Thread Ovid
- Original Message From: Shlomi Fish Switching to TAPx::Parser::Iterator : http://search.cpan.org/~ovid/TAPx-Parser-0.30/lib/TAPx/Parser/Iterator.pm Solved this problem. However, the TAPx::Parser::Iterator POD says: FOR INTERNAL USE ONLY!. Can you send me a short

Re: A Suitable Iterator for TAPx::Parser

2006-09-19 Thread Shlomi Fish
On Tuesday 19 September 2006 15:03, Ovid wrote: - Original Message From: Shlomi Fish Switching to TAPx::Parser::Iterator : http://search.cpan.org/~ovid/TAPx-Parser-0.30/lib/TAPx/Parser/Iterator.pm Solved this problem. However, the TAPx::Parser::Iterator POD says: FOR

Re: A Suitable Iterator for TAPx::Parser

2006-09-19 Thread Ovid
- Original Message From: Shlomi Fish [EMAIL PROTECTED] my $parser = TAPx::Parser-new( { stream = TAPx::Parser::Iterator-new($test_output_orig), } ); I'd recommend trying this: my $parser = TAPx::Parser-new( { source =