[Bast-commits] r6657 - in DBIx-Class/0.08/branches/sybase: .
lib/DBIx/Class/Storage/DBI lib/DBIx/Class/Storage/DBI/Sybase t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Jun 13 03:57:41 GMT 2009
Author: caelum
Date: 2009-06-13 03:57:40 +0000 (Sat, 13 Jun 2009)
New Revision: 6657
Removed:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm
Modified:
DBIx-Class/0.08/branches/sybase/Makefile.PL
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
DBIx-Class/0.08/branches/sybase/t/746sybase.t
Log:
switch to DateTime::Format::Sybase
Modified: DBIx-Class/0.08/branches/sybase/Makefile.PL
===================================================================
--- DBIx-Class/0.08/branches/sybase/Makefile.PL 2009-06-13 00:29:05 UTC (rev 6656)
+++ DBIx-Class/0.08/branches/sybase/Makefile.PL 2009-06-13 03:57:40 UTC (rev 6657)
@@ -98,7 +98,7 @@
'Hash::Merge', => 0.11,
# t/746sybase.t
- 'DateTime::Format::Strptime' => 0,
+ 'DateTime::Format::Sybase' => 0,
);
if ($Module::Install::AUTHOR) {
Deleted: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm 2009-06-13 00:29:05 UTC (rev 6656)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm 2009-06-13 03:57:40 UTC (rev 6657)
@@ -1,40 +0,0 @@
-package # hide from PAUSE
- DBIx::Class::Storage::DBI::Sybase::DateTime;
-
-use strict;
-use warnings;
-use DateTime::Format::Strptime;
-
-my $inflate_format = DateTime::Format::Strptime->new(
- pattern => '%Y-%m-%dT%H:%M:%S.%3NZ'
-);
-
-my $deflate_format = DateTime::Format::Strptime->new(
- pattern => '%m/%d/%Y %H:%M:%S.%3N'
-);
-
-sub parse_datetime { shift; $inflate_format->parse_datetime(@_) }
-
-sub format_datetime { shift; $deflate_format->format_datetime(@_) }
-
-1;
-
-=head1 NAME
-
-DBIx::Class::Storage::DBI::Sybase::DateTime - DateTime inflation/deflation
-support for Sybase in L<DBIx::Class>.
-
-=head1 DESCRIPTION
-
-This needs to become L<DateTime::Format::Sybase>.
-
-=head1 AUTHORS
-
-See L<DBIx::Class/CONTRIBUTORS>.
-
-=head1 LICENSE
-
-You may distribute this code under the same terms as Perl itself.
-
-=cut
-# vim:sts=2 sw=2:
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-06-13 00:29:05 UTC (rev 6656)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-06-13 03:57:40 UTC (rev 6657)
@@ -99,7 +99,7 @@
return $count - $offset;
}
-sub datetime_parser_type { "DBIx::Class::Storage::DBI::Sybase::DateTime" }
+sub datetime_parser_type { "DateTime::Format::Sybase" }
1;
@@ -133,7 +133,7 @@
This works for both C<DATETIME> and C<SMALLDATETIME> columns, although
C<SMALLDATETIME> columns only have minute precision.
-You will need the L<DateTime::Format::Strptime> module if you are going to use
+You will need the L<DateTime::Format::Sybase> module if you are going to use
L<DBIx::Class::InflateColumn::DateTime>.
=head1 AUTHORS
Modified: DBIx-Class/0.08/branches/sybase/t/746sybase.t
===================================================================
--- DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-06-13 00:29:05 UTC (rev 6656)
+++ DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-06-13 03:57:40 UTC (rev 6657)
@@ -4,7 +4,7 @@
use Test::More;
use lib qw(t/lib);
use DBICTest;
-use DBIx::Class::Storage::DBI::Sybase::DateTime;
+use DateTime::Format::Sybase;
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
@@ -123,8 +123,7 @@
last_updated_on $type,
)
SQL
- ok(my $dt = DBIx::Class::Storage::DBI::Sybase::DateTime
- ->parse_datetime($sample_dt));
+ ok(my $dt = DateTime::Format::Sybase->parse_datetime($sample_dt));
my $row;
ok( $row = $schema->resultset('Track')->create({
More information about the Bast-commits
mailing list