blib/lib/VCS/LibCVS/Client/Request/Requests.pm

filter: Statementstmt 86.7% 85 / 98 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.7% 33 / 46 Podpod n/a totaltotal 81.9% 118 / 144 CC 1 SCAR 2.5
CC
1
Cov
87%
required_data
2.0
required_data
2.0
required_data
2.0
CRAP 1.3
« blib/lib/VCS/LibCVS/Client/Response/FileUpdatingResponses.pm ↑ Summary blib/lib/VCS/LibCVS/Client/Response/FileUpdateModifyingResponses.pm »
1 #
2 # Copyright (c) 2003,2004,2005 Alexander Taler (dissent@0--0.org)
3 #
4 # All rights reserved. This program is free software; you can redistribute it
5 # and/or modify it under the same terms as Perl itself.
6 #
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 VCS::LibCVS::Client::Request::Requests - Classes for many requests
13  
14 =head1 SYNOPSIS
15  
16 my $mode = VCS::LibCVS::Datum::Mode->new("u=rw,g=rw,o=r");
17 my $mod_request = VCS::LibCVS::Client::Request::Modified->
18 new( [ "afile" , $mode, "/tmp/afile" ] );
19 $client->submit_request($mod_request);
20  
21 =head1 DESCRIPTION
22  
23 Each request of the CVS client protocol has its own class. Many of them are
24 here.
25  
26 Each request requires specific pieces of data; this data is listed by type and
27 name for each request.
28  
29 =head1 SUPERCLASS
30  
31 VCS::LibCVS::Client::Request
32  
33 =cut
34  
35 1 $VCS::LibCVS::Client::Request::Requests::REVISION = '$Header: /cvsroot/libcvs-perl/libcvs-perl/VCS/LibCVS/Client/Request/Requests.pm,v 1.23 2005/10/10 12:52:11 dissent Exp $ ';
36  
37 ###############################################################################
38 # Root
39 ###############################################################################
40  
41 =head1 CLASSES
42  
43 =head2 VCS::LibCVS::Client::Request::Root
44  
45 Specify the CVS root directory for this session. This request is issued
46 automatically by the Client.
47  
48 "String": RootDir
49  
50 =cut
51  
52 package VCS::LibCVS::Client::Request::Root;
53 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
54 1 @ISA =("VCS::LibCVS::Client::Request");
55 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Root"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
56  
57 ###############################################################################
58 # Valid-responses
59 ###############################################################################
60  
61 =head2 VCS::LibCVS::Client::Request::Valid_responses
62  
63 "String": List of valid responses
64  
65 =cut
66  
67 package VCS::LibCVS::Client::Request::Valid_responses;
68 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
69 1 @ISA =("VCS::LibCVS::Client::Request");
70 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Valid-responses"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
71  
72 ###############################################################################
73 # valid-requests
74 ###############################################################################
75  
76 =head2 VCS::LibCVS::Client::Request::valid_requests
77  
78 Ask the server for a list of requests it accepts. This request is issued
79 automatically by the Client, who provides a way to access them.
80  
81 No data is required.
82  
83 =cut
84  
85 package VCS::LibCVS::Client::Request::valid_requests;
86 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
87 1 @ISA =("VCS::LibCVS::Client::Request");
88 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "valid-requests"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
89 0 ▶sub required_data { return (); }
Subroutine required_data: not called CC=1 SCAR=6.9
90  
91 ###############################################################################
92 # Directory
93 ###############################################################################
94  
95 =head2 VCS::LibCVS::Client::Request::Directory
96  
97 Specify a directory which the next Argument Using Request will work in.
98  
99 "DirectoryName": Local Directory
100 "DirectoryName": Absolute Repository Directory
101  
102 =cut
103  
104 package VCS::LibCVS::Client::Request::Directory;
105 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
106 1 @ISA =("VCS::LibCVS::Client::Request");
107 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Directory"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
108 0 ▶sub required_data { return ("DirectoryName", "DirectoryName"); }
Subroutine required_data: not called CC=1 SCAR=6.9
109  
110 ###############################################################################
111 # Sticky
112 ###############################################################################
113  
114 =head2 VCS::LibCVS::Client::Request::Sticky
115  
116 Specify that the most recent directory provided has a sticky tag.
117  
118 "TagSpec": the sticky tag
119  
120 =cut
121  
122 package VCS::LibCVS::Client::Request::Sticky;
123 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
124 1 @ISA =("VCS::LibCVS::Client::Request");
125 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Sticky"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
126 0 ▶sub required_data { return ("TagSpec"); }
Subroutine required_data: not called CC=1 SCAR=6.9
127  
128 ###############################################################################
129 # Entry
130 ###############################################################################
131  
132 =head2 VCS::LibCVS::Client::Request::Entry
133  
134 Specify an RCS style Entry Line for the next Modifed request.
135  
136 "Entry": The entry line
137  
138 =cut
139  
140 package VCS::LibCVS::Client::Request::Entry;
141 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
142 1 @ISA =("VCS::LibCVS::Client::Request");
143 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Entry"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
144 0 ▶sub required_data { return ("Entry"); }
Subroutine required_data: not called CC=1 SCAR=6.9
145  
146 ###############################################################################
147 # Checkin-time
148 ###############################################################################
149  
150 =head2 VCS::LibCVS::Client::Request::Checkin_time
151  
152 Specify the checkin time for the next Modifed request.
153  
154 "Time": The checkin time
155  
156 =cut
157  
158 package VCS::LibCVS::Client::Request::Checkin_time;
159 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
160 1 @ISA =("VCS::LibCVS::Client::Request");
161 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Checkin-time"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
162 0 ▶sub required_data { return ("Time"); }
Subroutine required_data: not called CC=1 SCAR=6.9
163  
164 ###############################################################################
165 # Modified
166 ###############################################################################
167  
168 =head2 VCS::LibCVS::Client::Request::Modified
169  
170 Specify the contents of a modified file.
171  
172 "FileName": the name of the modified file
173 "FileMode": its mode
174 "FileContents": the file itself
175  
176 =cut
177  
178 package VCS::LibCVS::Client::Request::Modified;
179 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
180 1 @ISA =("VCS::LibCVS::Client::Request");
181 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Modified"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
182 0 ▶sub required_data { return ("FileName", "FileMode", "FileContents"); }
Subroutine required_data: not called CC=1 SCAR=6.9
183  
184 ###############################################################################
185 # Is-modified
186 ###############################################################################
187  
188 =head2 VCS::LibCVS::Client::Request::Is_modified
189  
190 Specify that a file is modified without sending its contents.
191  
192 "FileName": Name of the modified file
193  
194 =cut
195  
196 package VCS::LibCVS::Client::Request::Is_modified;
197 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
198 1 @ISA =("VCS::LibCVS::Client::Request");
199 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Is-modified"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
200 0 ▶sub required_data { return ("FileName"); }
Subroutine required_data: not called CC=1 SCAR=6.9
201  
202 ###############################################################################
203 # Unchanged
204 ###############################################################################
205  
206 =head2 VCS::LibCVS::Client::Request::Unchanged
207  
208 Specify that a file has not been modified.
209  
210 "FileName": Name of the unmodified file
211  
212 =cut
213  
214 package VCS::LibCVS::Client::Request::Unchanged;
215 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
216 1 @ISA =("VCS::LibCVS::Client::Request");
217 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Unchanged"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
218 0 ▶sub required_data { return ("FileName"); }
Subroutine required_data: not called CC=1 SCAR=6.9
219  
220 ###############################################################################
221 # UseUnchanged
222 ###############################################################################
223  
224 =head2 VCS::LibCVS::Client::Request::UseUnchanged
225  
226 Specify the version of the protocol
227  
228 No data is required.
229  
230 =cut
231  
232 package VCS::LibCVS::Client::Request::UseUnchanged;
233 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
234 1 @ISA =("VCS::LibCVS::Client::Request");
235 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "UseUnchanged"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
236 0 ▶sub required_data { return (); }
Subroutine required_data: not called CC=1 SCAR=6.9
237  
238 ###############################################################################
239 # Questionable
240 ###############################################################################
241  
242 =head2 VCS::LibCVS::Client::Request::Questionable
243  
244 Specify the name of a file which may need to be ignored
245  
246 "FileName": Name of the unmodified file
247  
248 =cut
249  
250 package VCS::LibCVS::Client::Request::Questionable;
251 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
252 1 @ISA =("VCS::LibCVS::Client::Request");
253 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Questionable"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
254 0 ▶sub required_data { return ("FileName"); }
Subroutine required_data: not called CC=1 SCAR=6.9
255  
256 ###############################################################################
257 # Case
258 ###############################################################################
259  
260 =head2 VCS::LibCVS::Client::Request::Case
261  
262 Specify that the server should ignore case
263  
264 No data is required.
265  
266 =cut
267  
268 package VCS::LibCVS::Client::Request::Case;
269 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
270 1 @ISA =("VCS::LibCVS::Client::Request");
271 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "Case"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
272 0 ▶sub required_data { return (); }
Subroutine required_data: not called CC=1 SCAR=6.9
273  
274 ###############################################################################
275 # init
276 ###############################################################################
277  
278 =head2 VCS::LibCVS::Client::Request::init
279  
280 Initialize a new repository. No need to call Root beforehand.
281  
282 "String": RootName of repository to be initialized.
283  
284 =cut
285  
286 package VCS::LibCVS::Client::Request::init;
287 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
288 1 @ISA =("VCS::LibCVS::Client::Request");
289 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "init"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
290  
291 ###############################################################################
292 # noop
293 ###############################################################################
294  
295 =head2 VCS::LibCVS::Client::Request::noop
296  
297 No operation. Do nothing except get pent up responses from the server
298  
299 No data is required.
300  
301 =cut
302  
303 package VCS::LibCVS::Client::Request::noop;
304 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
305 1 @ISA =("VCS::LibCVS::Client::Request");
306 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "noop"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
307 0 ▶sub required_data { return (); }
Subroutine required_data: not called CC=1 SCAR=6.9
308  
309 ###############################################################################
310 # version
311 ###############################################################################
312  
313 =head2 VCS::LibCVS::Client::Request::version
314  
315 Return the version of CVS running as server.
316  
317 No data is required.
318  
319 =cut
320  
321 package VCS::LibCVS::Client::Request::version;
322 1 ▶use vars ('@ISA');
Subroutine BEGIN: called CC=1 SCAR=0.0
323 1 @ISA =("VCS::LibCVS::Client::Request");
324 1 ▶sub BEGIN { push @VCS::LibCVS::Client::Request::Valid_requests, "version"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
325 0 ▶sub required_data { return (); }
Subroutine required_data: not called CC=1 SCAR=6.9
326  
327 =head1 SEE ALSO
328  
329 VCS::LibCVS::Client
330 VCS::LibCVS::Client::Request
331  
332 =cut
333  
334 1 1;
« blib/lib/VCS/LibCVS/Client/Response/FileUpdatingResponses.pm ↑ Summary blib/lib/VCS/LibCVS/Client/Response/FileUpdateModifyingResponses.pm »