Subject: | [patch] 5.005 compatibility |
This patch allows JSON to work on 5.005. Tested on FreeBSD 4.11-STABLE, perl 5.005_03.
(This is a customer box; thankfully my systems and the majority of those I work with aren't quite this old.)
--- HTTP.pm.orig Thu Nov 17 23:24:37 2005
+++ HTTP.pm Thu Nov 17 23:20:10 2005
@@ -1,6 +1,7 @@
package JSONRPC::Transport::HTTP;
use strict;
+use JSONRPC;
use base qw(JSONRPC);
use vars qw($VERSION);
@@ -235,7 +236,7 @@
my %opt = @_;
my $d = $self->{_daemon} ||= $self->{_daemon_pkg}->new(@_) or die;
- $self->charset = $opt{charset} if($opt{charset});
+ $self->charset($opt{charset}) if $opt{charset};
while (my $c = $d->accept) {
$self->{con} = $c;
--- HTTP.pm.orig Thu Nov 17 23:24:37 2005
+++ HTTP.pm Thu Nov 17 23:20:10 2005
@@ -1,6 +1,7 @@
package JSONRPC::Transport::HTTP;
use strict;
+use JSONRPC;
use base qw(JSONRPC);
use vars qw($VERSION);
@@ -235,7 +236,7 @@
my %opt = @_;
my $d = $self->{_daemon} ||= $self->{_daemon_pkg}->new(@_) or die;
- $self->charset = $opt{charset} if($opt{charset});
+ $self->charset($opt{charset}) if $opt{charset};
while (my $c = $d->accept) {
$self->{con} = $c;