Diff for /loncom/homework/lonr.pm between versions 1.9 and 1.11

version 1.9, 2009/08/14 01:58:52 version 1.11, 2014/11/19 21:14:47
Line 33  use IO::Socket; Line 33  use IO::Socket;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::response();  use Apache::response();
 use LONCAPA;  use LONCAPA;
   use Tie::IxHash::Easy; # autoties all subhashes to keep index order
 ### You need to install the libraries below for this to work!  use Data::Dumper;  # used to output hash contents
   
 ###use Tie::IxHash::Easy; # autoties all subhashes to keep index order  
 ###use Data::Dumper;  # used to output hash contents  
   
 my $errormsg='';  my $errormsg='';
   
Line 56  sub Rcroak { Line 53  sub Rcroak {
 #  #
 sub Rpeel {  sub Rpeel {
         my $x = $_[0];  # the string containing the serialized R object(s)          my $x = $_[0];  # the string containing the serialized R object(s)
         if ($x =~ /^((?:i|d):(.+?);)(.*)$/) {          if ($x =~ /^N\;(.*)$/) {
               return ('',$1);
           } elsif ($x =~ /^((?:i|d):(.+?);)(.*)$/) {
                 return ($1, $+);  # x starts with a number                  return ($1, $+);  # x starts with a number
         } elsif ($x =~ /^s:(\d+):/) {          } elsif ($x =~ /^s:(\d+):/) {
                 my $n = $1;  # x starts with a string of length n                  my $n = $1;  # x starts with a string of length n
Line 150  sub Rreturn { Line 149  sub Rreturn {
         }          }
         if ($errormsg) { return $errormsg; }          if ($errormsg) { return $errormsg; }
         return \%h;  # return a reference to the hash          return \%h;  # return a reference to the hash
       } elsif ($x eq '') {
           return '';
     } else {      } else {
         return 'Unrecognized output';          return 'Unrecognized output';
     }      }

Removed from v.1.9  
changed lines
  Added in v.1.11


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>