DBI

 view release on metacpan or  search on metacpan

DBI.pm  view on Meta::CPAN

	    unless UNIVERSAL::isa("${h_class}_mem", $mem_class)
	    or $DBI::PurePerl;
    }
}


sub _rebless {
    my $dbh = shift;
    my ($outer, $inner) = DBI::_handles($dbh);
    my $class = shift(@_).'::db';
    bless $inner => $class;
    bless $outer => $class; # outer last for return
}


sub _set_isa {
    my ($classes, $topclass) = @_;
    my $trace = DBI->trace_msg("       _set_isa([@$classes])\n");
    foreach my $suffix ('::db','::st') {
	my $previous = $topclass || 'DBI'; # trees are rooted here
	foreach my $class (@$classes) {
	    my $base_class = $previous.$suffix;

lib/DBI/Gofer/Serializer/Base.pm  view on Meta::CPAN

use warnings;

use Carp qw(croak);

our $VERSION = "0.009950";


sub new {
    my $class = shift;
    my $deserializer_class = $class->deserializer_class;
    return bless { deserializer_class => $deserializer_class } => $class;
}

sub deserializer_class {
    my $self = shift;
    my $class = ref($self) || $self;
    $class =~ s/^DBI::Gofer::Serializer:://;
    return $class;
}

sub serialize {

lib/DBI/Profile.pm  view on Meta::CPAN

use constant DBIprofile_Statement	=> '!Statement';
use constant DBIprofile_MethodName	=> '!MethodName';
use constant DBIprofile_MethodClass	=> '!MethodClass';

our $ON_DESTROY_DUMP = sub { DBI->trace_msg(shift, 0) };
our $ON_FLUSH_DUMP   = sub { DBI->trace_msg(shift, 0) };

sub new {
    my $class = shift;
    my $profile = { @_ };
    return bless $profile => $class;
}


sub _auto_new {
    my $class = shift;
    my ($arg) = @_;

    # This sub is called by DBI internals when a non-hash-ref is
    # assigned to the Profile attribute. For example
    #	dbi:mysql(RaiseError=>1,Profile=>!Statement:!MethodName/DBIx::MyProfile/arg1:arg2):dbname

lib/DBI/Util/CacheMemory.pm  view on Meta::CPAN

=cut

our $VERSION = "0.010315";

my %cache;

sub new {
    my ($class, %options ) = @_;
    my $namespace = $options{namespace} ||= 'Default';
    #$options{_cache} = \%cache; # can be handy for debugging/dumping
    my $self =  bless \%options => $class;
    $cache{ $namespace } ||= {}; # init - ensure it exists
    return $self;
}

sub set {
    my ($self, $key, $value) = @_;
    $cache{ $self->{namespace} }->{$key} = $value;
}

sub get {

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

( run in 1.025 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )