This file is indexed.

/usr/lib/perl5/APR/Brigade.pm is in libapache2-mod-perl2 2.0.5-5ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# 
# /*
#  * *********** WARNING **************
#  * This file generated by ModPerl::WrapXS/0.01
#  * Any changes made here will be lost
#  * ***********************************
#  * 01: lib/ModPerl/Code.pm:709
#  * 02: lib/ModPerl/WrapXS.pm:626
#  * 03: lib/ModPerl/WrapXS.pm:1175
#  * 04: Makefile.PL:424
#  * 05: Makefile.PL:326
#  * 06: Makefile.PL:57
#  */
# 


package APR::Brigade;

use strict;
use warnings FATAL => 'all';


use APR ();
use APR::XSLoader ();
our $VERSION = '0.009000';
APR::XSLoader::load __PACKAGE__;



1;
__END__

=head1 NAME

APR::Brigade - Perl API for manipulating APR Bucket Brigades




=head1 Synopsis

  use APR::Brigade ();
  
  $bb = APR::Brigade->new($r->pool, $c->bucket_alloc);
  $ba = $bb->bucket_alloc();
  $pool = $bb->pool;
  
  $bb->insert_head($b);
  $bb->insert_tail($b);
  
  $b_first = $bb->first;
  $b_last  = $bb->last;
  
  $b_prev = $bb->prev($b_last);
  $b_next = $bb->next($b);
  
  $bb2 = APR::Brigade->new($r->pool, $c->bucket_alloc);
  $bb1->concat($bb2);
  
  $len = $bb->flatten($data);
  $len = $bb2->flatten($data, $wanted);
  
  $len = $bb->length;
  $bb3 = $bb->split($b_last);
  
  last if $bb->is_empty();
  $bb->cleanup();
  $bb->destroy();
  









=head1 Description

C<APR::Brigade> allows you to create, manipulate and delete APR bucket
brigades.






=head1 API

C<APR::Brigade> provides the following functions and/or methods:


=head2 C<cleanup>

Empty out an entire bucket brigade:

  $bb->cleanup;

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The brigade to cleanup

=item ret: no return value

=item since: 2.0.00

=back

This method destroys all of the buckets within the bucket brigade's
bucket list.  This is similar to C<L<destroy()|/C_destroy_>>, except
that it does not deregister the brigade's C<L<pool()|/C_pool_>>
cleanup function.

Generally, you should use C<L<destroy()|/C_destroy_>>.  This function
can be useful in situations where you have a single brigade that you
wish to reuse many times by destroying all of the buckets in the
brigade and putting new buckets into it later.









=head2 C<concat>

Concatenate brigade C<$bb2> onto the end of brigade C<$bb1>, leaving
brigade C<$bb2> empty:

  $bb1->concat($bb2);

=over 4

=item obj: C<$bb1>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The brigade to concatenate to.

=item arg1: C<$bb2>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The brigade to concatenate and empty afterwards.

=item ret: no return value

=item since: 2.0.00

=back




=head2 C<destroy>

destroy an entire bucket brigade, includes all of the buckets within
the bucket brigade's bucket list.

  $bb->destroy();

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The bucket brigade to destroy.

=item ret: no return value

=item excpt: C<L<APR::Error|docs::2.0::api::APR::Error>>

=item since: 2.0.00

=back





=head2 C<is_empty>

Test whether the bucket brigade is empty

  $ret = $bb->is_empty();

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item ret: C<$ret> ( boolean )

=item since: 2.0.00

=back








=head2 C<first>

Return the first bucket in a brigade

  $b_first = $bb->first;

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item ret: C<$b_first>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The first bucket in the bucket brigade C<$bb>.

C<undef> is returned if there are no buckets in C<$bb>.

=item since: 2.0.00

=back







=head2 C<flatten>

Get the data from buckets in the bucket brigade as one string

  $len = $bb->flatten($buffer);
  $len = $bb->flatten($buffer, $wanted);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item arg1: C<$buffer> ( SCALAR )

The buffer to fill. All previous data will be lost.

=item opt arg2: C<$wanted> ( number )

If no argument is passed then all data will be returned. If C<$wanted>
is specified -- that number or less bytes will be returned.

=item ret: C<$len> ( number )

How many bytes were actually read.

C<$buffer> gets populated with the string that is read. It will
contain an empty string if there was nothing to read.


=item since: 2.0.00

=item excpt: C<L<APR::Error|docs::2.0::api::APR::Error>>

=back







=head2 C<insert_head>

Insert a list of buckets at the front of a brigade

  $bb->insert_head($b);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

Brigade to insert into

=item arg1: C<$b>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

