The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Build.PL 626
Changes 2416
MANIFEST 02
META.yml 46
dist.ini 12
lib/SQLite/Work/CGI.pm 55
lib/SQLite/Work/Mail.pm 22
lib/SQLite/Work.pm 1816
scripts/sqlreport 22
scripts/sqlw_import 22
scripts/sqlw_mail 22
t/00-compile.t 5866
t/000-report-versions-tiny.t 085
t/release-distmeta.t 01
t/release-pod-coverage.t 01
t/release-pod-syntax.t 01
t/release-portability.t 03
17 files changed (This is a version diff) 124238
@@ -1,4 +1,5 @@
 
+# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.008.
 use strict;
 use warnings;
 
@@ -7,10 +8,7 @@ use Module::Build 0.3601;
 
 my %module_build_args = (
   "build_requires" => {
-    "File::Find" => 0,
-    "Module::Build" => "0.3601",
-    "Test::More" => 0,
-    "perl" => "v5.8.5"
+    "Module::Build" => "0.3601"
   },
   "configure_requires" => {
     "Module::Build" => "0.3601"
@@ -20,7 +18,7 @@ my %module_build_args = (
     "Kathryn Andersen"
   ],
   "dist_name" => "SQLite-Work",
-  "dist_version" => "0.13",
+  "dist_version" => "0.14",
   "license" => "perl",
   "module_name" => "SQLite::Work",
   "recommends" => {},
@@ -42,10 +40,32 @@ my %module_build_args = (
     "scripts/sqlw_import",
     "scripts/sqlreport",
     "scripts/sqlw_mail"
-  ]
+  ],
+  "test_requires" => {
+    "File::Spec" => 0,
+    "IO::Handle" => 0,
+    "IPC::Open3" => 0,
+    "Test::More" => "0.88",
+    "perl" => "v5.8.5"
+  }
 );
 
 
+my %fallback_build_requires = (
+  "File::Spec" => 0,
+  "IO::Handle" => 0,
+  "IPC::Open3" => 0,
+  "Module::Build" => "0.3601",
+  "Test::More" => "0.88",
+  "perl" => "v5.8.5"
+);
+
+
+unless ( eval { Module::Build->VERSION(0.4004) } ) {
+  delete $module_build_args{test_requires};
+  $module_build_args{build_requires} = \%fallback_build_requires;
+}
+
 my $build = Module::Build->new(%module_build_args);
 
 $build->create_build_script;
@@ -1,6 +1,22 @@
 Revision History for SQLite-Work
 ================================
 
+v0.14 2014-01-07
+----------------
+
+* 2014-01-07 23:17:42 +1100
+  version bump
+* 2013-10-31 17:00:53 +1100
+  enable quotes in parameters
+* 2013-10-31 14:56:04 +1100
+  Merge branch 'develop' of https://github.com/rubykat/SQLite-Work into develop
+* 2013-10-31 14:55:30 +1100
+  passing args to work better with subclasses
+* 2013-09-14 11:49:24 +1000
+  added [ReportVersions::Tiny]
+* 2013-07-27 04:40:53 +1000
+  Fixing an inconsistancy with the behaviour of groups.
+
 v0.13 2012-07-04
 ----------------
 
@@ -57,30 +73,6 @@ v0.1003 2011-08-11
 * 2009-12-16 19:36:05 +1100
   added templates for all links
 
-v0.1002 2009-11-27
-------------------
-
-* 2008-11-30 03:57:21 +0000
-  generate README file
-* 2008-11-30 03:57:20 +0000
-  bump version to 0.1002
-* 2008-11-30 03:57:20 +0000
-  update release notes
-* 2008-11-30 03:56:46 +0000
-  * fixes to Build.PL
-* 2008-11-30 03:52:24 +0000
-  * corrected call to perl in test
-* 2008-11-30 03:51:47 +0000
-  *Meta.yml is generated, so should not be under revision control.
-* 2007-12-16 09:05:15 +0000
-  revamped depot
-
-v0.1001 2009-11-27
-------------------
-
-* 2007-12-16 09:05:15 +0000
-  revamped depot
-
 ====================================
 End of changes in the last 1000 days
 ====================================
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.008.
 Build.PL
 Changes
 LICENSE
@@ -17,6 +18,7 @@ scripts/sqlw_mail
 show.cgi
 show.epl
 t/00-compile.t
