Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2003 15:09:26 +0200 (CEST)
From:      Alexander Haderer <alexander.haderer@charite.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/57151: Port lang/perl5.8: use.perl fails to modify perldoc
Message-ID:  <200309221309.h8MD9Qul056446@ogava.str.charite.de>
Resent-Message-ID: <200309240940.h8O9e8Ga029847@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         57151
>Category:       ports
>Synopsis:       Port lang/perl5.8: use.perl fails to modify perldoc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 24 02:40:08 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Haderer
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Charite Hospital Berlin - Germany
>Environment:
System: FreeBSD ogava.str.charite.de 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Tue May 13 20:42:13 CEST 2003 root@ogava.str.charite.de:/usr/src/sys/compile/OGAVAD i386


>Description:
The utility /usr/loca/bin/use.perl to switch between system's perl and the
perl installed from the ports does not change the perl utilities perlcc,
perlbug, and perldoc. At least for perldoc this leads into trouble when
system's perldoc tries to display the perl5.8 pod docs (probably the
pod format has changed in perl5.8). 

Some of the pod-'Meta' Codes fail to display correctly, especially the 
'perl references' sections are displayed wrong!

>How-To-Repeat:
- install perl 5.8 from the ports
- do 'use.perl port'
- call perlreftut docs:
    'perldoc perlreftut'
    move to 'Use Rule 2', the line below reads:

    ${$aref}[3] is too hard to read, so you can write < $aref-[3] >> instead.

- compare this with:
    '/usr/local/bin/perldoc perlreftut'
    move to 'Use Rule 2', the line below reads:

    "${$aref}[3]" is too hard to read, so you can write "$aref->[3]" instead.

>Fix:

The patch below modifies use.perl in this way, that perlcc, perlbug and perldoc
are changed as well when switching forth and back between system's perl and
port's perl.

------------------------- cut here ---------------------------------------
--- /usr/local/bin/use.perl.orig	Mon Sep 22 13:20:13 2003
+++ /usr/local/bin/use.perl	Mon Sep 22 14:46:05 2003
@@ -2,8 +2,6 @@
 # $FreeBSD: ports/lang/perl5.8/files/use.perl,v 1.6 2002/07/21 17:09:12 tobez Exp $
 use strict;
 
-# XXX what to do with perldoc, pelbug, perlcc ??
-
 sub usage
 {
 	print STDERR <<EOF;
@@ -43,6 +41,19 @@
 		link '/usr/bin/perl5', '/usr/bin/perl';
 		link '/usr/bin/perl5', '/usr/bin/perl5.8.0';
 
+		if( -e '/usr/bin/perlbug-system') {
+			unlink '/usr/bin/perlbug';
+			rename '/usr/bin/perlbug-system', '/usr/bin/perlbug';
+		}
+		if( -e '/usr/bin/perlcc-system') {
+			unlink '/usr/bin/perlcc';
+			rename '/usr/bin/perlcc-system', '/usr/bin/perlcc';
+		}
+		if( -e '/usr/bin/perldoc-system') {
+			unlink '/usr/bin/perldoc';
+			rename '/usr/bin/perldoc-system', '/usr/bin/perldoc';
+		}
+
 		if ($ident =~ m#src/usr.bin/perl/perl.c#) {
 			link '/usr/bin/perl5', '/usr/bin/suidperl';
 		} else {
@@ -92,6 +103,19 @@
 		symlink '/usr/local/bin/perl', '/usr/bin/perl';
 		symlink '/usr/local/bin/suidperl', '/usr/bin/suidperl';
 		symlink '/usr/local/bin/perl', '/usr/bin/perl5.8.0';
+
+		if( ! -e '/usr/bin/perlbug-system' ) {
+			rename '/usr/bin/perlbug', '/usr/bin/perlbug-system';
+			symlink '/usr/local/bin/perlbug', '/usr/bin/perlbug';
+		}
+		if( ! -e '/usr/bin/perlcc-system' ) {
+			rename '/usr/bin/perlcc', '/usr/bin/perlcc-system';
+			symlink '/usr/local/bin/perlcc', '/usr/bin/perlcc';
+		}
+		if( ! -e '/usr/bin/perldoc-system' ) {
+			rename '/usr/bin/perldoc', '/usr/bin/perldoc-system';
+			symlink '/usr/local/bin/perldoc', '/usr/bin/perldoc';
+		}
 	}
 
 	open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309221309.h8MD9Qul056446>