DBIx::C...al::File(3)

πŸ“¦ version 1.001039, in opensuse-leap 16.0

πŸ’… 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