sub storage { shift->schema_instance(@_)->storage; }
-sub resultset_instance {
- my $class = ref $_[0] || $_[0];
- my $source = $class->result_source_instance;
- if ($source->result_class ne $class) {
- $source = $source->new($source);
- $source->result_class($class);
- }
- return $source->resultset;
-}
-
=head1 NAME
DBIx::Class::DB - (DEPRECATED) classdata schema component
}
}
+=head2 resultset_instance
+
+Returns an instance of a resultset for this class - effectively
+mapping the L<Class::DBI> connection-as-classdata paradigm into the
+native L<DBIx::Class::ResultSet> system.
+
+=cut
+
+sub resultset_instance {
+ my $class = ref $_[0] || $_[0];
+ my $source = $class->result_source_instance;
+ if ($source->result_class ne $class) {
+ $source = $source->new($source);
+ $source->result_class($class);
+ }
+ return $source->resultset;
+}
+
+=head2 resolve_class
+
+****DEPRECATED****
+
+See L<class_resolver>
+
+=head2 dbi_commit
+
+****DEPRECATED****
+
+Alias for L<txn_commit>
+
+=head2 dbi_rollback
+
+****DEPRECATED****
+
+Alias for L<txn_rollback>
+
+
1;
=head1 AUTHORS
return $deflate->($value, $self);
}
+=head2 get_inflated_column
+
+ my $val = $obj->get_inflated_column($col);
+
+Fetch a column value in its inflated state. This is directly
+analogous to L<DBIx::Class::Row/get_column> in that it only fetches a
+column already retreived from the database, and then inflates it.
+Throws an exception if the column requested is not an inflated column.
+
+=cut
+
sub get_inflated_column {
my ($self, $col) = @_;
$self->throw_exception("$col is not an inflated column")
$self->_inflated_column($col, $self->get_column($col));
}
+=head2 set_inflated_column
+
+ my $copy = $obj->set_inflated_column($col => $val);
+
+Sets a column value from an inflated value. This is directly
+analogous to L<DBIx::Class::Row/set_column>.
+
+=cut
+
sub set_inflated_column {
my ($self, $col, @rest) = @_;
my $ret = $self->_inflated_column_op('set', $col, @rest);
return $ret;
}
+=head2 store_inflated_column
+
+ my $copy = $obj->store_inflated_column($col => $val);
+
+Sets a column value from an inflated value without marking the column
+as dirty. This is directly analogous to
+L<DBIx::Class::Row/store_column>.
+
+=cut
+
sub store_inflated_column {
my ($self, $col, @rest) = @_;
my $ret = $self->_inflated_column_op('store', $col, @rest);
return $obj;
}
+=head2 update
+
+Updates a row in the same way as L<DBIx::Class::Row/update>, handling
+inflation and deflation of columns appropriately.
+
+=cut
+
sub update {
my ($class, $attrs, @rest) = @_;
$attrs ||= {};
return $class->next::method($attrs, @rest);
}
+=head2 new
+
+Creates a row in the same way as L<DBIx::Class::Row/new>, handling
+inflation and deflation of columns appropriately.
+
+=cut
+
sub new {
my ($class, $attrs, @rest) = @_;
$attrs ||= {};
plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-all_pod_coverage_ok();
+my @modules = sort { $a cmp $b } (all_modules());
+plan tests => scalar(@modules);
+
+my $exceptions = {
+ 'DBIx::Class' => {
+ ignore => [
+ qw/MODIFY_CODE_ATTRIBUTES
+ component_base_class
+ mk_classdata/
+ ]
+ },
+ 'DBIx::Class::ResultSetProxy' => { skip => 1 },
+ 'DBIx::Class::ResultSourceProxy' => { skip => 1 },
+ 'DBIx::Class::Componentised' => { skip => 1 },
+};
+
+foreach my $module (@modules) {
+ SKIP:
+ {
+ skip "No real methods", 1 if ($exceptions->{$module}{skip});
+
+ # build parms up from ignore list
+ my $parms = {};
+ $parms->{trustme} =
+ [ map { qr/^$_$/ } @{ $exceptions->{$module}{ignore} } ]
+ if exists($exceptions->{$module}{ignore});
+
+ # run the test with the potentially modified parm set
+ pod_coverage_ok($module, $parms, "$module POD coverage");
+ }
+}