Showing 14 changed files with 106 additions and 42 deletions
+6
DBIx-Custom-Basic/Changes
... ...
@@ -1,2 +1,8 @@
1
+0.0201
2
+  delete default_bind_filter
3
+  delete default_fetch_filter
4
+  add filter encode_utf8
5
+  add filter decode_utf8
6
+  add method utf8_filter_on
1 7
 0.0101
2 8
   First release
+15 -5
DBIx-Custom-Basic/lib/DBIx/Custom/Basic.pm
... ...
@@ -39,13 +39,21 @@ sub utf8_filter_on {
39 39
 
40 40
 =head1 NAME
41 41
 
42
-DBIx::Custom::Basic - DBIx::Custom basic class
42
+DBIx::Custom::Basic - DBIx::Custom basic implementation
43 43
 
44
-=head1 VERSION
44
+=head1 Version
45 45
 
46 46
 Version 0.0201
47 47
 
48
-=head1 FILTERS
48
+=head1 See DBIx::Custom documentation
49
+
50
+This class is L<DBIx::Custom> subclass.
51
+
52
+You can use all methods of L<DBIx::Custom>
53
+
54
+Please see L<DBIx::Custom> documentation
55
+
56
+=head1 Filters
49 57
 
50 58
 =head2 encode_utf8
51 59
 
... ...
@@ -65,7 +73,7 @@ This filter is generally used as fetch filter
65 73
 
66 74
     $dbi->fetch_filter($dbi->filters->{decode_utf8});
67 75
 
68
-=head2 FORMATS
76
+=head2 Formats
69 77
     
70 78
 strptime formats is available
71 79
     
... ...
@@ -81,7 +89,7 @@ You get format as the following
81 89
 
82 90
     my $format = $dbi->formats->{$format_name};
83 91
 
84
-=head1 METHOD
92
+=head1 Methods
85 93
 
86 94
 =head2 utf8_filter_on
87 95
 
... ...
@@ -99,6 +107,8 @@ Yuki Kimoto, C<< <kimoto.yuki at gmail.com> >>
99 107
 
100 108
 Github L<http://github.com/yuki-kimoto>
101 109
 
110
+I develope this module L<http://github.com/yuki-kimoto/DBIx-Custom>
111
+
102 112
 =head1 COPYRIGHT & LICENSE
103 113
 
104 114
 Copyright 2009 Yuki Kimoto, all rights reserved.
+7 -2
DBIx-Custom-Basic/t/01-sqlite.t
... ...
@@ -58,5 +58,10 @@ is($dbi->fetch_filter, $dbi->filters->{decode_utf8}, 'default fetch filter');
58 58
 
59 59
 $decoded_str = 'あ';
60 60
 $encoded_str = $dbi->bind_filter->($decoded_str);
61
-is($encoded_str, encode('UTF-8', $decoded_str), 'encode utf8');
62
-is($decoded_str, $dbi->fetch_filter->('', $encoded_str), "$test : fetch_filter");
61
+is($encoded_str, encode('UTF-8', $decoded_str), "$test : encode utf8");
62
+is($decoded_str, $dbi->fetch_filter->($encoded_str), "$test : fetch_filter");
63
+
64
+$decoded_str = 'a';
65
+$encoded_str = $dbi->bind_filter->($decoded_str);
66
+is($encoded_str, encode('UTF-8', $decoded_str), "$test : upgrade and encode utf8");
67
+is($decoded_str, $dbi->fetch_filter->($encoded_str), "$test : fetch_filter");
+2
DBIx-Custom-MySQL/Changes
... ...
@@ -1,2 +1,4 @@
1
+0.0102
2
+  Update document
1 3
 0.0101
2 4
   First release
+16 -14
DBIx-Custom-MySQL/lib/DBIx/Custom/MySQL.pm
... ...
@@ -3,7 +3,7 @@ use base 'DBIx::Custom::Basic';
3 3
 
4 4
 use warnings;
5 5
 use strict;
6
-our $VERSION = '0.0101';
6
+our $VERSION = '0.0102';
7 7
 
8 8
 my $class = __PACKAGE__;
9 9
 
... ...
@@ -28,11 +28,11 @@ sub connect {
28 28
 
29 29
 DBIx::Custom::MySQL - DBIx::Custom MySQL implementation
30 30
 
31
-=head1 VERSION
31
+=head1 Version
32 32
 
33
-Version 0.0101
33
+Version 0.0102
34 34
 
35
-=head1 SYNOPSIS
35
+=head1 Synopsys
36 36
 
37 37
     # New
38 38
     my $dbi = DBIx::Custom::MySQL->new(user => 'taro', $password => 'kliej&@K',
... ...
@@ -53,29 +53,31 @@ Version 0.0101
53 53
     # select * from books where ahthor = 'taro'; 
54 54
     $dbi->select('books', {author => 'taro'});
55 55
 
56
-=head1 CAUTION
56
+=head1 See DBIx::Custom and DBI::Custom::Basic documentation
57 57
 
58
-This module automatically encode_utf8 or decode_utf8
59
-If you do not want to this, you set 
60
-    
61
-    $dbi->bind_filter(undef);
62
-    $dbi->fetch_filter(undef);
58
+This class is L<DBIx::Custom::Basic> subclass,
59
+and L<DBIx::Custom::Basic> is L<DBIx::Custom> subclass.
60
+
61
+You can use all methods of L<DBIx::Custom::Basic> and <DBIx::Custom>
62
+Please see L<DBIx::Custom::Basic> and <DBIx::Custom> documentation.
63 63
 
64
-=head1 OBJECT METHOD
64
+=head1 Object methods
65 65
 
66 66
 =head2 connect
67 67
 
68 68
     This method override DBIx::Custom::connect
69 69
     
70
-    If database is set, automatically data source is created and connect
70
+    If database attribute is set, automatically data source is created and connect
71 71
 
72
-=head1 AUTHOR
72
+=head1 Author
73 73
 
74 74
 Yuki Kimoto, C<< <kimoto.yuki at gmail.com> >>
75 75
 
76 76
 Github L<http://github.com/yuki-kimoto>
77 77
 
78
-=head1 COPYRIGHT & LICENSE
78
+I develope this module L<http://github.com/yuki-kimoto/DBIx-Custom>
79
+
80
+=head1 Copyright & license
79 81
 
80 82
 Copyright 2009 Yuki Kimoto, all rights reserved.
81 83
 
+1
DBIx-Custom-Result/Build.PL
... ...
@@ -12,6 +12,7 @@ my $builder = Module::Build->new(
12 12
     },
13 13
     requires => {
14 14
         'Object::Simple' => 2.0702,
15
+        'DBI'            => 1.605,
15 16
     },
16 17
     add_to_cleanup      => [ 'DBIx-Custom-Result-*' ],
17 18
     create_makefile_pl => 'traditional',
+4
DBIx-Custom-Result/Changes
... ...
@@ -1,2 +1,6 @@
1
+0.0202
2
+  add build requires 'DBI'
3
+0.0201
4
+  Exchange filter argument 'key', 'value' (not backword compatible)
1 5
 0.0101
2 6
   First release
+2 -2
DBIx-Custom-Result/lib/DBIx/Custom/Result.pm
... ...
@@ -1,7 +1,7 @@
1 1
 package DBIx::Custom::Result;
2 2
 use Object::Simple;
3 3
 
4
-our $VERSION = '0.0201';
4
+our $VERSION = '0.0202';
5 5
 
6 6
 use Carp 'croak';
7 7
 
... ...
@@ -198,7 +198,7 @@ DBIx::Custom::Result - Resultset for DBIx::Custom
198 198
 
199 199
 =head1 VERSION
200 200
 
201
-Version 0.0201
201
+Version 0.0202
202 202
 
203 203
 =head1 SYNOPSIS
204 204
 
+2
DBIx-Custom-SQLite/Changes
... ...
@@ -1,2 +1,4 @@
1
+0.0102
2
+  update document
1 3
 0.0101
2 4
   First release
+22 -17
DBIx-Custom-SQLite/lib/DBIx/Custom/SQLite.pm
... ...
@@ -5,7 +5,7 @@ use warnings;
5 5
 use strict;
6 6
 use Carp 'croak';
7 7
 
8
-our $VERSION = '0.0101';
8
+our $VERSION = '0.0102';
9 9
 
10 10
 my $class = __PACKAGE__;
11 11
 
... ...
@@ -57,11 +57,11 @@ sub reconnect_memory {
57 57
 
58 58
 DBIx::Custom::SQLite - DBIx::Custom SQLite implementation
59 59
 
60
-=head1 VERSION
60
+=head1 Version
61 61
 
62
-Version 0.0101
62
+Version 0.0102
63 63
 
64
-=head1 SYNOPSYS
64
+=head1 Synopsys
65 65
 
66 66
     use DBIx::Custom::SQLite;
67 67
     
... ...
@@ -91,22 +91,25 @@ Version 0.0101
91 91
     # select author, title from books where author = 'taro' order by id limit 1;
92 92
     $dbi->select('books', [qw/author title/], {author => 'taro'},
93 93
                  'order by id limit 1');
94
-    
95
-=head1 CAUTION
96 94
 
97
-This module automatically encode_utf8 or decode_utf8
98
-If you do not want to this, you set 
99
-    
100
-    $dbi->bind_filter(undef);
101
-    $dbi->fetch_filter(undef);
95
+=head1 See DBIx::Custom and DBI::Custom::Basic documentation
96
+
97
+This class is L<DBIx::Custom::Basic> subclass.
98
+and L<DBIx::Custom::Basic> is L<DBIx::Custom> subclass
99
+
100
+You can use all methods of L<DBIx::Custom::Basic> and <DBIx::Custom>
101
+Please see L<DBIx::Custom::Basic> and <DBIx::Custom> documentation
102 102
 
103
-=head1 OBJECT METHOD
103
+=head1 Object methods
104 104
 
105 105
 =head2 connect
106 106
 
107
-    This method override DBIx::Custom::connect
108
-    
109
-    If database is set, automatically data source is created and connect
107
+This override L<DBIx::Custom> connect.
108
+
109
+    # Connect to database
110
+    $dbi->connect;
111
+
112
+If database attribute is set, automatically data source is created and connect
110 113
 
111 114
 =head2 connect_memory
112 115
 
... ...
@@ -118,13 +121,15 @@ If you do not want to this, you set
118 121
     # Reconnect memory database
119 122
     $self = $dbi->reconnect_memory;
120 123
 
121
-=head1 AUTHOR
124
+=head1 Author
122 125
 
123 126
 Yuki Kimoto, C<< <kimoto.yuki at gmail.com> >>
124 127
 
125 128
 Github L<http://github.com/yuki-kimoto>
126 129
 
127
-=head1 COPYRIGHT & LICENSE
130
+I develope this module L<http://github.com/yuki-kimoto/DBIx-Custom>
131
+
132
+=head1 Copyright & lisence
128 133
 
129 134
 Copyright 2009 Yuki Kimoto, all rights reserved.
130 135
 
+1
DBIx-Custom-SQLite/t/01-core.t
... ...
@@ -30,6 +30,7 @@ $dbi = DBIx::Custom::SQLite->new;
30 30
 $dbi->connect_memory;
31 31
 $ret_val = $dbi->do($CREATE_TABLE->{0});
32 32
 ok(defined $ret_val, $test);
33
+$dbi->utf8_filter_on;
33 34
 $dbi->insert('table1', {key1 => 'あ', key2 => 2});
34 35
 $rows = $dbi->select('table1', {key1 => 'あ'})->fetch_all_hash;
35 36
 is_deeply($rows, [{key1 => 'あ', key2 => 2}], "$test : select rows");
+2
DBIx-Custom/Changes
... ...
@@ -1,3 +1,5 @@
1
+0.0301
2
+  exchange filter argument 'key', 'value' (not backword compatible)
1 3
 0.0201
2 4
   rename tranzaction to transaction
3 5
   add filter_off
+2 -2
DBIx-Custom/lib/DBIx/Custom.pm
... ...
@@ -1,7 +1,7 @@
1 1
 package DBIx::Custom;
2 2
 use Object::Simple;
3 3
 
4
-our $VERSION = '0.0201';
4
+our $VERSION = '0.0301';
5 5
 
6 6
 use Carp 'croak';
7 7
 use DBI;
... ...
@@ -736,7 +736,7 @@ DBIx::Custom - Customizable simple DBI
736 736
 
737 737
 =head1 VERSION
738 738
 
739
-Version 0.0201
739
+Version 0.0301
740 740
 
741 741
 =head1 CAUTION
742 742
 
+24
dist.pl
... ...
@@ -0,0 +1,24 @@
1
+use strict;
2
+use warnings;
3
+use File::Spec;
4
+
5
+my @modules = qw/DBIx-Custom DBIx-Custom-Basic DBIx-Custom-MySQL
6
+                 DBIx-Custom-Query DBIx-Custom-Result
7
+                 DBIx-Custom-Result DBIx-Custom-SQLite
8
+                 DBIx-Custom-SQL-Template/;
9
+
10
+foreach my $module (@modules) {
11
+    chdir $module
12
+      or die "Cannot change directory '$module': $!";
13
+    
14
+    system('perl Build realclean');
15
+    system('perl Build.PL');
16
+    system('perl Build');
17
+    system('perl Build test');
18
+    system('perl Build install');
19
+    system('perl Build disttest');
20
+    system('perl Build dist');
21
+    
22
+    chdir File::Spec->updir
23
+      or die "Cannot change up directory: $!";
24
+}