Skip to content

Commit f6098c8

Browse files
author
Martijn van Beers
committedAug 19, 2008
- add instructions on how to mirror 00whois.xml
- make the tests work again. need to check for different output depending on whether 00whois.xml is mirrored or not.
1 parent 45f98c1 commit f6098c8

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed
 

‎bin/minicpan_webserver

+10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ copy of CPAN using minicpan. Then you may run minicpan_webserver and
3030
search and browse Mini CPAN at http://localhost:2963/. The listening
3131
port can be configured with C<--port> command line option.
3232

33+
=head1 MINICPAN CONFIGURATION
34+
35+
CPAN::Mini::Webserver can optionally return the real names of authors
36+
instead of an ascii representation of them. This depends on the file
37+
'authors/00whois.xml' being mirrored from CPAN. CPAN::Mini doesn't do
38+
this by default. You can tell it to mirror this file by putting the
39+
following line in your .minicpanrc:
40+
41+
also_mirror: authors/00whois.xml
42+
3343
=head1 AUTHOR
3444

3545
Leon Brocard <acme@astray.com>

‎t/simple.t

+12-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ use WebserverTester;
1111

1212
use CPAN::Mini::Webserver;
1313

14+
my $name;
1415
eval {
1516
my $server = CPAN::Mini::Webserver->new(2963);
1617
$server->after_setup_listener;
18+
if ($server->author_type eq 'Whois') {
19+
$name = 'Léon Brocard';
20+
} else {
21+
$name = 'Leon Brocard';
22+
}
1723
};
1824

1925
if ( $@ =~ /Please set up minicpan/ ) {
@@ -34,30 +40,30 @@ like( $html, qr/Welcome to CPAN::Mini::Webserver/ );
3440
$html = html_page_ok('/search/', q => "buffy");
3541
like( $html, qr/Search for .buffy./ );
3642
like( $html, qr/Acme-Buffy-1.5/ );
37-
like( $html, qr/Léon Brocard/ );
43+
like( $html, qr/$name/ );
3844

3945
# show Leon
4046
$html = html_page_ok('~lbrocard/', 'q' => undef );
41-
like( $html, qr/Léon Brocard/ );
47+
like( $html, qr/$name/ );
4248
like( $html, qr/Acme-Buffy-1.5/ );
4349
like( $html, qr/Tie-GHash-0.12/ );
4450

4551
# Show Acme-Buffy-1.5
4652
$html = html_page_ok('~lbrocard/Acme-Buffy-1.5/');
47-
like( $html, qr/Léon Brocard &gt; Acme-Buffy-1.5/ );
53+
like( $html, qr/$name &gt; Acme-Buffy-1.5/ );
4854
like( $html, qr/CHANGES/ );
4955
like( $html, qr/demo_buffy\.pl/ );
5056

5157
# Show Acme-Buffy-1.5 CHANGES
5258
$html = html_page_ok('~lbrocard/Acme-Buffy-1.5/Acme-Buffy-1.5/CHANGES');
5359
like( $html,
54-
qr{Léon Brocard &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/CHANGES} );
60+
qr{$name &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/CHANGES} );
5561
like( $html, qr/Revision history for Perl extension Buffy/ );
5662

5763
# Show Acme-Buffy-1.5 CHANGES Buffy.pm
5864
$html = html_page_ok('~lbrocard/Acme-Buffy-1.5/Acme-Buffy-1.5/lib/Acme/Buffy.pm');
5965
like( $html,
60-
qr{Léon Brocard &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/lib/Acme/Buffy.pm}
66+
qr{$name &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/lib/Acme/Buffy.pm}
6167
);
6268
like( $html, qr{An encoding scheme for Buffy the Vampire Slayer fans} );
6369
like( $html, qr{See raw file} );
@@ -66,7 +72,7 @@ like( $html, qr{See raw file} );
6672
$html = html_page_ok(
6773
'/raw/~lbrocard/Acme-Buffy-1.5/Acme-Buffy-1.5/lib/Acme/Buffy.pm');
6874
like( $html,
69-
qr{Léon Brocard &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/lib/Acme/Buffy.pm}
75+
qr{$name &gt; Acme-Buffy-1.5 &gt; Acme-Buffy-1.5/lib/Acme/Buffy.pm}
7076
);
7177
like( $html, qr{An encoding scheme for Buffy the Vampire Slayer fans} );
7278

0 commit comments

Comments
 (0)
Please sign in to comment.