[Bast-commits] r3382 - in trunk/DBIx-Class-InflateColumn-ISBN: . lib lib/DBIx lib/DBIx/Class lib/DBIx/Class/InflateColumn t t/lib t/lib/DBICTest t/lib/DBICTest/Schema t/var

penguin at dev.catalyst.perl.org penguin at dev.catalyst.perl.org
Fri May 25 16:14:10 GMT 2007


Author: penguin
Date: 2007-05-25 16:14:08 +0100 (Fri, 25 May 2007)
New Revision: 3382

Added:
   trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST
   trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST.SKIP
   trunk/DBIx-Class-InflateColumn-ISBN/Makefile.PL
   trunk/DBIx-Class-InflateColumn-ISBN/README
   trunk/DBIx-Class-InflateColumn-ISBN/lib/
   trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/
   trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/
   trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/InflateColumn/
   trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/InflateColumn/ISBN.pm
   trunk/DBIx-Class-InflateColumn-ISBN/t/
   trunk/DBIx-Class-InflateColumn-ISBN/t/00-load.t
   trunk/DBIx-Class-InflateColumn-ISBN/t/01-isbn.t
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest.pm
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema.pm
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema/
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema/Library.pm
   trunk/DBIx-Class-InflateColumn-ISBN/t/lib/sqlite.sql
   trunk/DBIx-Class-InflateColumn-ISBN/t/pod-coverage.t
   trunk/DBIx-Class-InflateColumn-ISBN/t/pod.t
   trunk/DBIx-Class-InflateColumn-ISBN/t/style-notabs.t
   trunk/DBIx-Class-InflateColumn-ISBN/t/var/
   trunk/DBIx-Class-InflateColumn-ISBN/t/var/test.db
Log:
Added DBIx::Class::InflateColumn::ISBN meat.

Added: trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,29 @@
+Changes
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/DBIx/Class/InflateColumn/IP.pm
+Makefile.PL
+MANIFEST
+MANIFEST.SKIP
+META.yml			# Will be created by "make dist"
+README
+t/00-load.t
+t/01-ip.t
+t/boilerplate.t
+t/lib/DBICTest.pm
+t/lib/DBICTest/Schema.pm
+t/lib/DBICTest/Schema/Host.pm
+t/lib/DBICTest/Schema/Network.pm
+t/lib/sqlite.sql
+t/pod-coverage.t
+t/pod.t
+t/style-notabs.t

Added: trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST.SKIP
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST.SKIP	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/MANIFEST.SKIP	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,21 @@
+\bRCS\b
+\bCVS\b
+,v$
+\B\.svn\b
+t/var
+^blib/
+^pm_to_blib
+^MakeMaker-\d
+Makefile$
+Makefile.old$
+Build.PL
+Build.bat
+\.db
+t/TEST$
+t/SMOKE$
+^blibdirs\.ts
+\.gz
+~$
+\.bak$
+^\.cvsignore
+TODO

Added: trunk/DBIx-Class-InflateColumn-ISBN/Makefile.PL
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/Makefile.PL	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/Makefile.PL	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use inc::Module::Install 0.65;
+
+name 'DBIx-Class-InflateColumn-ISBN';
+license 'perl';
+perl_version '5.006001';
+all_from 'lib/DBIx/Class/InflateColumn/ISBN.pm';
+
+requires 'DBIx::Class' => 0.07005;
+requires 'Business::ISBN' => 1.82;
+
+tests 't/*.t';
+clean_files 'DBIx-Class-InflateColumn-ISBN-* t/var';
+
+eval {
+    system 'pod2text lib/DBIx/Class/InflateColumn/ISBN.pm > README';
+};
+
+auto_install;
+WriteAll;

