| 1 | package DBIx::Class::Stash; | ||||||||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use base 'DBIx::Class'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | our $VERSION = '0.07'; | |||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 2 | __PACKAGE__->mk_classdata('_dbic_stash' => {}); | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 2 | ▶ | sub stash :lvalue { | ||||||||||||||||||
|
Subroutine
stash: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||
| 10 | 2 | my ($self, ) = @_; | |||||||||||||||||||
| 11 | 2 | ▶ | $self->{_dbic_stash} ||= __PACKAGE__->_dbic_stash; | ||||||||||||||||||
|
Condition66%2/3
$self->{"_dbic_stash"} ||= __PACKAGE__->_dbic_stash
MC/DC0%0/2
$self->{"_dbic_stash"} ||= __PACKAGE__->_dbic_stash
$self->{"_dbic_stash"}
__PACKAGE__->_dbic_stash
Truth table66%2/3
A ||= B
A= $self->{"_dbic_stash"}B= __PACKAGE__->_dbic_stash
| |||||||||||||||||||||
| 12 | } | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | { # set stash method for DBIx::Class::ResultSet and DBIx::Class::Schema | ||||||||||||||||||||
| 15 | 2 | ▶ | no strict 'refs'; ## no critic | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 2 | *{"DBIx\::Class\::ResultSet\::stash"} = \&stash; | |||||||||||||||||||
| 17 | 2 | *{"DBIx\::Class\::Schema\::stash"} = \&stash; | |||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 2 | 1; | |||||||||||||||||||
| 21 | __END__ | ||||||||||||||||||||