Re: CPANifying our test framework - or parts of it
Andy Lester <[email protected]> Sat, 10 Sep 2016 14:00:42 -0500
| Newsgroups | gmane.comp.lang.perl.quality-assurance |
|---|---|
| Message-ID | <[email protected]> |
> On Sep 9, 2016, at 8:34 PM, Sam Kington <[email protected]> wrote: >=20 > How should I best extract this functionality into a proper CPAN = distribution (ideally using Test2)? I'd start with making it use Test2. Test2 covers a lot of what I see = yours doing. For instance, this code: structures =3D> [ { _hashref_contains =3D> { structure_id =3D> qr{^ (?<structure_id> STRUCT = \d+ ) $}x, type =3D> 'dolmen', material =3D> 'concrete', # There's probably stuff about where the dolmen # was erected but we ignore that for the purpose # of this test. } } looks like it would be, roughly this in Test2 structures =3D> array( hash =3D> { field structure_id =3D> match qr{^ = (?<structure_id> STRUCT \d+ ) $}x; field type =3D> 'dolmen', field material =3D> 'concrete', } } -- Andy Lester =3D> www.petdance.com