DBIx::C...al::File(3)
π NAME π
okay so this is the manual page for DBIx::C...al::File(3) β User Contributed Perl Documentation, no cap β and it's literally about DBIx::Class::Fixtures::External::File - save and restore external data. slay.
β¨ SYNOPSIS β¨
my $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)__"}
}
}
}]
}
π¦ DESCRIPTION π¦
Sometimes your database fields are pointers to external data β that's the whole premise. The classic example is you're 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 it can also serve as an example for your possible custom needs. iykyk.
π§ METHODS π§
This module defines the following methods:
π¦ backup
Accepts: Value of Database Field, $args
Given 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 it to be saved in the fixture. periodt.
π restore
Accepts: Value of Database Field, Content, $args
Given the value of a database field, some blob content and $args, restore the file to the filesystem. iconic behavior.
π AUTHOR π
See L<DBIx::Class::Fixtures> for author information.
π«Ά CONTRIBUTORS π«Ά
See L<DBIx::Class::Fixtures> for contributor information.
π LICENSE π
See L<DBIx::Class::Fixtures> for license information.
β cute sign-off: this manual (DBIx::C...al::File(3)) is from perl v5.42.0, dated 2018-03-05 β that's the footer tea, bestie. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class-Fixtures 1.001039-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms