App-Sqitch

 view release on metacpan or  search on metacpan

lib/App/Sqitch/Plan/ChangeList.pm  view on Meta::CPAN

contains no changes.

=head3 C<last_tagged_change>

  my $change = $changelist->last_tagged_change;

Returns the last tagged change in the list. Returns C<undef> if the list
contains no tagged changes.

=head3 C<index_of_last_tagged>

  my $index = $changelist->index_of_last_tagged;

Returns the index of the last tagged change in the list. Returns C<undef> if the
list contains no tags.

=head3 C<get>

  my $change = $changelist->get($id);
  my $change = $changelist->get($change_name);
  my $change = $changelist->get($tag_name);

Returns the change for the specified ID or name. The name may be specified as
described for C<index_of()>. An exception will be thrown if more than one change
goes by a specified name. As such, it is best to specify it as unambiguously
as possible: as a tag name, a tag-qualified change name, or an ID.

=head3 C<contains>

  say 'Yes!' if $plan->contains('6c2f28d125aff1deea615f8de774599acf39a7a1');

Like C<index_of()>, but never throws an exception, and returns true if the
plan contains the specified change, and false if it does not.

=head3 C<find>

  my $change = $changelist->find($id);
  my $change = $changelist->find($change_name);
  my $change = $changelist->find($tag_name);
  my $change = $changelist->find("$change_name\@$tag_name");

Tries to find and return a change based on the argument. If no tag is specified,
finds and returns the first instance of the named change. Otherwise, it returns
the change as of the specified tag. Unlike C<get()>, it will not throw an error
if more than one change exists with the specified name, but will return the
first instance.

=head3 C<append>

  $changelist->append(@changes);

Append one or more changes to the list. Does not check for duplicates, so
use with care.

=head3 C<index_tag>

  $changelist->index_tag($index, $tag);

Index the tag at the specified index. That is, the tag is assumed to be
associated with the change at the specified index, and so the internal look up
table is updated so that the change at that index can be found via the tag's
name and ID.

=head1 See Also

=over

=item L<App::Sqitch::Plan>

The Sqitch plan.

=back

=head1 Author

David E. Wheeler <david@justatheory.com>

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

=cut



( run in 1.339 second using v1.01-cache-2.11-cpan-39bf76dae61 )