Added: trunk/DBIx-Class-InflateColumn-ISBN/README
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/README	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/README	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,87 @@
+NAME
+    DBIx::Class::InflateColumn::ISBN - Auto-create Business::ISBN objects
+    from columns.
+
+VERSION
+    Version 0.01
+
+SYNOPSIS
+    Load this component and declare columns as ISBNs with the appropriate
+    format.
+
+        package Library;
+        __PACKAGE__->load_components(qw/InflateColumn::ISBN Core/);
+        __PACKAGE__->add_columns(
+            isbn => {
+                data_type => 'varchar',
+                size => 13,
+                is_nullable => 0,
+                is_isbn => 1,
+            }
+        );
+
+    It had to be a varchar rather than a simple integer given that it is
+    possible for ISBNs to contain the character X. Old style ISBNs are 10
+    characters, not including hyphens, but new style ones are 13 characters.
+
+    Then you can treat the specified column as a Business::ISBN object.
+
+        print 'ISBN: ', $book->isbn->as_string;
+        print 'Publisher code: ', $book->isbn->publisher_code;
+
+METHODS
+  isbn_class
+    Arguments: $class
+
+    Gets/sets the address class that the columns should be inflated into.
+    The default class is Business::ISBN.
+
+  register_column
+    Chains with "register_column" in DBIx::Class::Row, and sets up ISBN
+    columns appropriately. This would not normally be called directly by end
+    users.
+
+AUTHOR
+    K. J. Cheetham "<jamie @ shadowcatsystems.co.uk>"
+
+BUGS
+    Please report any bugs or feature requests to
+    "bug-dbix-class-inflatecolumn-ISBN at rt.cpan.org", or through the web
+    interface at
+    <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-InflateColumn
+    -ISBN>. I will be notified, and then you'll automatically be notified of
+    progress on your bug as I make changes.
+
+SUPPORT
+    You can find documentation for this module with the perldoc command.
+
+        perldoc DBIx::Class::InflateColumn::ISBN
+
+    You can also look for information at:
+
+    * AnnoCPAN: Annotated CPAN documentation
+        <http://annocpan.org/dist/DBIx-Class-InflateColumn-ISBN>
+
+    * CPAN Ratings
+        <http://cpanratings.perl.org/d/DBIx-Class-InflateColumn-ISBN>
+
+    * RT: CPAN's request tracker
+        <http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-InflateColumn-I
+        SBN>
+
+    * Search CPAN
+        <http://search.cpan.org/dist/DBIx-Class-InflateColumn-ISBN>
+
+SEE ALSO
+    DBIx::Class::InflateColumn
+
+    Business::ISBN
+
+    WWW::Scraper::ISBN
+
+COPYRIGHT & LICENSE
+    Copyright 2007 K. J. Cheetham, all rights reserved.
+
+    This program is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself.
+

