DBIx-Struct

 view release on metacpan or  search on metacpan

lib/DBIx/Struct.pm  view on Meta::CPAN

    $data;
}

sub make_object_update {
    my ($table, $pk_where, $pk_row_data) = @_;
    my $update;
    if (not ref $table) {

        # means this is just one simple table
        $update = <<UPD;
		sub update {
			my \$self = \$_[0];
			if(\@_ > 1 && CORE::ref(\$_[1]) eq 'HASH') {
				my (\$set, \$where, \@bind, \@bind_where);
				{
					no strict 'vars';
					local *set_hash = \$_[1];
					my \@unknown_columns = CORE::grep {not CORE::exists \$fields{\$_}} CORE::keys %set_hash;
					DBIx::Struct::error_message {
							result  => 'SQLERR',
							message => 'unknown columns '.CORE::join(", ", \@unknown_columns).' updating table $table'

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.480 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )