DBIx::C...getPath(3)

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

🌸 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::Migration
  • DBIx::Class::Migration::RunScript

πŸ‘‘ AUTHOR πŸ‘‘

See DBIx::Class::Migration for author information. πŸ‘€

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