Revision history for DBIx::Class
0.07001
+ - remove anonymous blesses to avoid major speed hit on Fedora Core 5's
+ Perl and possibly others; for more information see:
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196836
- fix a pathological prefetch case
- table case fix for Oracle in columns_info_for
sub __grouper {
my ($class) = @_;
- return bless({ class => $class}, 'DBIx::Class::CDBICompat::ColumnGroups::GrouperShim');
+ my $grouper = { class => $class };
+ return bless($grouper, 'DBIx::Class::CDBICompat::ColumnGroups::GrouperShim');
}
sub _find_columns {
sub setup_schema_instance {
my $class = shift;
- my $schema = bless({}, 'DBIx::Class::Schema');
+ my $schema = {};
+ bless $schema, 'DBIx::Class::Schema';
$class->mk_classdata('schema_instance' => $schema);
}
$attrs->{alias} ||= 'me';
- bless {
+ my $self = {
result_source => $source,
result_class => $attrs->{result_class} || $source->result_class,
cond => $attrs->{where},
count => undef,
pager => undef,
attrs => $attrs
- }, $class;
+ };
+
+ bless $self, $class;
+
+ return $self;
}
=head2 search
sub new {
my ($class, $attrs) = @_;
$class = ref $class if ref $class;
- my $new = bless({ %{$attrs || {}}, _resultset => undef }, $class);
+
+ my $new = { %{$attrs || {}}, _resultset => undef };
+ bless $new, $class;
+
$new->{resultset_class} ||= 'DBIx::Class::ResultSet';
$new->{resultset_attributes} = { %{$new->{resultset_attributes} || {}} };
$new->{_ordered_columns} = [ @{$new->{_ordered_columns}||[]}];
sub new {
my ($class, $attrs) = @_;
$class = ref $class if ref $class;
- my $new = bless { _column_data => {} }, $class;
+
+ my $new = { _column_data => {} };
+ bless $new, $class;
+
if ($attrs) {
$new->throw_exception("attrs must be a hashref")
unless ref($attrs) eq 'HASH';
$new->store_column($k => $attrs->{$k});
}
}
+
return $new;
}
delete $col_data->{$col}
if $self->result_source->column_info($col)->{is_auto_increment};
}
- my $new = bless { _column_data => $col_data }, ref $self;
+
+ my $new = { _column_data => $col_data };
+ bless $new, ref $self;
+
$new->result_source($self->result_source);
$new->set_columns($changes);
$new->insert;
sub inflate_result {
my ($class, $source, $me, $prefetch) = @_;
#use Data::Dumper; print Dumper(@_);
- my $new = bless({ result_source => $source,
- _column_data => $me,
- _in_storage => 1
- },
- ref $class || $class);
+ my $new = {
+ result_source => $source,
+ _column_data => $me,
+ _in_storage => 1
+ };
+ bless $new, (ref $class || $class);
+
my $schema;
foreach my $pre (keys %{$prefetch||{}}) {
my $pre_val = $prefetch->{$pre};
sub clone {
my ($self) = @_;
- my $clone = bless({ (ref $self ? %$self : ()) }, ref $self || $self);
+ my $clone = { (ref $self ? %$self : ()) };
+ bless $clone, (ref $self || $self);
+
foreach my $moniker ($self->sources) {
my $source = $self->source($moniker);
my $new = $source->new($source);
sub new {
my $class = shift;
- return bless {}, $class;
+ my $self = {};
+ return bless $self, $class;
}
1;
=cut
sub new {
- my $new = bless({}, ref $_[0] || $_[0]);
+ my $new = {};
+ bless $new, (ref $_[0] || $_[0]);
+
$new->cursor("DBIx::Class::Storage::DBI::Cursor");
$new->transaction_depth(0);
=cut
sub new {
- my $self = bless({}, ref($_[0]) || $_[0]);
+ my $self = {};
+ bless $self, (ref($_[0]) || $_[0]);
return $self;
}