File: apidoc.pl

package info (click to toggle)
libglib-perl 3:1.329.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,320 kB
  • sloc: perl: 4,950; ansic: 923; makefile: 7
file content (49 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl -w

$header = shift @ARGV;
$footer = shift @ARGV;
$data   = shift @ARGV;

die "usage: $0 header footer xsfiles...\n"
	unless $data;

# load the data from xsdocparse...  predeclare its vars to keep perl
# happy about "possible typo" warnings.
our ($xspods, $data);
require "./$data";

$/ = undef;

open IN, $header or die "can't open $header: $!\n";
$text = <IN>;
close IN;
print $text;

# just dump all of the xs pods in the order we found them.
foreach my $p (@{ $xspods }) {
	print join("\n", @{ $p->{lines} })."\n\n";
}

open IN, $footer or die "can't open $footer: $!\n";
$text = <IN>;
close IN;
print $text;

__END__

Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
full list)

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Library General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option) any
later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Library General Public License for more
details.

You should have received a copy of the GNU Library General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.