DBIO

 view release on metacpan or  search on metacpan

lib/DBIO.pm  view on Meta::CPAN


  my $base = "DBIO::$role";
  eval "require $base; 1"
    or die "use DBIO '$role': cannot load $base: $@";

  {
    no strict 'refs';
    push @{"${caller}::ISA"}, $base unless $caller->isa($base);
  }

  strict->import;
  warnings->import;

  # Schema classes get the skills-override declaration sugar (see DBIO::Skills).
  _install_skill_sugar($caller) if $caller->isa('DBIO::Schema');

  _apply_shortcut($caller, $_) for @opts;
}

# Install the per-schema skills-override sugar into a schema class body:
#

lib/DBIO/Cake.pm  view on Meta::CPAN

      $opts{autoclean} = 1;
    }
    elsif ($arg eq '-no_autoclean') {
      $opts{autoclean} = 0;
    }
  }

  $opts{_storage_class} = $storage_class;

  # Enable strict and warnings in caller
  strict->import;
  warnings->import;

  # Set up inheritance -- caller ISA DBIO::Core
  {
    no strict 'refs';
    unless ($caller->isa('DBIO::Core')) {
      require DBIO::Core;
      push @{"${caller}::ISA"}, 'DBIO::Core';
    }
  }

lib/DBIO/Candy.pm  view on Meta::CPAN

}

sub gen_INIT {
  my ($self, $perl_version, $custom_aliases, $custom_methods, $inheritor, $experimental) = @_;
  sub {
    my $orig = $_[1]->{import_args};
    $_[1]->{import_args} = [];
    %$custom_aliases = ();
    @$custom_methods = ();

    strict->import;
    warnings->import;

    if ($perl_version) {
       require feature;
       feature->import(":5.$perl_version")
    }

    if ($experimental) {
       require experimental;
       die 'experimental arg must be an arrayref!'



( run in 0.857 second using v1.01-cache-2.11-cpan-941387dca55 )