view release on metacpan or search on metacpan
share/ext/ext-all-debug.js view on Meta::CPAN
onAdded : function(container, pos) {
this.ownerCt = container;
this.initRef();
this.cascade(function(c){
c.initRef();
});
this.fireEvent('added', this, container, pos);
},
share/ext/ext-all-debug.js view on Meta::CPAN
Ext.destroy(this.layout);
Ext.Container.superclass.beforeDestroy.call(this);
},
cascade : function(fn, scope, args){
if(fn.apply(scope || this, args || [this]) !== false){
if(this.items){
var cs = this.items.items;
for(var i = 0, len = cs.length; i < len; i++){
if(cs[i].cascade){
cs[i].cascade(fn, scope, args);
}else{
fn.apply(scope || cs[i], args || [cs[i]]);
}
}
}
share/ext/ext-all-debug.js view on Meta::CPAN
findById : function(id){
var m = null,
ct = this;
this.cascade(function(c){
if(ct != c && c.id === id){
m = c;
return false;
}
});
share/ext/ext-all-debug.js view on Meta::CPAN
},
findBy : function(fn, scope){
var m = [], ct = this;
this.cascade(function(c){
if(ct != c && fn.call(scope || c, c, ct) === true){
m.push(c);
}
});
return m;
share/ext/ext-all-debug.js view on Meta::CPAN
this[this.collapseEl].hide(this.hideMode);
}
this.afterEffect(anim);
this.cascade(function(c) {
if (c.lastSize) {
c.lastSize = { width: undefined, height: undefined };
}
});
this.fireEvent('collapse', this);
share/ext/ext-all-debug.js view on Meta::CPAN
this.el.show();
if(this.maximized){
this.fitContainer();
}
if(Ext.isMac && Ext.isGecko2){
this.cascade(this.setAutoScroll);
}
if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
Ext.EventManager.onWindowResize(this.onWindowResize, this);
}
share/ext/ext-all-debug.js view on Meta::CPAN
}
if(show !== false){
this.el.show();
this.focus.defer(10, this);
if(Ext.isMac && Ext.isGecko2){
this.cascade(this.setAutoScroll);
}
}
if(matchPosition !== false){
this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true));
}
share/ext/ext-all-debug.js view on Meta::CPAN
var f = function(){
if(this.attributes.checked){
r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a]));
}
};
startNode.cascade(f);
return r;
},
getLoader : function(){
share/ext/ext-all-debug.js view on Meta::CPAN
p = p.parentNode;
}
},
cascade : function(fn, scope, args){
if(fn.apply(scope || this, args || [this]) !== false){
var cs = this.childNodes;
for(var i = 0, len = cs.length; i < len; i++) {
cs[i].cascade(fn, scope, args);
}
}
},
share/ext/ext-all-debug.js view on Meta::CPAN
n.ui.hide();
return false;
}
return true;
};
startNode.cascade(f);
if(this.remove){
for(var id in af){
if(typeof id != "function"){
var n = af[id];
if(n && n.parentNode){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper/View/TT/Bootstrap/YUI/Manual.pm view on Meta::CPAN
html.tt uses IE conditional comments to decorate the body tag with a class 'IE'
and another class 'IE5', 'IE6', or 'IE7' depending on the version of the browser
requesting the page. Non-IE browsers will no have these classes added.
This allows you to use the cascade in your css to target IE to correct display
issues that may*cough*WILL*cough* arise.
/* Container dimensions */
.container {
width: 276px;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper/View/TT/Bootstrap/Manual.pm view on Meta::CPAN
html.tt uses IE conditional comments to decorate the body tag with a class 'IE'
and another class 'IE5', 'IE6', or 'IE7' depending on the version of the browser
requesting the page. Non-IE browsers will no have these classes added.
This allows you to use the cascade in your css to target IE to correct display
issues that may*cough*WILL*cough* arise.
/* Container dimensions */
.container {
width: 276px;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod view on Meta::CPAN
__PACKAGE__->has_many(
"book_authors",
"MyApp::Schema::Result::BookAuthor",
{ "foreign.book_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
Each C<Book> "has_many" C<book_authors>, where C<BookAuthor> is the
many-to-many table that allows each Book to have multiple Authors, and
each Author to have multiple books. The arguments to C<has_many> are:
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Schema/Abilities/Result/Action.pm view on Meta::CPAN
__PACKAGE__->has_many(
"role_actions",
"Schema::Abilities::Result::RoleAction",
{ "foreign.action_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 user_actions
Type: has_many
t/lib/Schema/Abilities/Result/Action.pm view on Meta::CPAN
__PACKAGE__->has_many(
"user_actions",
"Schema::Abilities::Result::UserAction",
{ "foreign.action_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-17 10:52:30
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9MkM7yJUfbHnQ25yYnVfKw
# __PACKAGE__->has_many(map_role_actions => 'Schema::Abilities::Result::RoleAction', 'role_id',
# { cascade_copy => 0, cascade_delete => 0 });
# __PACKAGE__->many_to_many(roles => 'map_role_actions', 'action');
__PACKAGE__->meta->make_immutable;
1;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/demo/lib/DemoAppMusicSchema/Result/Album.pm view on Meta::CPAN
__PACKAGE__->has_many(
"album_artists",
"DemoAppMusicSchema::Result::AlbumArtist",
{ "foreign.album_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 sleeve_note
Type: might_have
examples/demo/lib/DemoAppMusicSchema/Result/Album.pm view on Meta::CPAN
__PACKAGE__->might_have(
"sleeve_note",
"DemoAppMusicSchema::Result::SleeveNote",
{ "foreign.album_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 tracks
Type: has_many
examples/demo/lib/DemoAppMusicSchema/Result/Album.pm view on Meta::CPAN
__PACKAGE__->has_many(
"tracks",
"DemoAppMusicSchema::Result::Track",
{ "foreign.album_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-09 18:35:04
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Wx/g9tUF3BQeBJF1TGW+Ow
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper/Model/CRUD.pm view on Meta::CPAN
my $class_name = sprintf( "%s::Model::ShanonDBI::%s",
$helper->{'app'}, $this->get_class_name( $src_table->{'Tablename'} ) );
$sql->{'references'} = {
class => $class_name,
name => 'id',
onupdate => 'cascade',
ondelete => 'cascade'
};
push @setting,
sprintf( "CONSTRAINT ref_%s REFERENCES %s (id) ON DELETE cascade ON UPDATE cascade",
$column->{'ColName'}, $src_table->{'Tablename'} );
}
# ã³ã¡ã³ã
if ( 'id' eq lc( $column->{'ColName'} ) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/TestBlogApp/Schema/Result/Discussion.pm view on Meta::CPAN
__PACKAGE__->has_many(
"blog_posts",
"TestBlogApp::Schema::Result::BlogPost",
{ "foreign.discussion" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-complex.t view on Meta::CPAN
'filters'=>'{"groupOp":"AND","rules":[],"groups":[{"groupOp":"OR","rules":[{"field":"a","op":"eq","data":"1"},{"field":"b","op":"eq","data":"2"}],"groups":[]},{"groupOp":"OR","rules":[{"field":"c","op":"eq","data":"3"},{"field":"d","op":"eq","d...
},
result=>{'-and'=>[{'-or'=>[{'a'=>{'='=>'1'}},{'b'=>{'='=>'2'}}]},{'-or'=>[{'c'=>{'='=>'3'}},{'d'=>{'='=>'4'}}]}]},
},
{
name=>'and cascade: (((((((((((a = "1")))))))))))',
search=>{ '_search'=>'true',
'filters'=>'{"groupOp":"AND","rules":[],"groups":[{"groupOp":"AND","rules":[],"groups":[{"groupOp":"AND","rules":[],"groups":[{"groupOp":"AND","rules":[],"groups":[{"groupOp":"AND","rules":[],"groups":[{"groupOp":"AND","rules":[],"groups":[{"gr...
},
result=>{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'-and'=>[{'a'=>{'='=>'1'}}]}]}]}]}]}]}]}]}]}]}]},
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/Xslate.pm view on Meta::CPAN
The suffix used to auto generate the template name from the action name
(when you do not explicitly specify the template filename);
Do not confuse this with the C<suffix> option, which is passed directly to
the Text::Xslate object instance. This option works on the filename used
for the initial request, while C<suffix> controls what C<cascade> and
C<include> directives do inside Text::Xslate.
=head2 content_charset
The charset used to output the response body. The value defaults to 'UTF-8'.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Crudite/Schema/ResultBase.pm view on Meta::CPAN
);
$class->add_unique_constraint([qw(name)]);
$class->has_many(
user_roles => "${prefix}::UserRole",
'user_id',
{ cascade_delete => 1 },
);
$class->many_to_many('roles', 'user_roles', 'role');
}
sub setup_role_class {
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/MyApp/Schema/Result/Role.pm view on Meta::CPAN
__PACKAGE__->has_many(
"user_roles",
"MyApp::Schema::Result::UserRole",
{ "foreign.role_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-28 10:35:58
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9RsVVaxRcjUosxeLZI0SfA
view all matches for this distribution
view release on metacpan or search on metacpan
example/root/static/silk.css view on Meta::CPAN
.silk-building-go { background-image: url(fam/building_go.png) !important; background-repeat: no-repeat; }
.silk-building { background-image: url(fam/building.png) !important; background-repeat: no-repeat; }
.silk-cancel { background-image: url(fam/cancel.png) !important; background-repeat: no-repeat; }
.silk-application { background-image: url(fam/application.png) !important; background-repeat: no-repeat; }
.silk-application-add { background-image: url(fam/application_add.png) !important; background-repeat: no-repeat; }
.silk-application-cascade { background-image: url(fam/application_cascade.png) !important; background-repeat: no-repeat; }
.silk-application-delete { background-image: url(fam/application_delete.png) !important; background-repeat: no-repeat; }
.silk-application-double { background-image: url(fam/application_double.png) !important; background-repeat: no-repeat; }
.silk-application-edit { background-image: url(fam/application_edit.png) !important; background-repeat: no-repeat; }
.silk-application-error { background-image: url(fam/application_error.png) !important; background-repeat: no-repeat; }
.silk-application-form { background-image: url(fam/application_form.png) !important; background-repeat: no-repeat; }
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/MyApp/Schema/Result/Role.pm view on Meta::CPAN
__PACKAGE__->has_many(
"user_roles",
"MyApp::Schema::Result::UserRole",
{ "foreign.role_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 1 },
);
__PACKAGE__->meta->make_immutable;
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/live-test.t view on Meta::CPAN
$mech->get_ok('/list/track', 'Get /list/track');
$mech->content_like(qr{TEMPLATE\sOK}xsm, 'Template compiles');
$mech->content_like(qr{\b13\sentries}xsm, 'Right number of records');
$mech->content_like(qr{track\scode.+track\stitle.+album\sreleased.+artist\sname}xism, 'Display column headings cascade');
$mech->content_like(qr{02/03/1989}xsm, 'Date format helper works');
$mech->content_like(qr{Mike\sSmith}xsm, 'Compound name fields work');
$mech->get_ok('/list/track?myprefixsort=fromalbum.artist.acombined_name-asc');
$mech->content_like(qr{\b13\sentries}xsm, 'Right number of records after 2nd call (i.e. $c updated in FB cache)');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CellBIS/SQL/Abstract/Table.pm view on Meta::CPAN
# For Foreign key attribute :
# ------------------------------------------------------------------------
sub fk_attr_validator {
my ($fk_table) = @_;
my $data = '';
my %ondelup = ('cascade' => 'CASCADE', 'null' => 'SET NULL',
'default' => 'SET DEFAULT');
my $ondel = 0;
if (exists $fk_table->{ondelete}) {
if (exists $ondelup{(lc $fk_table->{ondelete})}) {
$ondel = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Changes/Version.pm view on Meta::CPAN
my $frag = shift( @_ );
my $val = shift( @_ );
# We die, because this is an internal method and those cases should not happen unless this were a design bug
if( !defined( $frag ) || !length( $frag ) )
{
die( "No fragment was provided to cascade" );
}
elsif( $frag !~ /^(major|minor|patch|alpha|\d+)$/ )
{
die( "Unsupported version fragment '$frag'. Only use 'major', 'minor', 'patch' or 'alpha' or a number starting from 1 (1 = major, 2 = minor, etc)." );
}
lib/Changes/Version.pm view on Meta::CPAN
$extra->[ $i - 4 ] = $val;
}
last;
}
}
$self->_cascade( $level );
}
sub _cascade
{
my $self = shift( @_ );
my $frag = shift( @_ );
# We die, because this is an internal method and those cases should not happen unless this were a design bug
if( !defined( $frag ) || !length( $frag ) )
{
die( "No fragment was provided to cascade" );
}
elsif( $frag !~ /^(major|minor|patch|alpha|\d+)$/ )
{
die( "Unsupported version fragment '$frag'. Only use 'major', 'minor', 'patch' or 'alpha' or a number starting from 1 (1 = major, 2 = minor, etc)." );
}
lib/Changes/Version.pm view on Meta::CPAN
}
else
{
$extra->[( $frag - 4 )] = $new_val;
}
$new->_cascade( $frag );
}
$new->reset(1);
return( $new );
}
}
lib/Changes/Version.pm view on Meta::CPAN
}
else
{
$extra->[( $frag - 4 )] = $n;
}
$self->_cascade( $frag );
$self->reset(1);
return( $self );
}
sub _noop
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chess/GameClock/GclkSettings.pm view on Meta::CPAN
my $menubar =$top->Menu(-type => 'menubar');
$top->configure(-menu => $menubar);
foreach my $m (@menu) {
# creation des sous-menus en cascade
$sous_menuref{$m} = $menubar->cascade(-label=>$m) ;
# entrées des données des sous-menus
map($soussous_ref{$m}{$_}= $sous_menuref{$m}->cascade(-label=>$_),@{$sous_menu{$m}});
}
foreach my $type (keys %soussous_ref) {
for my $cadence (keys %{$soussous_ref{$type} }) {
lib/Chess/GameClock/GclkSettings.pm view on Meta::CPAN
for (qw/Cadence2 Cadence3 Cadence4/) {
$rb{ReglagesManuels}{$_}[0]->configure (-state=>'disabled') ;
}
#$soussous_ref{Aide}{Bref}= $sous_menuref{Aide}->cascade(-label=>'En Bref') ;
#my $cmd=$soussous_ref{Aide}{Bref}->command(-label=>'voir',-command=>\&voir) ;
$sous_menuref{Aide}->command(-label=>'En Bref',-command=>[\&voir,%aide]) ;
$soussous_ref{ReglagesManuels}{Options}->command(-label=>'Adjust',-command=>\&adjust) ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Cascade/Plugin/Nullify.pm view on Meta::CPAN
use base 'Class::DBI::Cascade::None';
our $VERSION = 0.05;
sub cascade {
my ($self, $obj) = @_;
my $foreign_objects = $self->foreign_for($obj); # get all foreign objects
my $foreign_key = $self->{_rel}->args->{foreign_key}; # get the foreign key
while ( my $foreign_object = $foreign_objects->next) {
lib/Class/DBI/Cascade/Plugin/Nullify.pm view on Meta::CPAN
=head1 SYNOPSIS
package Music::Artist;
# define your class here
Music::Artist->has_many(cds => 'Music::CD', {cascade => 'Class::DBI::Cascade::Plugin::Nullify'});
=head1 DESCRIPTION
This is a cascading nullify strategy (i.e. 'on delete set null') that will nullify any related L<Class::DBI> objects.
THIS MODULE IS NOT LONGER DEVELOPED. Please consider L<Rose::DB::Object> as a alternative to L<Class::DBI>.
=head1 METHODS
=head2 C<cascade>
implementation of the cascading nullify strategy.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Frozen/301/Relationship/HasMany.pm view on Meta::CPAN
$self->SUPER::_set_up_class_data;
}
sub triggers {
my $self = shift;
return if $self->args->{no_cascade_delete}; # undocumented and untestsd!
return (
before_delete => sub {
$self->foreign_class->search($self->args->{foreign_key} => shift->id)
->delete_all;
});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Relationship/HasManyOrdered.pm view on Meta::CPAN
if ($meta->args->{map}) {
my $pk = $self->columns('Primary');
my $sth = $self->db_Main->prepare("delete from ".$meta->args->{map}." where $pk = ?");
my $rv = $sth->execute($self->id);
} else {
return if $self->args->{no_cascade_delete}; # undocumented and untested!
$f_class->search($f_key => $self->id)->delete_all;
}
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/cdbi-t-ocache/17-data_type.t
t/cdbi-t-ocache/18-has_a.t
t/cdbi-t-ocache/19-set_sql.t
t/cdbi-t-ocache/21-iterator.t
t/cdbi-t-ocache/22-deflate_order.t
t/cdbi-t-ocache/23-cascade.t
t/cdbi-t-ocache/24-meta_info.t
t/cdbi-t-ocache/25-closures_in_meta.t
t/cdbi-t-ocache/97-pod.t
t/cdbi-t-ocache/98-failure.t
t/cdbi-t-ocache/99-misc.t
t/cdbi-t-rescache/17-data_type.t
t/cdbi-t-rescache/18-has_a.t
t/cdbi-t-rescache/19-set_sql.t
t/cdbi-t-rescache/21-iterator.t
t/cdbi-t-rescache/22-deflate_order.t
t/cdbi-t-rescache/23-cascade.t
t/cdbi-t-rescache/24-meta_info.t
t/cdbi-t-rescache/25-closures_in_meta.t
t/cdbi-t-rescache/97-pod.t
t/cdbi-t-rescache/98-failure.t
t/cdbi-t-rescache/99-misc.t
t/cdbi-t/17-data_type.t
t/cdbi-t/18-has_a.t
t/cdbi-t/19-set_sql.t
t/cdbi-t/21-iterator.t
t/cdbi-t/22-deflate_order.t
t/cdbi-t/23-cascade.t
t/cdbi-t/24-meta_info.t
t/cdbi-t/25-closures_in_meta.t
t/cdbi-t/97-pod.t
t/cdbi-t/98-failure.t
t/cdbi-t/99-misc.t
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI.pm view on Meta::CPAN
Multiple objects can be deleted by calling delete_all on the Iterator
returned from a search. Each object found will be deleted in turn,
so cascading delete and other triggers will be honoured.
The C<before_delete> trigger is when an object instance is about to be
deleted. It is invoked before any cascaded deletes. The C<after_delete>
trigger is invoked after the record has been deleted from the database
and just before the contents in memory are discarded.
=head1 RETRIEVING OBJECTS
lib/Class/DBI.pm view on Meta::CPAN
For an example of where this is useful see L<"MANY TO MANY RELATIONSHIPS">
below.
=head3 Cascading Delete
Music::Artist->has_many(cds => 'Music::CD', { cascade => 'Fail' });
It is also possible to control what happens to the 'child' objects when
the 'parent' object is deleted. By default this is set to 'Delete' - so,
for example, when you delete an artist, you also delete all their CDs,
leaving no orphaned records. However you could also set this to 'None',
lib/Class/DBI.pm view on Meta::CPAN
For example you could write a Class::DBI::Cascade::Plugin::Nullify
which would set all related foreign keys to be NULL, and plug it into
your relationship:
Music::Artist->has_many(cds => 'Music::CD', {
cascade => 'Class::DBI::Cascade::Plugin::Nullify'
});
=head2 might_have
Music::CD->might_have(method_name => Class => (@fields_to_import));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Interface.pm view on Meta::CPAN
# make sure the import is not found through inheritance.
unless ( defined &{ $caller . "::import" } ) {
*{ $caller . "::import" } = sub {
# don't cascade up to the interface.
}
}
makeMagicConstructor($caller);
view all matches for this distribution
view release on metacpan or search on metacpan
MakeMethods/Utility/Inheritable.pm view on Meta::CPAN
get_vvalue($dataset, 'MySubclass'); # Subclass "inherits"
get_vvalue($dataset, $subobj); # As do its objects
set_vvalue($dataset, 'MySubclass', 'Foozle'); # Until we override it
get_vvalue($dataset, 'MySubclass'); # Now finds "Foozle"
get_vvalue($dataset, $subobj); # Change cascades down
set_vvalue($dataset, $subobj, 'Foolish'); # Until we override again
get_vvalue($dataset, 'MyClass'); # Superclass is unchanged
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Multimethods/Pure.pm view on Meta::CPAN
(Kunction, Junction), because there are two methods that would satisfy
that.
The way to define precedence with these combinators is similar to the
way you define precedence in a recursive descent grammar. You create a
cascade of empty classes at the top of your heirarchy, and derive each
of your generics from a different one of those:
package AnyObject;
package JunctionObject;
use base 'AnyObject';
view all matches for this distribution
view release on metacpan or search on metacpan
tutorial.html view on Meta::CPAN
multiply dispatched methods that look at the types of each of their arguments
and react accordingly. For example, a normal (<I>singly-dispatched</I>)
method could use </FONT><FONT FACE="Courier">ref</FONT><FONT FACE="Times">
or </FONT><FONT FACE="Courier">isa</FONT><FONT FACE="Times"> to determine
the types of its other arguments and then select the correct behaviour
in a cascaded </FONT><FONT FACE="Courier">if</FONT><FONT FACE="Times">
statement. Alternatively, it's possible to use hashes of hashes to set
up a multidimensional table of subroutine references, then use the class
names of the arguments (again found with </FONT><FONT FACE="Courier">ref</FONT><FONT FACE="Times">)
to index into it. Both these approaches are described in detail in <A HREF="#references">[1,2]</A>.</FONT></FONT>
view all matches for this distribution
view release on metacpan or search on metacpan
t/4_export_ok.t view on Meta::CPAN
# load your module...
use lib './';
# we gonna see if'n it cun export wut itz 'pose ta. this checks the
# @EXPORT_OK of all packages in the inheritance cascade, which is the
# only reason we're doing this. we already know that it UNIVERSAL::can do
# all its own methods if this test is being run. test 3 ensures that.
# this is just an automated non-empty superclass test
use Class::OOorNO @OOorNO::EXPORT_OK;
view all matches for this distribution
view release on metacpan or search on metacpan
README
t/autoload.t
t/base.t
t/base2.t
t/big-base.t
t/cascade.t
t/const.t
t/early.t
t/export1.t
t/export2.t
t/export3.t
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Tables.pm view on Meta::CPAN
######################
sub import {
my ($class, %args) = @_;
$CASCADE = $args{cascade} if exists $args{cascade};
$INFLECT = $args{inflect} if exists $args{inflect};
$SCHEMA_CACHE = $args{cache} if exists $args{cache};
}
sub dbh {
lib/Class/Tables.pm view on Meta::CPAN
my $class = ref $self;
my $table = $class->_table;
my $id_col = $class->_id_col;
if ($CASCADE) {
my @cascade = grep { $CLASS{$class}{accessors}{$_}{type} eq '1-to-n' }
keys %{ $CLASS{$class}{accessors} };
for my $accessor (@cascade) {
$_->delete for $self->$accessor;
}
}
sql_do("delete from $table where $id_col=?", $id);
lib/Class/Tables.pm view on Meta::CPAN
Valid argument keys are:
=over
=item cascade
Takes a boolean value indicating whether to perform cascading deletes. See
C<delete> below for information on cascading deletes. If you need to change
cascading delete behavior on the fly, localize C<$Class::Tables::CASCADE>.
lib/Class/Tables.pm view on Meta::CPAN
=back
The default behavior is:
use Class::Tables cascade => 1, inflect => 1, cache => undef;
=item C<< Class::Tables->dbh($dbh) >>
You must pass Class::Tables an active database handle before you can use any
view all matches for this distribution