+t/000-report-versions-tiny.t
 t/01_load.t
 t/20tfiles.t
 t/30scalar.t
@@ -3,14 +3,16 @@ abstract: 'report on and update an SQLite database.'
 author:
   - 'Kathryn Andersen'
 build_requires:
-  File::Find: 0
+  File::Spec: 0
+  IO::Handle: 0
+  IPC::Open3: 0
   Module::Build: 0.3601
-  Test::More: 0
+  Test::More: 0.88
   perl: v5.8.5
 configure_requires:
   Module::Build: 0.3601
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300020, CPAN::Meta::Converter version 2.120630'
+generated_by: 'Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,4 +30,4 @@ requires:
   Text::NeatTemplate: 0
   strict: 0
   warnings: 0
-version: 0.13
+version: 0.14
@@ -1,5 +1,5 @@
 name              = SQLite-Work
-version           = 0.13
+version           = 0.14
 main_module       = lib/SQLite/Work.pm
 
 author            = Kathryn Andersen
@@ -32,6 +32,7 @@ log_format = * %ai%n  %s
 [ModuleBuild]
 
 ; Tests --------------------------
+[ReportVersions::Tiny]
 [ExtraTests]
 [Test::Compile]
 [PodCoverageTests]
@@ -1,6 +1,6 @@
 package SQLite::Work::CGI;
 {
-  $SQLite::Work::CGI::VERSION = '0.13';
+  $SQLite::Work::CGI::VERSION = '0.14';
 }
 use strict;
 use warnings;
@@ -11,7 +11,7 @@ SQLite::Work::CGI - Report and update a SQLite database using CGI
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1045,9 +1045,9 @@ EOT
 	    my (@vals) = $self->{cgi}->param($pfield);
 	    foreach my $val (@vals)
 	    {
-		$result .= "<input type='hidden' name='$pfield' value='";
-		$result .= $val;
-		$result .= "'/>\n";
+                $result .=<<EOT;
+<input type='hidden' name="$pfield" value="${val}"/>
+EOT
 	    }
 	}
     }
@@ -1,6 +1,6 @@
 package SQLite::Work::Mail;
 {
-  $SQLite::Work::Mail::VERSION = '0.13';
+  $SQLite::Work::Mail::VERSION = '0.14';
 }
 use strict;
 use warnings;
@@ -11,7 +11,7 @@ SQLite::Work::Mail - send mail with data from an SQLite table.
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1,6 +1,6 @@
 package SQLite::Work;
 {
-  $SQLite::Work::VERSION = '0.13';
+  $SQLite::Work::VERSION = '0.14';
 }
 use strict;
 use warnings;
