[svn openjsan.org] [454] Inlined a copy of _INSTANCE, so we don't need a dependency on Params::Util

0 views
Skip to first unread message

ca...@geeknest.com

unread,
Sep 7, 2005, 3:30:13 PM9/7/05
to jsan-...@googlegroups.com
Revision: 454
Author: adam
Date: 2005-09-07 15:30:02 -0400 (Wed, 07 Sep 2005)

Log Message:
-----------
Inlined a copy of _INSTANCE, so we don't need a dependency on Params::Util

Modified Paths:
--------------
perl/JSAN-Client/trunk/Makefile.PL
perl/JSAN-Client/trunk/lib/JSAN/Client.pm
perl/JSAN-Client/trunk/t/07_client.t
Modified: perl/JSAN-Client/trunk/Makefile.PL
===================================================================
--- perl/JSAN-Client/trunk/Makefile.PL 2005-09-07 03:08:39 UTC (rev 453)
+++ perl/JSAN-Client/trunk/Makefile.PL 2005-09-07 19:30:02 UTC (rev 454)
@@ -7,6 +7,7 @@
license ( 'perl' );
requires ( 'perl' => '5.005' );
requires ( 'File::Spec' => '0.80' );
+requires ( 'Scalar::Util' => '1.11' );
requires ( 'File::Path' => '1.06' );
requires ( 'File::HomeDir' => '0.06' );
requires ( 'Config::Tiny' => '2.02' );

Modified: perl/JSAN-Client/trunk/lib/JSAN/Client.pm
===================================================================
--- perl/JSAN-Client/trunk/lib/JSAN/Client.pm 2005-09-07 03:08:39 UTC (rev 453)
+++ perl/JSAN-Client/trunk/lib/JSAN/Client.pm 2005-09-07 19:30:02 UTC (rev 454)
@@ -36,7 +36,6 @@
=cut

use strict;
-use Params::Util '_INSTANCE';
use JSAN::Transport;
use JSAN::Index;

@@ -45,10 +44,15 @@
$VERSION = '0.10';
}

+# Bundled version of Params::Util::_INSTANCE
+sub _INSTANCE ($$) {
+ (Scalar::Util::blessed($_[0]) and $_[0]->isa($_[1])) ? $_[0] : undef;
+}




+
#####################################################################
# Constructor and Accessors


Modified: perl/JSAN-Client/trunk/t/07_client.t
===================================================================
--- perl/JSAN-Client/trunk/t/07_client.t 2005-09-07 03:08:39 UTC (rev 453)
+++ perl/JSAN-Client/trunk/t/07_client.t 2005-09-07 19:30:02 UTC (rev 454)
@@ -15,8 +15,9 @@
}
}

-use Test::More tests => 16;
+use Test::More tests => 17;

+use Scalar::Util ();
use File::Remove ();
use JSAN::Client;

@@ -35,8 +36,12 @@
[ 'JSAN.js' ],
);

+ok( defined &Scalar::Util::blessed, 'Scalar::Util has blessed function' );


+
+
+
#####################################################################
# Test constructor and accessors




Reply all
Reply to author
Forward
0 new messages