[Dbix-class] Specify tables for DBIx::Class::Schema::Loader

John Li johnli at accessmedia.tv
Sat May 27 01:28:12 CEST 2006


Thanks, Matt.

I also found 'constraint' and 'exclude' in the code before getting this
message. 

foreach my $table (@tables) {
        my $constraint = $self->constraint;
        my $exclude = $self->exclude;

        next unless $table =~ /$constraint/;
        next if defined $exclude && $table =~ /$exclude/;
	  ...
}

Thanks again for pointing out the documentation :)

John


-----Original Message-----
From: dbix-class-bounces at lists.rawmode.org
[mailto:dbix-class-bounces at lists.rawmode.org] On Behalf Of Matt S Trout
Sent: Friday, May 26, 2006 4:20 PM
To: dbix-class at lists.rawmode.org
Subject: Re: [Dbix-class] Specify tables for DBIx::Class::Schema::Loader

John Li wrote:
> Hi,
> 
>  
> 
> Is there anyway that we can specify tables that we want/don't want in 
> DBIx::Class::Schema::Loader::make_schema_at? Preferably using regular 
> expressions or an arrayref of table names.

Y'know, this is documented :)

http://search.cpan.org/~blblack/DBIx-Class-Schema-Loader-0.03000/lib/DBIx/Cl
ass/Schema/Loader.pm#loader_options

references

::Base, which includes

http://search.cpan.org/dist/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/L
oader/Base.pm#constraint

which takes a regex. That do the trick?

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/





More information about the Dbix-class mailing list