@@ -11,7 +11,7 @@ SQLite::Work - report on and update an SQLite database.
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1200,7 +1200,7 @@ sub get_total_matching {
     my $table = $args{table};
 
     # build up the query data
-    my @where = $self->build_where_conditions(
+    my @where = $self->build_where_conditions(%args,
 	where=>$args{where}, not_where=>$args{not_where});
     
     my $total_query = "SELECT COUNT(*) FROM $table";
@@ -1582,7 +1582,7 @@ sub make_selections {
     $offset = 0 if $offset < 0;
 
     # build up the query data
-    my @where = $self->build_where_conditions(
+    my @where = $self->build_where_conditions(%args,
 	where=>$args{where}, not_where=>$args{not_where});
     
     my $jquery = '';
@@ -1822,7 +1822,7 @@ sub get_distinct_col {
     my $colname = $args{colname};
 
     # build up the query data
-    my @where = $self->build_where_conditions(
+    my @where = $self->build_where_conditions(%args,
 	where=>$args{where}, not_where=>$args{not_where});
     
     my $query = "SELECT DISTINCT $colname FROM $table";
@@ -2212,18 +2212,24 @@ sub format_report {
 
     # make headers for all the headers
     # set the headers and entry columns
-    my %in_header = ();
     my %prev_head = ();
     if (@sort_by and @headers)
     {
-	for (my $i=0; $i < @headers && $i < @sort_by; $i++)
+        for (my $i=0; $i < @headers && $i < @sort_by; $i++)
 	{
 	    $prev_head{$i} = '';
 	    # read each header template if it's a file
 	    $headers[$i] = $self->get_template($headers[$i]);
-	}
-	# find out what fields are in the headers
-	my $all_headers = join('', @headers);
+            # read each 'group' template if the template is a file
+            if (@groups and exists $groups[$i] and defined $groups[$i])
+            {
+		$groups[$i] = $self->get_template($groups[$i]);
+            }
+        }
+
+	# find out what fields are in the headers and groups
+        my %in_header = ();
+	my $all_headers = join('', @headers, @groups);
 	while ($all_headers =~ m/{\$(\w+)[:\w]*}/)
 	{
 	    $in_header{$1} = 1;
@@ -2241,14 +2247,6 @@ sub format_report {
 		$show_cols{$col} = 0;
 	    }
 	}
-	# read each 'group' template if the template is a file
-	if (@groups)
-	{
-	    foreach my $group (@groups)
-	    {
-		$group = $self->get_template($group);
-	    }
-	}
     }
     #
     # Set the nicer column name labels
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 package main;
 {
-  $main::VERSION = '0.13';
+  $main::VERSION = '0.14';
 }
 # vim:ts=8 sw=4 sts=4 ai
 use strict;
@@ -13,7 +13,7 @@ sqlreport - make reports on a table in an SQLite database
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 package main;
 {
-  $main::VERSION = '0.13';
+  $main::VERSION = '0.14';
 }
 # vim:ts=8 sw=4 sts=4 ai
 use strict;
@@ -13,7 +13,7 @@ sqlw_import - import a Field:Value datafile into an SQLite database.
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 package main;
 {
-  $main::VERSION = '0.13';
+  $main::VERSION = '0.14';
 }
 # vim:ts=8 sw=4 sts=4 ai
 use strict;
@@ -13,7 +13,7 @@ sqlw_mail - send mail with data from an SQLite table.
 
 =head1 VERSION
 
-version 0.13
+version 0.14
 
 =head1 SYNOPSIS
 
@@ -1,73 +1,81 @@
-#!perl
-
+use 5.006;
 use strict;
 use warnings;
 
-use Test::More;
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
 
+use Test::More  tests => 6 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
 
 
-use File::Find;
-use File::Temp qw{ tempdir };
 
-my @modules;
-find(
-  sub {
-    return if $File::Find::name !~ /\.pm\z/;
-    my $found = $File::Find::name;
-    $found =~ s{^lib/}{};
-    $found =~ s{[/\\]}{::}g;
-    $found =~ s/\.pm$//;
-    # nothing to skip
-    push @modules, $found;
-  },
-  'lib',
+my @module_files = (
+    'SQLite/Work.pm',
+    'SQLite/Work/CGI.pm',
+    'SQLite/Work/Mail.pm'
 );
 
-sub _find_scripts {
-    my $dir = shift @_;
-
-    my @found_scripts = ();
-    find(
-      sub {
-        return unless -f;
-        my $found = $File::Find::name;
-        # nothing to skip
-        open my $FH, '<', $_ or do {
-          note( "Unable to open $found in ( $! ), skipping" );
-          return;
-        };
-        my $shebang = <$FH>;
-        return unless $shebang =~ /^#!.*?\bperl\b\s*$/;
-        push @found_scripts, $found;
-      },
-      $dir,
-    );
-
-    return @found_scripts;
-}
+my @scripts = (
+    'scripts/sqlreport',
+    'scripts/sqlw_import',
+    'scripts/sqlw_mail'
+);
+
+# no fake home requested
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
 
-my @scripts;
-do { push @scripts, _find_scripts($_) if -d $_ }
-    for qw{ bin script scripts };
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
 
-my $plan = scalar(@modules) + scalar(@scripts);
-$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
+open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
 
+my @warnings;
+for my $lib (@module_files)
 {
-    # fake home for cpan-testers
-    # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 );
-
-    like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
-        for sort @modules;
-
-    SKIP: {
-        eval "use Test::Script 1.05; 1;";
-        skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
-        foreach my $file ( @scripts ) {
-            my $script = $file;
-            $script =~ s!.*/!!;
-            script_compiles( $file, "$script script compiles" );
-        }
+    # see L<perlfaq8/How can I capture STDERR from an external command?>
+    my $stderr = IO::Handle->new;
+
+    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
+    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+    my @_warnings = <$stderr>;
+    waitpid($pid, 0);
+    is($?, 0, "$lib loaded ok");
+
+    if (@_warnings)
+    {
+        warn @_warnings;
+        push @warnings, @_warnings;
     }
 }
+
+foreach my $file (@scripts)
+{ SKIP: {
+    open my $fh, '<', $file or warn("Unable to open $file: $!"), next;
+    my $line = <$fh>;
+    close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!.*?\bperl\b\s*(.*)$/;
+
+    my @flags = $1 ? split(/\s+/, $1) : ();
+
+    my $stderr = IO::Handle->new;
+
+    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file);
+    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+    my @_warnings = <$stderr>;
+    waitpid($pid, 0);
+    is($?, 0, "$file compiled ok");
+
+   # in older perls, -c output is simply the file portion of the path being tested
+    if (@_warnings = grep { !/\bsyntax OK$/ }
+        grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)
+    {
+        warn @_warnings;
+        push @warnings, @_warnings;
+    }
+} }
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
@@ -0,0 +1,85 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+# This is a relatively nice way to avoid Test::NoWarnings breaking our
+# expectations by adding extra tests, without using no_plan.  It also helps
+# avoid any other test module that feels introducing random tests, or even
+# test plans, is a nice idea.
+our $success = 0;
+END { $success && done_testing; }
+
+# List our own version used to generate this
+my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
+
+eval {                     # no excuses!
+    # report our Perl details
+    my $want = 'v5.8.5';
+    $v .= "perl: $] (wanted $want) on $^O from $^X\n\n";
+};
+defined($@) and diag("$@");
+
+# Now, our module version dependencies:
+sub pmver {
+    my ($module, $wanted) = @_;
+    $wanted = " (want $wanted)";
+    my $pmver;
+    eval "require $module;";
+    if ($@) {
+        if ($@ =~ m/Can't locate .* in \@INC/) {
+            $pmver = 'module not found.';
+        } else {
+            diag("${module}: $@");
+            $pmver = 'died during require.';
+        }
+    } else {
+        my $version;
+        eval { $version = $module->VERSION; };
+        if ($@) {
+            diag("${module}: $@");
+            $pmver = 'died during VERSION check.';
+        } elsif (defined $version) {
+            $pmver = "$version";
+        } else {
+            $pmver = '<undef>';
+        }
+    }
+
+    # So, we should be good, right?
+    return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n");
+}
+
+eval { $v .= pmver('CGI','any version') };
+eval { $v .= pmver('DBI','any version') };
+eval { $v .= pmver('Data::Dumper','any version') };
+eval { $v .= pmver('File::Spec','any version') };
+eval { $v .= pmver('File::Temp','any version') };
+eval { $v .= pmver('Getopt::ArgvFile','any version') };
+eval { $v .= pmver('Getopt::Long','2.34') };
+eval { $v .= pmver('IO::Handle','any version') };
+eval { $v .= pmver('IPC::Open3','any version') };
+eval { $v .= pmver('Module::Build','0.3601') };
+eval { $v .= pmver('POSIX','any version') };
+eval { $v .= pmver('Pod::Usage','any version') };
+eval { $v .= pmver('Test::More','0.88') };
+eval { $v .= pmver('Text::NeatTemplate','any version') };
+eval { $v .= pmver('strict','any version') };
+eval { $v .= pmver('warnings','any version') };
+
+
+# All done.
+$v .= <<'EOT';
+
+Thanks for using my code.  I hope it works for you.
+If not, please try and include this output in the bug report.
+That will help me reproduce the issue and solve your problem.
+
+EOT
+
+diag($v);
+ok(1, "we really didn't test anything, just reporting data");
+$success = 1;
+
+# Work around another nasty module on CPAN. :/
+no warnings 'once';
+$Template::Test::NO_FLUSH = 1;
+exit 0;
@@ -7,6 +7,7 @@ BEGIN {
   }
 }
 
+# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
 
 use Test::More;
 
@@ -7,6 +7,7 @@ BEGIN {
   }
 }
 
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
 
 use Test::More;
 
@@ -7,6 +7,7 @@ BEGIN {
   }
 }
 
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
 use Test::More;
 
 eval "use Test::Pod 1.41";
@@ -8,6 +8,9 @@ BEGIN {
 }
 
 
+use strict;
+use warnings;
+
 use Test::More;
 
 eval 'use Test::Portability::Files';