On Nov 7, 2006, at 11:37 PM, Adam Kennedy wrote:

I'm not sure you can reliably test that though, not to 100% anyway, given the problem of implicit params.

is( foo $bar, $baz, $expected );

which means

is( foo($bar, $baz), $expected );

Yes, his specific case is ok, but I think you need to be a bit cunning about how you check...

Well, the former is just bad coding style. So if Perl::Critic or PPI misinterprets it that's the coder's fault, not the tool's fault! :-)

One of the best lessons in Perl Best Practices: if your code is ambiguous without looking at the core Perl docs (or source code!), then it should be rewritten to be less ambiguous.

Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)


Reply via email to