File: gen_pod_authors

package info (click to toggle)
libdbix-class-perl 0.082844-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,320 kB
  • sloc: perl: 27,215; sql: 322; sh: 29; makefile: 16
file content (27 lines) | stat: -rwxr-xr-x 629 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env perl

use warnings;
use strict;

# we will be outputting *ENCODED* utf8, hence the raw open below
# the file is already sanity-checked by xt/authors.t
my @known_authors = do {
  open (my $fh, '<:raw', 'AUTHORS') or die "Unable to open AUTHORS - can't happen: $!\n";
  map { chomp; ( ( ! $_ or $_ =~ /^\s*\#/ ) ? () : $_ ) } <$fh>;
} or die "Known AUTHORS file seems empty... can't happen...";

$_ =~ s!^ ( [^\:]+ ) : \s !B<$1>: !x
  for @known_authors;

$_ =~ s!( \b https? :// [^\s\>]+ )!L<$1|$1>!x
  for @known_authors;

print join "\n\n",
  '=encoding utf8',
  '=over',
  @known_authors,
  '=back',
  '',
;

1;