| 1 | package Git::Raw::RefSpec; | ||
| 2 | 88 | $Git::Raw::RefSpec::VERSION = '0.90'; | |
| 3 | 88 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 88 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | use overload | ||
| 6 | 1 | ▶ | '""' => sub { return $_[0] -> string }, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 7 | 88 | fallback => 1; | |
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | Git::Raw::RefSpec - Git refspec class | ||
| 12 | |||
| 13 | =head1 VERSION | ||
| 14 | |||
| 15 | version 0.90 | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | A L<Git::Raw::RefSpec> represents a Git refspec. | ||
| 20 | |||
| 21 | B<WARNING>: The API of this module is unstable and may change without warning | ||
| 22 | (any change will be appropriately documented in the changelog). | ||
| 23 | |||
| 24 | =head1 METHODS | ||
| 25 | |||
| 26 | =head2 parse( $input, $is_fetch ) | ||
| 27 | |||
| 28 | Parse the refspec string C<$input>. | ||
| 29 | |||
| 30 | =head2 dst( ) | ||
| 31 | |||
| 32 | Retrieve the destination specifier of the refspec. | ||
| 33 | |||
| 34 | =head2 dst_matches( $name ) | ||
| 35 | |||
| 36 | Check if the refspec's destination descriptor matches the reference named | ||
| 37 | by C<$name>. | ||
| 38 | |||
| 39 | =head2 src( ) | ||
| 40 | |||
| 41 | Retrieve the source specifier of the refspec. | ||
| 42 | |||
| 43 | =head2 src_matches( $name ) | ||
| 44 | |||
| 45 | Check if the refspec's source descriptor matches the reference named | ||
| 46 | by C<$name>. | ||
| 47 | |||
| 48 | =head2 string( ) | ||
| 49 | |||
| 50 | Get the refspec's string. | ||
| 51 | |||
| 52 | =head2 direction( ) | ||
| 53 | |||
| 54 | Get the refspec's direction. It is either C<"fetch"> or C<"push">. | ||
| 55 | |||
| 56 | =head2 transform( $name ) | ||
| 57 | |||
| 58 | Transform C<$name> to its target following the refspec's rules. | ||
| 59 | |||
| 60 | =head2 rtransform( $name ) | ||
| 61 | |||
| 62 | Transform the target reference C<$name> to its source reference name following | ||
| 63 | the refspec's rules. | ||
| 64 | |||
| 65 | =head2 is_force( ) | ||
| 66 | |||
| 67 | Get the refspec's force update setting. | ||
| 68 | |||
| 69 | =head1 AUTHOR | ||
| 70 | |||
| 71 | Alessandro Ghedini <alexbio@cpan.org> | ||
| 72 | |||
| 73 | Jacques Germishuys <jacquesg@cpan.org> | ||
| 74 | |||
| 75 | =head1 LICENSE AND COPYRIGHT | ||
| 76 | |||
| 77 | Copyright 2012 Alessandro Ghedini. | ||
| 78 | |||
| 79 | This program is free software; you can redistribute it and/or modify it | ||
| 80 | under the terms of either: the GNU General Public License as published | ||
| 81 | by the Free Software Foundation; or the Artistic License. | ||
| 82 | |||
| 83 | See http://dev.perl.org/licenses/ for more information. | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | 88 | 1; # End of Git::Raw::RefSpec | |