the bucket to insert. More buckets could be attached to that bucket.

=item ret: no return value

=item since: 2.0.00

=back





=head2 C<insert_tail>

Insert a list of buckets at the end of a brigade

  $bb->insert_tail($b);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

Brigade to insert into

=item arg1: C<$b>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

the bucket to insert. More buckets could be attached to that bucket.

=item ret: no return value

=item since: 2.0.00

=back







=head2 C<last>

Return the last bucket in the brigade

  $b_last = $bb->last;

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item ret: C<$b_last>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The last bucket in the bucket brigade C<$bb>.

C<undef> is returned if there are no buckets in C<$bb>.

=item since: 2.0.00

=back






=head2 C<length>

Return the total length of the data in the brigade (not the number of
buckets)

  $len = $bb->length;

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item ret: C<$len> ( number )

=item since: 2.0.00

=back







=head2 C<new>

  my $nbb = APR::Brigade->new($p, $bucket_alloc);
  my $nbb =          $bb->new($p, $bucket_alloc);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object or class|docs::2.0::api::APR::Brigade>> )

=item arg1: C<$p>
( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )

=item arg2: C<$bucket_alloc>
( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )

=item ret: C<$nbb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

a newly created bucket brigade object

=item since: 2.0.00

=back

Example:

Create a new bucket brigade, using the request object's pool:

  use Apache2::Connection ();
  use Apache2::RequestRec ();
  use APR::Brigade ();
  my $bb = APR::Brigade->new($r->pool, $r->connection->bucket_alloc);






=head2 C<bucket_alloc>

Get the bucket allocator associated with this brigade.

  my $ba = $bb->bucket_alloc();

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object or class|docs::2.0::api::APR::Brigade>> )

=item ret: C<$ba>
( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )

=item since: 2.0.00

=back






=head2 C<next>

Return the next bucket in a brigade

  $b_next = $bb->next($b);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item arg1: C<$b>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The bucket after which the next bucket C<$b_next> is located

=item ret: C<$b_next>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The next bucket after bucket C<$b>.

C<undef> is returned if there is no next bucket (i.e. C<$b> is the
last bucket).

=item since: 2.0.00

=back







=head2 C<pool>

The pool the brigade is associated with.

  $pool = $bb->pool;

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item ret: C<$pool>
( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )

=item since: 2.0.00

=back

The data is not allocated out of the pool, but a cleanup is registered
with this pool.  If the brigade is destroyed by some mechanism other
than pool destruction, the destroying function is responsible for
killing the registered cleanup.








=head2 C<prev>

Return the previous bucket in the brigade

  $b_prev = $bb->prev($b);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

=item arg1: C<$b>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The bucket located after bucket C<$b_prev>

=item ret: C<$b_prev>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The bucket located before bucket C<$b>.

C<undef> is returned if there is no previous bucket (i.e. C<$b> is the
first bucket).

=item since: 2.0.00

=back








=head2 C<split>

Split a bucket brigade into two, such that the given bucket is the
first in the new bucket brigade.

  $bb2 = $bb->split($b);

=over 4

=item obj: C<$bb>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The brigade to split

=item arg1: C<$b>
( C<L<APR::Bucket object|docs::2.0::api::APR::Bucket>> )

The first bucket of the new brigade

=item ret: C<$bb2>
( C<L<APR::Brigade object|docs::2.0::api::APR::Brigade>> )

The new brigade.

=item since: 2.0.00

=back

This function is useful when a filter wants to pass only the initial
part of a brigade to the next filter.

Example:

Create a bucket brigade with three buckets, and split it into two
brigade such that the second brigade will have the last two buckets.

  my $bb1 = APR::Brigade->new($r->pool, $c->bucket_alloc);
  my $ba  = $c->bucket_alloc();
  $bb1->insert_tail(APR::Bucket->new($ba, "1"));
  $bb1->insert_tail(APR::Bucket->new($ba, "2"));
  $bb1->insert_tail(APR::Bucket->new($ba, "3"));

C<$bb1> now contains buckets "1", "2", "3". Now do the split at the
second bucket:

  my $b = $bb1->first; # 1
  $b = $bb1->next($b); # 2
  my $bb2 = $bb1->split($b);

Now C<$bb1> contains bucket "1".  C<$bb2> contains buckets: "2", "3"





=head1 See Also

L<mod_perl 2.0 documentation|docs::2.0::index>.




=head1 Copyright

mod_perl 2.0 and its core modules are copyrighted under
The Apache Software License, Version 2.0.




=head1 Authors

L<The mod_perl development team and numerous
contributors|about::contributors::people>.

=cut