Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Simple CPAN distribution.

Report information
The Basics
Id: 54239
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: mst [...] shadowcat.co.uk
Cc: ovid [...] cpan.org
AdminCc:

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



Subject: Test::More subtest function has gratuitous prototype
Date: Wed, 3 Feb 2010 05:33:14 +0000
To: bugs-Test-Simple [...] rt.cpan.org
From: Matt S Trout <mst [...] shadowcat.co.uk>
Given an & in anything but the first position doesn't provide any syntactic sugar, the subtest() prototype seems pointless. it also breaks my $subtest = sub { ... }; subtest foo => $subtest; instead requiring the uglier (and rarely seen these days) subtest foo => \&subtest; syntax. I ... I don't see the point. If there's a point I'm missing, could you enlighten me? -- Matt S Trout Catalyst and DBIx::Class consultancy with a clue Technical Director and a commit bit: http://shadowcat.co.uk/catalyst/ Shadowcat Systems Limited mst (@) shadowcat.co.uk http://shadowcat.co.uk/blog/matt-s-trout/
RT-Send-CC: curtis_ovid_poe [...] yahoo.com
On Wed Feb 03 00:34:32 2010, mst@shadowcat.co.uk wrote: Show quoted text
> Given an & in anything but the first position doesn't provide any > syntactic sugar, the subtest() prototype seems pointless.
I agree. But Ovid wrote that code and there's an explicit test of the prototype, so let's see if he has a rationale.
On Wed Feb 03 00:34:32 2010, mst@shadowcat.co.uk wrote: Show quoted text
> Given an & in anything but the first position doesn't provide any syntactic > sugar, the subtest() prototype seems pointless. it also breaks > > my $subtest = sub { ... }; > > subtest foo => $subtest; > > instead requiring the uglier (and rarely seen these days)
That's my fault. Test functions almost always have prototypes and my first pass at subtest() had (&$), but subtest names were getting lost on long subtests. That prototype can be removed. Cheers, Ovid
Prototype removed in c629800