1 package DBIx::Class::CDBICompat::Iterator;
9 DBIx::Class::CDBICompat::Iterator - Emulates the extra behaviors of the Class::DBI search iterator.
13 See DBIx::Class::CDBICompat for usage directions.
17 Emulates the extra behaviors of the Class::DBI search iterator.
19 =head2 Differences from DBIx::Class result set
21 The CDBI iterator returns true if there were any results, false otherwise. The DBIC result set always returns true.
26 sub _init_result_source_instance {
29 my $table = $class->next::method(@_);
30 $table->resultset_class("DBIx::Class::CDBICompat::Iterator::ResultSet");
35 =head1 FURTHER QUESTIONS?
37 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
39 =head1 COPYRIGHT AND LICENSE
41 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
42 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
43 redistribute it and/or modify it under the same terms as the
44 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
49 DBIx::Class::CDBICompat::Iterator::ResultSet;
54 use base qw(DBIx::Class::ResultSet);
57 # Performance hack so internal checks whether the result set
58 # exists won't do a SQL COUNT.
59 return 1 if caller =~ /^DBIx::Class::/;
64 sub _construct_results {
67 my $rows = $self->next::method(@_);
69 if (my $f = $self->_resolved_attrs->{record_filter}) {
70 $_ = $f->($_) for @$rows;