|
NAMEDBIx::Class::Fixtures::External::File - save and restore external dataSYNOPSISmy $fixtures = DBIx::Class::Fixtures ->new({ config_dir => 't/var/configs', config_attrs => { photo_dir => './t/var/files' }); { "sets": [{ "class": "Photo", "quantity": "all", "external": { "file": { "class": "File", "args": {"path":"__ATTR(photo_dir)__"} } } }] } DESCRIPTIONSometimes your database fields are pointers to external data. The classic example is you are using DBIx::Class::InflateColumn::FS to manage blob data. In these cases it may be desirable to backup and restore the external data via fixtures.This module performs this function and can also serve as an example for your possible custom needs. METHODSThis module defines the following methodsbackupAccepts: Value of Database Field, $argsGiven the value of a database field (which is some sort of pointer to the location of an actual file, and a hashref of args (passed in the args key of your config set), slurp up the file and return to to be saved in the fixure. restoreAccepts: Value of Database Field, Content, $argsGiven the value of a database field, some blob content and $args, restore the file to the filesystem AUTHORSee L<DBIx::Class::Fixtures> for author information. CONTRIBUTORSSee L<DBIx::Class::Fixtures> for contributor information. LICENSESee L<DBIx::Class::Fixtures> for license information.
Visit the GSP FreeBSD Man Page Interface. |