GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DBIx::Class::Fixtures::External::File(3) User Contributed Perl Documentation DBIx::Class::Fixtures::External::File(3)

DBIx::Class::Fixtures::External::File - save and restore external data

    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)__"}
                }
            }
        }]
    }

Sometimes 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.

This module defines the following methods

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 to to be saved in the fixure.

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

    See L<DBIx::Class::Fixtures> for author information.

    See L<DBIx::Class::Fixtures> for contributor information.

    See L<DBIx::Class::Fixtures> for license information.
2017-09-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.