Re: RFC: Test::JSON
On Tue, 2005-11-15 at 09:22 +1100, Adam Kennedy wrote: > The question is, what level of deps is "crazy" for something that they > don't actually need on their computer permanently but only need for 2 > seconds to install something of yours. I sleep pretty well at night refusing to support people who don't run the tests that ship with my modules. There's my crazy. If you're (not you Adam, but the generic you) not willing to give up maybe a couple of megabytes of disk space for all of the testing modules on the CPAN altogether, I feel little obligation to spend my free time to help you debug a problem the hard way. -- c
Re: RFC: Test::JSON
-BEGIN PGP SIGNED MESSAGE- Moin, On Monday 14 November 2005 23:22, Adam Kennedy wrote: > Chromatic wrote: > > On Mon, 2005-11-14 at 12:45 -0800, Ovid wrote: > >>Yes, I can see that. I could actually have dropped Test::Differences > >>"eq_or_diff" and just used the "is_deeply" function from Test::More, > >>but when working with large data structures, there's just no > >> comparison between the two. I suppose I could make > >> Test::Differences optional and fall back on is_deeply if they don't > >> have T:D installed. > > > > At some point, people install modules for the convenience of not > > writing that code themselves. I think they'll survive if you require > > modules for the convenience of not having to write that code > > yourself, at least if you don't go crazy with it. > > The question is, what level of deps is "crazy" for something that they > don't actually need on their computer permanently but only need for 2 > seconds to install something of yours. This reminds me of my mini-rant about testing module dependencies. As I said, enjoy re-suing code, but sometimes less is more. Finding the middle ground is hard, but the extremes can be spotted easy. :) Thats als why I find it really good that perl contains so many modules in a standard distribution, your users don't need to install tons of stuff just to use Foo::BAR. Best wishes, Tels - -- Signed on Tue Nov 15 11:13:46 2005 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Yeah, baby, yeah!" -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iQEVAwUBQ3m1PncLPEOTuEwVAQEPSAf+LZzx2MUmYC4+4ixX17oQkHRAQyZ/tiG6 XywrcLBJ/nuyxFc0f9sBfIJgiD/pLUadT4Ac20F69FM0I7uUkaTQOuhzqxOAOkVR 7P3EU3i3TjKbSwg35mqmXKvwF1WT3YBJB1YQ8hzUneDnu+O8fJrMnLq+24RRgely MkgX7hpIGmLjfPD2uhpcINi28IvzA/zlPwqydx7WiJTPF5oIdZg2pn3JS5UGlYoG qSgzW+ZeHeo3pLGMftC7pGrEBfJpGQ5sEo4GAAbMQx/sh1yGGoNXuOXAmNL4V/fH Kp0gNYqVMnD93LFSIqjlrRlVopFrDGupjldFQKBBZQP6b0eoadSTVA== =arzN -END PGP SIGNATURE-
Re: RFC: Test::JSON
Chromatic wrote: On Mon, 2005-11-14 at 12:45 -0800, Ovid wrote: Yes, I can see that. I could actually have dropped Test::Differences "eq_or_diff" and just used the "is_deeply" function from Test::More, but when working with large data structures, there's just no comparison between the two. I suppose I could make Test::Differences optional and fall back on is_deeply if they don't have T:D installed. At some point, people install modules for the convenience of not writing that code themselves. I think they'll survive if you require modules for the convenience of not having to write that code yourself, at least if you don't go crazy with it. The question is, what level of deps is "crazy" for something that they don't actually need on their computer permanently but only need for 2 seconds to install something of yours. Adam K
Re: RFC: Test::JSON
On Mon, Nov 14, 2005 at 01:17:05PM -0800, chromatic wrote: > On Mon, 2005-11-14 at 12:45 -0800, Ovid wrote: > > > Yes, I can see that. I could actually have dropped Test::Differences > > "eq_or_diff" and just used the "is_deeply" function from Test::More, > > but when working with large data structures, there's just no comparison > > between the two. I suppose I could make Test::Differences optional and > > fall back on is_deeply if they don't have T:D installed. > > At some point, people install modules for the convenience of not writing > that code themselves. I think they'll survive if you require modules > for the convenience of not having to write that code yourself, at least > if you don't go crazy with it. Whilst I agree with this and I am quite happy installing testing modules I decided that with Devel::Cover I didn't want to create a dependency on Test::Differences so I took the approach of using it if it is availabile. In a reasonably complicated test module it took about 9 extra lines of code to optionally use Test::Differences. It is true that there is no comparison in the quality of the test output. The only downside is that it is another configuration on which I need to test before making a release. Oh, and Test::JSON works well for me. Thanks! -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net
Re: RFC: Test::JSON
On Mon, 2005-11-14 at 12:45 -0800, Ovid wrote: > Yes, I can see that. I could actually have dropped Test::Differences > "eq_or_diff" and just used the "is_deeply" function from Test::More, > but when working with large data structures, there's just no comparison > between the two. I suppose I could make Test::Differences optional and > fall back on is_deeply if they don't have T:D installed. At some point, people install modules for the convenience of not writing that code themselves. I think they'll survive if you require modules for the convenience of not having to write that code yourself, at least if you don't go crazy with it. -- c
Re: RFC: Test::JSON
--- Adam Kennedy <[EMAIL PROTECTED]> wrote: > My main comment would be that it can be very easy to get seduced in > to dependency bloat when writing Test:: modules, and you should pay > extra attention to avoiding it if possible. Yes, I can see that. I could actually have dropped Test::Differences "eq_or_diff" and just used the "is_deeply" function from Test::More, but when working with large data structures, there's just no comparison between the two. I suppose I could make Test::Differences optional and fall back on is_deeply if they don't have T:D installed. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
Re: RFC: Test::JSON
My main comment would be that it can be very easy to get seduced in to dependency bloat when writing Test:: modules, and you should pay extra attention to avoiding it if possible. This is especially so if you have a dependency on a Module::Build Test:: modules, which is going to want to install Module::Build for people that don't have it yet. It's especially grating when someone's module fails because it got stuck somewhere down in a cascade of Test:: dependencies. Same level of problem, but as the Mozilla people would say a "highly visible" problem. Adam K Ovid wrote: Hi all, For all of my harping about testing, I've never actually written a test module (though I've submitted patches). I just uploaded my first module, Test::JSON. (JSON is "JavaScript Object Notation", http://www.crockford.com/JSON/). As it's not hit the CPAN yet, I've attached a copy. Feedback welcome. Internally it uses the following: 'JSON' => 1.00, 'Test::Differences' => 0.47, 'Test::Simple' => 0.62, 'Test::Tester' => 0.103, Cheers, Ovid
RFC: Test::JSON
Hi all, For all of my harping about testing, I've never actually written a test module (though I've submitted patches). I just uploaded my first module, Test::JSON. (JSON is "JavaScript Object Notation", http://www.crockford.com/JSON/). As it's not hit the CPAN yet, I've attached a copy. Feedback welcome. Internally it uses the following: 'JSON' => 1.00, 'Test::Differences' => 0.47, 'Test::Simple' => 0.62, 'Test::Tester' => 0.103, Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ Test-JSON-0.01.tar.gz Description: 130210938-Test-JSON-0.01.tar.gz