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


Manual Reference Pages  -  DBIX::CLASS::FIXTURES::EXTERNAL::FILE (3)

.ds Aq ’

NAME

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

CONTENTS

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

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

    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

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.



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


perl v5.20.3 DBIX::CLASS::FIXTURES::EXTERNAL::FILE (3) 2015-06-04

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