summaryrefslogtreecommitdiff
path: root/libvxi11client/perlbits
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-09 20:48:44 +0900
committerdaniel <danieruru@gmail.com>2013-01-09 20:48:44 +0900
commita150256d6423ab2131a529afd58b496e26b4c716 (patch)
treebab5d37ea16d4e6331071648eb976ec03fbd9ff2 /libvxi11client/perlbits
parent57bec4c29edc96491328c8f60fe76055ab2f4008 (diff)
The perl module sort of works now. Need to fill in all of the meta data, add proper tests etc.
Diffstat (limited to 'libvxi11client/perlbits')
-rw-r--r--libvxi11client/perlbits/Makefile.PL39
-rw-r--r--libvxi11client/perlbits/VXI11-Client.t21
2 files changed, 60 insertions, 0 deletions
diff --git a/libvxi11client/perlbits/Makefile.PL b/libvxi11client/perlbits/Makefile.PL
new file mode 100644
index 0000000..801c91f
--- /dev/null
+++ b/libvxi11client/perlbits/Makefile.PL
@@ -0,0 +1,39 @@
+use 5.014002;
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+ NAME => 'VXI11::Client',
+ VERSION_FROM => 'lib/VXI11/Client.pm', # finds $VERSION
+ PREREQ_PM => {}, # e.g., Module::Name => 1.1
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => 'lib/VXI11/Client.pm', # retrieve abstract from module
+ AUTHOR => 'daniel <daniel@>') : ()),
+ LIBS => [''], # e.g., '-lm'
+ DEFINE => '', # e.g., '-DHAVE_SOMETHING'
+ INC => '-I.', # e.g., '-I. -I/usr/include/other'
+ OBJECT => '$(O_FILES)', # link all the C files too
+);
+if (eval {require ExtUtils::Constant; 1}) {
+ # If you edit these definitions to change the constants used by this module,
+ # you will need to use the generated const-c.inc and const-xs.inc
+ # files to replace their "fallback" counterparts before distributing your
+ # changes.
+ my @names = (qw());
+ ExtUtils::Constant::WriteConstants(
+ NAME => 'VXI11::Client',
+ NAMES => \@names,
+ DEFAULT_TYPE => 'IV',
+ C_FILE => 'const-c.inc',
+ XS_FILE => 'const-xs.inc',
+ );
+
+}
+else {
+ use File::Copy;
+ use File::Spec;
+ foreach my $file ('const-c.inc', 'const-xs.inc') {
+ my $fallback = File::Spec->catfile('fallback', $file);
+ copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
+ }
+}
diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t
new file mode 100644
index 0000000..d156ffb
--- /dev/null
+++ b/libvxi11client/perlbits/VXI11-Client.t
@@ -0,0 +1,21 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl VXI11-Client.t'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+BEGIN { use_ok('VXI11::Client') };
+
+#########################
+
+# Insert your test code below, the Test::More module is use()ed here so read
+# its man page ( perldoc Test::More ) for help writing this test script.
+
+is(&VXI11::Client::vxi11_open("roi", 0), 1);
+is(&VXI11::Client::vxi11_unlock(), 1);
+is(&VXI11::Client::vxi11_close(), 1);