diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index c979849..5ec80b2 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -557,7 +557,8 @@ or $fixtures->dump({ all => 1, # just dump everything that's in the schema schema => $source_dbic_schema, - directory => '/home/me/app/fixtures' # output directory + directory => '/home/me/app/fixtures', # output directory + #excludes => [ qw/Foo MyView/ ], # optionally exclude certain sources }); In this case objects will be dumped to subdirectories in the specified @@ -567,9 +568,14 @@ directory. For example: /home/me/app/fixtures/artist/3.fix /home/me/app/fixtures/producer/5.fix -schema and directory are required attributes. also, one of config or all must +C and C are required attributes. also, one of C or C must be specified. +The optional parameter C takes an array ref of source names and can be +used to exclue those sources when dumping the whole schema. This is useful if +you have views in there, since those do not need fixtures and will currently result +in an error when they are created and then used with C. + Lastly, the C parameter can be a Perl HashRef instead of a file name. If this form is used your HashRef should conform to the structure rules defined for the JSON representations. @@ -1584,4 +1590,4 @@ sub _name_for_source { =cut -1; +1; \ No newline at end of file