/[wait]/branches/unido/lib/WAIT/Format/CPAN.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /branches/unido/lib/WAIT/Format/CPAN.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (show annotations)
Tue Jul 13 12:22:09 2004 UTC (19 years, 9 months ago) by dpavlin
File size: 998 byte(s)
Changes made by Andreas J. Koenig <andreas.koenig(at)anima.de> for Unido project

1 # -*- Mode: Perl -*-
2 # CPAN.pm --
3 # ITIID : $ITI$ $Header $__Header$
4 # Author : Ulrich Pfeifer
5 # Created On : Wed Sep 18 19:24:55 1996
6 # Last Modified By: Ulrich Pfeifer
7 # Last Modified On: Sun Nov 22 18:44:45 1998
8 # Language : CPerl
9 # Update Count : 19
10 # Status : Unknown, Use with caution!
11 #
12 # Copyright (c) 1996-1997, Ulrich Pfeifer
13 #
14
15 package WAIT::Format::CPAN;
16 require WAIT::Format::HTML;
17 use strict;
18 use vars qw(@ISA);
19
20 @ISA = qw(WAIT::Format::HTML);
21
22 my $CPAN = 'http://ls6-www.informatik.uni-dortmund.de/ir/cgi-bin/CPAN';
23
24 sub as_string {
25 my $self = shift;
26 my ($text, $func) = @_;
27
28 my $result = $self->SUPER::as_string(@_);
29
30 if ($func) {
31 my %rec = &$func();
32 if ($rec{source} and $rec{source} !~ m(^/app/unido)) {
33 my $base = $rec{source}; $base =~ s:.*/::;
34 $result =
35 qq[Contained in: <a href="$CPAN/$rec{source}">$base</a><br>\n]
36 . $result;
37 }
38 }
39 $result;
40 }
41
42 1;

  ViewVC Help
Powered by ViewVC 1.1.26