Hi! On Sun, Sep 18, 2005 at 11:48:02AM +0200, David Landgren wrote:
> Seriously though, I have a module whose test suite includes Test::Pod > and Test::Pod::Coverage, except that I use the following construct: > > SKIP: { > skip( 'Test::Pod not installed on this system', 1 ) > unless do { > eval qq{ use Test::Pod }; > $@ ? 0 : 1; > }; > > pod_file_ok( 'foobar.pm' ); > } > > The cpants analysis fails to recognise this as valid. What is it looking > for and/or could it be taught to look for this? I thought that it was > only looking for a string eval of "use Test::Pod". It does, but the qq{} you're using isn't recognised by the regex. I'll try to improve it a bit. In the long run I'd like to use PPI to parse the code properly (or at least some magnitudes more proper than I do). > Congratulations on a job well done! Thanks! -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}