blib/lib/Git/Raw/Config.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Git/Raw/Commit.pm ↑ Summary blib/lib/Git/Raw/Cred.pm »
1 package Git::Raw::Config;
2 1 $Git::Raw::Config::VERSION = '0.90';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Git::Raw;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Git::Raw::Config - Git config class
11  
12 =head1 VERSION
13  
14 version 0.90
15  
16 =head1 DESCRIPTION
17  
18 A L<Git::Raw::Config> represents a Git configuration file.
19  
20 B<WARNING>: The API of this module is unstable and may change without warning
21 (any change will be appropriately documented in the changelog).
22  
23 =head1 METHODS
24  
25 =head2 new( )
26  
27 Create a new config object.
28  
29 =head2 default( )
30  
31 Retrieve the global, XDG and system configuration and open them into a single
32 prioritized config object that can be used when accessing default config data
33 outside a repository.
34  
35 =head2 add_file( $path, $level )
36  
37 Add C<$path> to the config object with priority level C<$level>.
38  
39 =head2 bool( $name [, $value ] )
40  
41 Retrieve the value of the C<$name> configuration field of type boolean. If
42 C<$value> is passed, the value of the configration will be updated and
43 returned. If C<$name> configuration is not found, C<undef> is returned.
44  
45 =head2 int( $name [, $value ] )
46  
47 Retrieve the value of the C<$name> configuration field of type integer. If
48 C<$value> is passed, the value of the configration will be updated and
49 returned. If C<$name> configuration is not found, C<undef> is returned.
50  
51 =head2 str( $name [, $value ] )
52  
53 Retrieve the value of the C<$name> configuration field of type string. If
54 C<$value> is passed, the value of the configration will be updated and
55 returned. If C<$name> configuration is not found, C<undef> is returned.
56  
57 =head2 str_add( $name [, $value ] )
58  
59 Adds the value of the C<$name> configuration field of type string. If
60 C<$value> is passed, the value of the configration will be updated and
61 returned. If C<$name> configuration is not found, C<undef> is returned.
62  
63 =head2 foreach( $callback )
64  
65 Run C<$callback> for every config entry. The callback receives the name of the
66 config entry, its value and its priority level. A non-zero return value stops
67 the loop.
68  
69 =head2 delete( $name )
70  
71 Delete the variable C<$name> from the config object.
72  
73 =head1 AUTHOR
74  
75 Alessandro Ghedini <alexbio@cpan.org>
76  
77 Jacques Germishuys <jacquesg@cpan.org>
78  
79 =head1 LICENSE AND COPYRIGHT
80  
81 Copyright 2012 Alessandro Ghedini.
82  
83 This program is free software; you can redistribute it and/or modify it
84 under the terms of either: the GNU General Public License as published
85 by the Free Software Foundation; or the Artistic License.
86  
87 See http://dev.perl.org/licenses/ for more information.
88  
89 =cut
90  
91 1 1; # End of Git::Raw::Config
« blib/lib/Git/Raw/Commit.pm ↑ Summary blib/lib/Git/Raw/Cred.pm »