Added: trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/InflateColumn/ISBN.pm
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/InflateColumn/ISBN.pm	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/lib/DBIx/Class/InflateColumn/ISBN.pm	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,143 @@
+package DBIx::Class::InflateColumn::ISBN;
+
+use warnings;
+use strict;
+
+our $VERSION = '0.01';
+
+use base qw/DBIx::Class/;
+__PACKAGE__->mk_classdata('isbn_class');
+__PACKAGE__->isbn_class('Business::ISBN');
+
+=head1 NAME
+
+DBIx::Class::InflateColumn::ISBN - Auto-create Business::ISBN objects from columns.
+
+=head1 VERSION
+
+Version 0.01
+
+=head1 SYNOPSIS
+
+Load this component and declare columns as ISBNs with the appropriate format.
+
+    package Library;
+    __PACKAGE__->load_components(qw/InflateColumn::ISBN Core/);
+    __PACKAGE__->add_columns(
+        isbn => {
+            data_type => 'varchar',
+            size => 13,
+            is_nullable => 0,
+            is_isbn => 1,
+        }
+    );
+
+It has to be a varchar rather than a simple integer given that it is possible for
+ISBNs to contain the character X. Old style ISBNs are 10 characters, not including
+hyphens, but new style ones are 13 characters.
+
+Then you can treat the specified column as a Business::ISBN object.
+
+    print 'ISBN: ', $book->isbn->as_string;
+    print 'Publisher code: ', $book->isbn->publisher_code;
+
+=head1 METHODS
+
+=head2 isbn_class
+
+=over
+
+=item Arguments: $class
+
+=back
+
+Gets/sets the address class that the columns should be inflated into.
+The default class is Business::ISBN and only that is currently supported.
+
+=head2 register_column
+
+Chains with L<DBIx::Class::Row/register_column>, and sets up ISBN columns
+appropriately. This would not normally be called directly by end users.
+
+=cut
+
+sub register_column {
+    my ($self, $column, $info, @rest) = @_;
+    $self->next::method($column, $info, @rest);
+
+    return unless defined $info->{'is_isbn'};
+
+    warn "Datatype is too small" if ($info->{'size'} && $info->{'size'} < 10);
+    warn "Datatype must not be integer" if ($info->{'data_type'} eq 'integer');
+
+    my $isbn_class = $info->{'isbn_class'} || $self->isbn_class || 'Business::ISBN';
+
+    eval "use $isbn_class";
+    $self->throw_exception("Error loading $isbn_class: $@") if $@;
+
+    $self->inflate_column(
+        $column => {
+            inflate => sub { return $isbn_class->new(sprintf("%010s", shift)); },
+            deflate => sub { return shift->common_data; },
+        }
+    );
+}
+
+=head1 AUTHOR
+
+K. J. Cheetham C<< <jamie @ shadowcatsystems.co.uk> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-dbix-class-inflatecolumn-ISBN at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-InflateColumn-ISBN>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+    perldoc DBIx::Class::InflateColumn::ISBN
+
+You can also look for information at:
+
+=over 4
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/DBIx-Class-InflateColumn-ISBN>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/DBIx-Class-InflateColumn-ISBN>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-InflateColumn-ISBN>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/DBIx-Class-InflateColumn-ISBN>
+
+=back
+
+=head1 SEE ALSO
+
+L<Business::ISBN>
+
+L<DBIx::Class::InflateColumn>
+
+L<WWW::Scraper::ISBN>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2007 K. J. Cheetham, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+1; # End of DBIx::Class::InflateColumn::ISBN

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/00-load.t
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/00-load.t	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/00-load.t	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+	use_ok( 'DBIx::Class::InflateColumn::ISBN' );
+}
+
+diag( "Testing DBIx::Class::InflateColumn::ISBN $DBIx::Class::InflateColumn::ISBN::VERSION, Perl $], $^X" );

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/01-isbn.t
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/01-isbn.t	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/01-isbn.t	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,67 @@
+#!perl -T
+use lib qw(t/lib);
+use DBICTest;
+use Test::More tests => 19;
+use Business::ISBN;
+
+my $schema = DBICTest->init_schema();
+my $rs     = $schema->resultset('Library');
+
+my $code = '0321430840';
+
+my $book = $rs->find(1);
+isa_ok($book->isbn, 'Business::ISBN', 'data inflated to right class');
+is($book->isbn->isbn, $code, 'data correctly inflated');
+
+my $book = $rs->find(2);
+isa_ok($book->isbn, 'Business::ISBN', 'data inflated to right class');
+isa_ok(\$book->book, 'SCALAR', 'other field not inflated');
+is($book->isbn->isbn, '190351133X', 'data with X correctly inflated');
+
+TODO: {
+    local $TODO = "DBIx::Class doesn't support find by object yet";
+    my $book2 = $rs->find( Business::ISBN->new($code),
+                          { key => 'isbn' } );
+    ok($book2, 'find by object returned a row');
+}
+SKIP: {
+    skip 'no find object to check' => 1 unless $book2;
+    is($book2->isbn->isbn, $code, 'find by object returned the right row');
+}
+
+my $book1 = $rs->search( isbn => Business::ISBN->new($code) );
+ok($book1, 'search by object returned a row');
+$book1 = $book1->first;
+SKIP: {
+    skip 'no search object to check' => 1 unless $book1;
+    is($book1->isbn, $code, 'search by object returned the right row');
+}
+
+my $isbn = Business::ISBN->new('0374292795');
+my $host = $rs->create({ book => 'foo', isbn => $isbn });
+isa_ok($host, 'DBICTest::Library', 'create with object');
+is($host->get_column('isbn'), $isbn->isbn, 'numeric code correctly deflated');
+
+$isbn = Business::ISBN->new('071351700X');
+my $host = $rs->create({ book => 'Elementary Mechanics', isbn => $isbn });
+isa_ok($host, 'DBICTest::Library', 'create with object');
+is($host->get_column('isbn'), $isbn->isbn, 'code with X correctly deflated');
+ok($host->isbn->is_valid, 'validation checked');
+
+$isbn = Business::ISBN->new('0713517001');
+my $host = $rs->create({ book => 'Elementary Mechanics', isbn => $isbn });
+isa_ok($host, 'DBICTest::Library', 'create with object');
+is($host->get_column('isbn'), $isbn->isbn, 'code with X correctly deflated');
+is($host->isbn->is_valid_checksum, Business::ISBN::BAD_CHECKSUM, 'validation error checked');
+
+#$isbn = Business::ISBN->new('foobar');
+#eval { $book = $rs->create({ book => 'foobar', isbn => $isbn }); };
+#ok($@, 'check for error with invalid data');
+
+my $isbn = Business::ISBN->new('978-0-596-52724-2');
+SKIP: {
+    skip 'ISBN13 not supported' => 2 unless $isbn;
+    my $host = $rs->create({ book => 'baz', isbn => $isbn->isbn });
+    isa_ok($host, 'DBICTest::Library', 'create with object');
+    is($host->get_column('isbn'), $isbn->isbn, 'numeric code correctly deflated');
+}

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema/Library.pm
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema/Library.pm	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema/Library.pm	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,29 @@
+package # hide from PAUSE
+    DBICTest::Schema::Library;
+
+use base qw/DBIx::Class/;
+
+__PACKAGE__->load_components(qw/InflateColumn::ISBN Core/);
+__PACKAGE__->table('library');
+
+__PACKAGE__->add_columns(
+    id => {
+        data_type   => 'integer',
+        is_nullable => 0,
+    },
+    book => {
+        data_type   => 'text',
+        is_nullable => 0,
+    },
+    isbn => {
+        data_type   => 'varchar',
+        size        => 13,
+        is_nullable => 0,
+        is_isbn     => 1,
+    }
+);
+
+__PACKAGE__->set_primary_key('id');
+__PACKAGE__->add_unique_constraint(isbn => [ qw/isbn/ ]);
+
+1;

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema.pm
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema.pm	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest/Schema.pm	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,8 @@
+package # hide from PAUSE
+    DBICTest::Schema;
+
+use base qw/DBIx::Class::Schema/;
+
+__PACKAGE__->load_classes();
+
+1;

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest.pm
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest.pm	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/lib/DBICTest.pm	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,115 @@
+package # hide from PAUSE 
+    DBICTest;
+
+use strict;
+use warnings;
+use DBICTest::Schema;
+
+=head1 NAME
+
+DBICTest - Library to be used by DBIx::Class test scripts.
+
+=head1 SYNOPSIS
+
+  use lib qw(t/lib);
+  use DBICTest;
+  use Test::More;
+  
+  my $schema = DBICTest->init_schema();
+
+=head1 DESCRIPTION
+
+This module provides the basic utilities to write tests against 
+DBIx::Class.
+
+=head1 METHODS
+
+=head2 init_schema
+
+  my $schema = DBICTest->init_schema(
+    no_deploy=>1,
+    no_populate=>1,
+  );
+
+This method removes the test SQLite database in t/var/DBIxClass.db 
+and then creates a new, empty database.
+
+This method will call deploy_schema() by default, unless the 
+no_deploy flag is set.
+
+Also, by default, this method will call populate_schema() by 
+default, unless the no_deploy or no_populate flags are set.
+
+=cut
+
+sub init_schema {
+    my $self = shift;
+    my %args = @_;
+    my $db_file = "t/var/test.db";
+
+    unlink($db_file) if -e $db_file;
+    unlink($db_file . "-journal") if -e $db_file . "-journal";
+    mkdir("t/var") unless -d "t/var";
+
+    my $dsn = $ENV{"DBICTEST_DSN"} || "dbi:SQLite:${db_file}";
+    my $dbuser = $ENV{"DBICTEST_DBUSER"} || '';
+    my $dbpass = $ENV{"DBICTEST_DBPASS"} || '';
+
+   my $schema = DBICTest::Schema->compose_connection('DBICTest' => $dsn, $dbuser, $dbpass);
+    $schema->storage->on_connect_do(['PRAGMA synchronous = OFF']);
+    if ( !$args{no_deploy} ) {
+        __PACKAGE__->deploy_schema( $schema );
+        __PACKAGE__->populate_schema( $schema ) if( !$args{no_populate} );
+    }
+    return $schema;
+}
+
+=head2 deploy_schema
+
+  DBICTest->deploy_schema( $schema );
+
+This method does one of two things to the schema.  It can either call 
+the experimental $schema->deploy() if the DBICTEST_SQLT_DEPLOY environment 
+variable is set, otherwise the default is to read in the t/lib/sqlite.sql 
+file and execute the SQL within. Either way you end up with a fresh set 
+of tables for testing.
+
+=cut
+
+sub deploy_schema {
+    my $self = shift;
+    my $schema = shift;
+
+    if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
+        return $schema->deploy();
+    } else {
+        open IN, "t/lib/sqlite.sql";
+        my $sql;
+        { local $/ = undef; $sql = <IN>; }
+        close IN;
+        ($schema->storage->dbh->do($_) || print "Error on SQL: $_\n") for split(/;\n/, $sql);
+    }
+}
+
+=head2 populate_schema
+
+  DBICTest->populate_schema( $schema );
+
+After you deploy your schema you can use this method to populate 
+the tables with test data.
+
+=cut
+
+sub populate_schema {
+    my $self = shift;
+    my $schema = shift;
+
+    $schema->populate('Library', [
+        [ qw/id book isbn/ ],
+        [ 1, 'HTML for the World Wide Web: With XHTML and CSS', '0321430840' ],
+        [ 2, 'Final Fantasy X Official Strategy Guide', '190351133X' ],
+    ]);
+
+}
+
+1;

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/lib/sqlite.sql
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/lib/sqlite.sql	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/lib/sqlite.sql	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,5 @@
+CREATE TABLE library (
+	id INTEGER NOT NULL PRIMARY KEY,
+	book TEXT NOT NULL,
+	isbn VARHCAR(13) NOT NULL UNIQUE
+);

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/pod-coverage.t
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/pod-coverage.t	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/pod-coverage.t	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/pod.t
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/pod.t	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/pod.t	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/style-notabs.t
===================================================================
--- trunk/DBIx-Class-InflateColumn-ISBN/t/style-notabs.t	                        (rev 0)
+++ trunk/DBIx-Class-InflateColumn-ISBN/t/style-notabs.t	2007-05-25 15:14:08 UTC (rev 3382)
@@ -0,0 +1,20 @@
+#!perl -T
+use strict;
+use warnings;
+
+use Test::More;
+
+if (not $ENV{TEST_AUTHOR}) {
+    plan skip_all => 'set TEST_AUTHOR to enable this test';
+}
+else {
+    eval 'use Test::NoTabs 0.03';
+    if ($@) {
+        plan skip_all => 'Test::NoTabs 0.03 not installed';
+    }
+    else {
+        plan tests => 1;
+    }
+}
+
+all_perl_files_ok('lib');

Added: trunk/DBIx-Class-InflateColumn-ISBN/t/var/test.db
===================================================================
(Binary files differ)


Property changes on: trunk/DBIx-Class-InflateColumn-ISBN/t/var/test.db
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream




More information about the Bast-commits mailing list