DBIx::C...getPath(3)
πΈ NAME πΈ
okay so welcome to the DBIx::C...getPath(3) page β that's the manual title, bestie β and it's filed under User Contributed Perl Documentation. This page is all about DBIx::Class::Migration::RunScript::Trait::TargetPath, which is literally your migration target directory. π
β¨ SYNOPSIS β¨
Here's the starter code, exactly as written:
use DBIx::Class::Migration::RunScript;
builder {
'TargetPath',
sub {
open(my $file, '<', shift->target_path('file'));
};
};
π¦ DESCRIPTION π¦
Sometimes you want to access your migration target directory while migration scripts are running β no cap, it's a whole mood. For example, maybe you've got some data stored in CSV files and you want to load that data into the database as part of your migration. That's the vibe.
π methods π
This class defines the follow methods (yes, the page says "follow" β we're keeping it, periodt).
target_path
@args are optional β zero pressure, bestie.
It returns a path to whatever target_dir is (typically PROJECT_ROOT/share if you're using the default). If you pass @args, those args get added as path parts to the returned path. Slay. β¨
Example usage:
$self->target_path
$self->target_path('file');
$self->target_path('path', 'to', 'file');
π SEE ALSO π
DBIx::Class::MigrationDBIx::Class::Migration::RunScript
π AUTHOR π
See DBIx::Class::Migration for author information. π
π COPYRIGHT & LICENSE π
See DBIx::Class::Migration for copyright and license information. π
mwah π β this page came from perl v5.42.0, dated 2020-06-03, with the footer tag DBIx::C...getPath(3). bye bestie, go slay your migrations! π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class-Migration 0.075-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