Showing 3 changed files with 24 additions and 6 deletions
+20 -6
lib/DBIx/Custom.pm
... ...
@@ -559,7 +559,6 @@ sub execute {
559 559
         my $result = $self->result_class->new(
560 560
             sth            => $sth,
561 561
             filters        => $self->filters,
562
-            filter_check   => $self->filter_check,
563 562
             default_filter => $self->{default_in_filter},
564 563
             filter         => $filter->{in} || {},
565 564
             end_filter     => $filter->{end} || {}
... ...
@@ -826,8 +825,6 @@ sub register_filter {
826 825
     return $self;
827 826
 }
828 827
 
829
-sub register_tag { shift->query_builder->register_tag(@_) }
830
-
831 828
 our %SELECT_ARGS
832 829
   = map { $_ => 1 } @COMMON_ARGS,
833 830
                     qw/column where append relation join param where_param wrap/;
... ...
@@ -847,8 +844,10 @@ sub select {
847 844
     croak qq{"join" must be array reference } . _subname
848 845
       unless ref $join eq 'ARRAY';
849 846
     my $relation = delete $args{relation};
847
+    warn "select() relation option is DEPRECATED! use join option instead"
848
+      if $relation;
850 849
     my $param = delete $args{param} || {}; # DEPRECATED!
851
-    warn "DEPRECATED select() param option. this is renamed to where_param"
850
+    warn "select() param option is DEPRECATED! use where_param option instead"
852 851
       if keys %$param;
853 852
     my $where_param = delete $args{where_param} || $param || {};
854 853
     my $query_return = $args{query};
... ...
@@ -1184,12 +1183,16 @@ sub _connect {
1184 1183
     my $self = shift;
1185 1184
     
1186 1185
     # Attributes
1187
-    my $dsn = $self->data_source || $self->dsn;
1186
+    my $dsn = $self->data_source;
1187
+    warn "data_source is DEPRECATED! use dsn instead\n";
1188
+    $dsn ||= $self->dsn;
1188 1189
     croak qq{"dsn" must be specified } . _subname
1189 1190
       unless $dsn;
1190 1191
     my $user        = $self->user;
1191 1192
     my $password    = $self->password;
1192 1193
     my $dbi_option = {%{$self->dbi_options}, %{$self->dbi_option}};
1194
+    warn "dbi_options is DEPRECATED! use dbi_option instead\n"
1195
+      if keys %{$self->dbi_options};
1193 1196
     
1194 1197
     # Connect
1195 1198
     my $dbh = eval {DBI->connect(
... ...
@@ -1334,7 +1337,7 @@ sub _where_to_obj {
1334 1337
     elsif (ref $where eq 'ARRAY') {
1335 1338
         warn "\$dbi->select(where => [CLAUSE, PARAMETER]) is DEPRECATED." .
1336 1339
              "use \$dbi->select(where => \$dbi->where(clause => " .
1337
-             "CLAUSE, param => PARAMETER));";
1340
+             "CLAUSE, where_param => PARAMETER));";
1338 1341
         $obj = $self->where(
1339 1342
             clause => $where->[0],
1340 1343
             param  => $where->[1]
... ...
@@ -1350,6 +1353,12 @@ sub _where_to_obj {
1350 1353
     return $obj;
1351 1354
 }
1352 1355
 
1356
+# DEPRECATED!
1357
+sub register_tag {
1358
+    warn "register_tag is DEPRECATED!";
1359
+    shift->query_builder->register_tag(@_)
1360
+}
1361
+
1353 1362
 # DEPRECATED!
1354 1363
 __PACKAGE__->attr('data_source');
1355 1364
 
... ...
@@ -1363,6 +1372,8 @@ __PACKAGE__->attr(
1363 1372
 sub default_bind_filter {
1364 1373
     my $self = shift;
1365 1374
     
1375
+    warn "default_bind_filter is DEPRECATED! use apply_filter instead\n";
1376
+    
1366 1377
     if (@_) {
1367 1378
         my $fname = $_[0];
1368 1379
         
... ...
@@ -1384,6 +1395,8 @@ sub default_bind_filter {
1384 1395
 # DEPRECATED!
1385 1396
 sub default_fetch_filter {
1386 1397
     my $self = shift;
1398
+
1399
+    warn "default_fetch_filter is DEPRECATED! use apply_filter instead\n";
1387 1400
     
1388 1401
     if (@_) {
1389 1402
         my $fname = $_[0];
... ...
@@ -1413,6 +1426,7 @@ sub insert_param_tag {
1413 1426
 
1414 1427
 # DEPRECATED!
1415 1428
 sub register_tag_processor {
1429
+    warn "register_tag_processor is DEPRECATED!";
1416 1430
     return shift->query_builder->register_tag_processor(@_);
1417 1431
 }
1418 1432
 
+2
lib/DBIx/Custom/QueryBuilder.pm
... ...
@@ -98,6 +98,8 @@ __PACKAGE__->attr('tags' => sub { {} });
98 98
 sub register_tag {
99 99
     my $self = shift;
100 100
     
101
+    warn "register_tag is DEPRECATED!";
102
+    
101 103
     # Merge tag
102 104
     my $tags = ref $_[0] eq 'HASH' ? $_[0] : {@_};
103 105
     $self->tags({%{$self->tags}, %$tags});
+2
t/dbix-custom-core-mysql-private.t
... ...
@@ -2,6 +2,8 @@ use Test::More;
2 2
 use strict;
3 3
 use warnings;
4 4
 
5
+$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DEPRECATED/};
6
+
5 7
 # user password database
6 8
 our ($USER, $PASSWORD, $DATABASE) = connect_info();
7 9