Re: POD doesn't capture code semantics

2008-03-05 Thread Ian Malpass
Andy Armstrong wrote: Yeah, that could work. I wonder which is more likely to gain traction: * backwards compatible / slightly verbose * incompatible / concise I suppose either would be adopted if there were tools that made good use of it. And the backwards compatible approach clearly has the

Re: POD doesn't capture code semantics

2008-03-05 Thread Ian Malpass
Andy Armstrong wrote: =head2 C foo is a method... =head2 C bar is a subroutine... why not =method foo =sub bar How about: =for method =head2 C Bit ugly, but it should work. Additional stuff after "method" could provide more metadata, etc. Ian

Re: Find all the modules 'use'd in a directory

2008-02-07 Thread Ian Malpass
Jonathan Rockway wrote: * On Thu, Feb 07 2008, Matisse Enzer wrote: I want to utility program that I can point at a list of files and/r directories and get back a list of all the unique modules/pragmas that are imported via 'use' Before i write my own, using PPI, does this exist already in the

Re: Building tests when creating a distro

2008-01-29 Thread Ian Malpass
Dominique Quatravaux wrote: Chromatic already provided a good answer: create a derivative class of Module::Build in your Build.PL, see SUBCLASSING in Module::Build's POD documentation. Yeah, I think that's the way to go. I was just wondering if there was something out-of-the-box to save me th

Building tests when creating a distro

2008-01-28 Thread Ian Malpass
I'd like to make use of Test::Pod::Snippets to test the examples in my docs. The example shows using the PL_files option in Build.PL to create the tests automatically when you run ./Build, but this presumably means Test::Pod::Snippets becomes a build prereq, which seems silly. I can (and will)

Testing subroutines that assert a plan

2008-01-26 Thread Ian Malpass
I'm writing Test::Pod::URI, which is going to follow pretty much the same structure as Test::Pod::Coverage. As such, I've got a subroutine all_pod_uris_ok() which will find all the POD files in a distro and test them using the pod_uris_ok() subroutine. Each one of those calls is a test, so it c

Re: is_deeply and qr// content on 5.11

2008-01-18 Thread Ian Malpass
Jonathan Rockway wrote: # Failed test at t/new.t line 42. # Structures begin differing at: # $got->[0] = (?i-xsm:foo) # $expected->[0] = (?-xism:foo) # Looks like you failed 1 test of 24. Are you positive you didn't mean to say qr/foo/i ? Are you sure that $peu->stop_uris s

is_deeply and qr// content on 5.11

2008-01-18 Thread Ian Malpass
I got a failure message from CPAN testers for Pod::Extract::URI for 5.11.0 patch 33001 on Linux 2.6.22-3-amd64 (x86_64-linux-thread-multi-ld)[0] The failures were where I was testing to see if an arrayref of qr// patterns was the array I was expecting. is_deeply() has heretofore worked perfect

Re: Testing URIs in POD

2008-01-17 Thread Ian Malpass
brian d foy wrote: In article <[EMAIL PROTECTED]>, Ian Malpass <[EMAIL PROTECTED]> wrote: I've started crafting Test::Pod::URI to extract URIs from POD and check them to make sure they work. However, my CPAN-fu has been weak today, so I thought I'd mail here and see if a

Re: Tracking tests over time

2007-07-12 Thread Ian Malpass
Andy Armstrong wrote: With TAP that'd require either adding a persistent identifier to tests, requiring that the test numbering doesn't change over time (new tests added at the end) or that there's some heuristic that attempts to track assertions that have been renumbered. Requiring that test

Re: Testing URIs in POD

2007-06-06 Thread Ian Malpass
Nadim Khemir wrote: How do you plan to test things like: my $url_base = "http://search.cpan.org/"; ; for my $rest (qw(modlist/Graphics modlist/Database_Interfaces)) { do_anything_with($ur_base . $rest); } Well, if it's in a verbatim block, then "http://search.cpan.org/

Re: Pod::Critic?

2007-06-06 Thread Ian Malpass
David Cantrell wrote: * Has license details You mean licence :-) DAMMIT. * Method docs have examples That's going to get really boring really quickly, and putting in pointless examples just to satisfy this would hinder the reader in his attempt to quickly figger out what he ne

Pod::Critic?

2007-06-06 Thread Ian Malpass
I've been documenting lately, so I'm a bit POD-focussed at the moment :) I was pondering creating Pod::Critic, as a documentation analogue of Perl::Critic. Clearly it's not so easy to give hard-and-fast rules about documentation, but I thought it might be useful as a framework for enforcing i

Kwalitee and "other dists requiring" report

2007-06-05 Thread Ian Malpass
Would it be easy and/or interesting to add the kwalitee of the distributions listed in the "other dists requiring X" section of the CPANTS report? Just an idle thought, really, stemming from me thinking about the is_prereq metric, along the lines of an "is_prereq for other high-kwalitee dists

Re: Testing URIs in POD

2007-06-03 Thread Ian Malpass
ReneeB wrote: Let this the POD from the (nonexistant) module Anything::URI: =head1 NAME Anything::URI =SYNOPSIS use Anything::URI; my $url = 'http://www.example.tld'; do_anything_with($url); ... In that case "http://www.example.tld"; shouldn't be extracted and tested as this is just a

Testing URIs in POD

2007-06-01 Thread Ian Malpass
I've started crafting Test::Pod::URI to extract URIs from POD and check them to make sure they work. However, my CPAN-fu has been weak today, so I thought I'd mail here and see if anyone knew of anything out there that already does such a thing. Anyone? Ian P.S. If there isn't such a thing, d

Re: CPANTS reports in e-mail

2007-05-31 Thread Ian Malpass
Gabor Szabo wrote: The question remaining for me is how to notify module authors who don't yet know about CPANTS? Oh, I guess you will say if someone wants to know on how to make his module better will find the resources including the modul-authors list and CPANTS. How about putting notes and