[Rd] Rd2dvi (PR#9812)

ripley at stats.ox.ac.uk
Fri, 27 Jul 2007 11:30:59 -0000

It seems this feature was introduced in Perl 5.6.1, but that is older than
Solaris 9 (which was first released 9/02 according to www.sun.com).

We need to know what version of Perl this was.


On Thu, 26 Jul 2007, Bill Dunlap wrote:

> On Thu, 26 Jul 2007 larryh at zebra.us.udel.edu wrote:
>
>> Is this a bug--
>>
>>
-------------------------------------------------------------------------------
>> <234>% R CMD Rd2dvi base.Rd
>> Converting Rd files to LaTeX ...
>> base.Rd
>> Can't use an undefined value as filehandle reference at
>> /opt/R-2.5.1/lib/R/share/perl/R/Rdconv.pm line 78.
>
> This may be due to a change I suggested a while back which
> required perl 5.6 (or so) to work.  The change was to ensure
> that the file handle rdfile was closed when Rdconv was done
> with it.  If this is the problem, upgrading perl to 5.8 will
> make it go away.  Rdconv.pm should have a 'use v5.6' (or 5.8?)
> line at the top if it wants to continue to use this syntax.
>
> <     open(rdfile, "<$Rdname") or die "Rdconv():
Couldn't open '$Rdfile': $!\n";
> <
> ---
>>     open(my $rdfile, "<$Rdname") or die "Rdconv():
Couldn't open '$Rdfile': $!\n";
>>     # Before we added the 'my $' in front of rdfile,
>>     # rdfile was not getting closed.   Now it will close
>>     # when $rdfile goes out of scope.  (We could have added
>>     # a close rdfile at the end of the while(<rdfile>), but
>>     # scoping method is more reliable.
> 123c127
> <     while(<rdfile>){
> ---
>>     while(<$rdfile>){
>
>
----------------------------------------------------------------------------
> Bill Dunlap
> Insightful Corporation
> bill at insightful dot com
> 360-428-8146
>
> "All statements in this message represent the opinions of the author
and do
> not necessarily reflect Insightful Corporation policy or position."
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595