App::S...n::Line(3pm)
β¨ App::Sqitch::Plan::Line β¨
okay so bestie, this is the App::Sqitch::Plan::Line page from the Perl docs, and it's literally the blueprint for Sqitch deployment plan lines. it lives in the 3pm section of the manual, so you know it's a Perl module thing. let's get into it π«Ά
π NAME π
App::Sqitch::Plan::Line β one single Sqitch deployment plan line. that's it, that's the whole job. iconic. β
πΈ SYNOPSIS πΈ
my $plan = App::Sqitch::Plan->new( sqitch => $sqitch );
for my $line ($plan->lines) {
say $line->as_string;
}
see? you make a plan, you loop over its lines, you print them. slay. π
π¦ DESCRIPTION π¦
so an App::Sqitch::Plan::Line represents a single line from a Sqitch plan file. every object that an App::Sqitch::Plan object manages is derived from this class, lowkey.
and here's the tea: this is actually an abstract base class. you don't really use it directly, bestie, you use its concrete subclasses. those are App::Sqitch::Plan::Change, App::Sqitch::Plan::Tag, and App::Sqitch::Plan::Blank. periodt. π
β¨ INTERFACE β¨
π Constructors π
new
my $plan = App::Sqitch::Plan::Line->new(%params);
instantiates and returns an App::Sqitch::Plan::Line object. here are the params you can pass, bestie:
planβ theApp::Sqitch::Planobject that this line is associated with.nameβ the name of the line. it should be empty for blank lines. and heads up: tag names should not include the leading@.lspaceβ the white space from the beginning of the line, if there is any.lopspaceβ the white space to the left of the operator, if any.operatorβ an operator, if any.ropspaceβ the white space to the right of the operator, if any.rspaceβ the white space after the name, up until the end of the line or the start of a note.noteβ a note. it does not include the leading#, but it does include any white space immediately after the#when the plan file gets parsed. no cap.
π Accessors π
plan
my $plan = $line->plan;
returns the plan object that the line object is chillin' with. π«Ά
name
my $name = $line->name;
returns the name of the line. returns an empty string if there's no name. simple as that.
lspace
my $lspace = $line->lspace.
returns the white space from the beginning of the line, if any. π
rspace
my $rspace = $line->rspace.
returns the white space after the name, up until the end of the line or the start of a note.
note
my $note = $line->note.
returns the note. it does not include the leading #, but it does include any white space immediately after the # when the plan file is parsed. returns the empty string if there's no note. π
π Instance Methods π
format_name
my $formatted_name = $line->format_name;
returns the name of the line, properly formatted for output. for tags, it's the name with a leading @. for every other line, it's just... the name. no notes. π
format_operator
my $formatted_operator = $line->format_operator;
returns the formatted representation of the operator. this is just the operator and its associated white space. and if neither the operator nor its white space exists, you get an empty string back. it's used internally by as_string(), so iykyk. π₯
format_content
my $formatted_content $line->format_content;
formats and returns the main content of the line. that's an operator and its associated white space, if any, followed by the formatted name.
format_note
my $note = $line->format_note;
returns the note formatted for output β meaning with a leading # and newlines encoded. cute. π
as_string
my $string = $line->as_string;
returns the full stringification of the line, suitable for output to a plan file. this is the glow-up version. β¨
request_note
my $note = $line->request_note( for => 'add' );
asks the user for a note. pass in the name of the command for which the note is requested via the for parameter. if there's already a note, it just gets returned, easy. otherwise, an editor gets launched and the user is asked to write one. once the editor exits, the note gets retrieved from the file, saved, and returned.
heads up bestie: if no note was written, an exception gets thrown with anexitvalof1. π
note_prompt
my $prompt = $line->note_prompt( for => 'tag' );
returns a localized string for use in the temporary file created by request_note(). pass in the name of the command you're prompting for via the for parameter. πΈ
π SEE ALSO π
App::Sqitch::Planβ the class representing a plan.sqitchβ the Sqitch command-line client.
π«Ά AUTHOR π«Ά
David E. Wheeler <david@justatheory.com> β genuine legend, fr fr. π
π LICENSE π
Copyright (c) 2012-2026 David E. Wheeler, 2012-2021 iovation Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
and that's the whole page, bestie! this one's fromperl v5.40.1, dated2026-07-26, and it's theApp::S...n::Line(3pm)page β theApp::Sqitch::Plan::Linebit got squished in the header, but you know exactly what it is. now go format some lines. bye babe! π β¨
π¦ where this page comes from
- ubuntu stonking: sqitch 1.6.1-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms