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::Migration::RunScript::Trait::TargetPath(3) User Contributed Perl Documentation DBIx::Class::Migration::RunScript::Trait::TargetPath(3)

DBIx::Class::Migration::RunScript::Trait::TargetPath - Your migration target directory

    use DBIx::Class::Migration::RunScript;

    builder {
      'TargetPath',
      sub {
        open(my $file, '<', shift->target_path('file'));
      };
    };

Sometimes you would like to access your migration target directory when running migration scripts. For example, you might have some data stored in CSV files and you want to load that data into the database as part of your migration.

This class defines the follow methods.

@args are optional.

returns a path to whatever "target_dir" is (typically PROJECT_ROOT/share if you are using the default). If you pass @args, those args will be added as path parts to the returned path.

Example usage:

  $self->target_path
  $self->target_path('file');
  $self->target_path('path', 'to', 'file');

DBIx::Class::Migration, DBIx::Class::Migration::RunScript

See DBIx::Class::Migration for author information

See DBIx::Class::Migration for copyright and license information
2020-06-02 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.