List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:January 11 2008 6:38am
Subject:Rev 409: Shrunk Perl namespace from mysql::cluster::ndbapi back to ndbapi. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 409
revision-id:mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Thu 2008-01-10 22:37:46 -0800
message:
  Shrunk Perl namespace from mysql::cluster::ndbapi back to ndbapi. 
modified:
  perl/Makefile.am               makefile.am-20070228070325-lv4v4ey3018yr147-1
  perl/async.pl                  async.pl-20070323111328-n9taxfigqgv14j06-1
  perl/blob.pl                   blob.pl-20070320103802-1fj4gjsm3kscynqp-1
  perl/mgmapi.i                  mgmapi.i-20070415084702-pjs702i1rleb6otl-1
  perl/mgmapi/Makefile.PL        makefile.pl-20070415084659-wsk1egwac627tea7-2
  perl/ndbapi.i                  ndb.i-20070225155255-5ief7aicto319mbu-1
  perl/ndbapi/Makefile.PL        makefile.pl-20070415084728-1u1ct1xe6fw97w3l-2
  perl/swig/perl_extend_ndbtransaction_async.i
perl_extend_ndbtrans-20070323110355-zppwqruk69m5t3hz-2
  perl/test.pl                  
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-perl5%2ftest.pl
=== modified file 'perl/Makefile.am'
--- a/perl/Makefile.am	2007-12-13 00:07:58 +0000
+++ b/perl/Makefile.am	2008-01-11 06:37:46 +0000
@@ -1,6 +1,7 @@
 PERL_MAKEFILE=Makefile.perl
 
-SWIG_OUTPUTS=lib/mysql/cluster/mgmapi.pm lib/mysql/cluster/ndbapi.pm
+#SWIG_OUTPUTS=lib/mysql/cluster/mgmapi.pm lib/mysql/cluster/ndbapi.pm
+SWIG_OUTPUTS=lib/mgmapi.pm lib/ndbapi.pm
 PERL_CRUFT=pm_to_blib ndbapi.bs ndbapi_wrap.o  mgmapi.bz mgmapi_wrap.o
 PERL_SWIG_SRC=swig/perl_callback_typemap.i swig/perl_extend_ndbtransaction_async.i 
 fakedir=$(prefix)
@@ -12,24 +13,25 @@
 CLEANFILES=$(PERL_CRUFT) ${SWIG_OUTPUTS}
 MAINTAINERCLEANFILES=
 
-SWIG_OPTS=-perl5 $(DEFS) -outdir lib/mysql/cluster -I${top_srcdir} -I$(SWIG_DIR)
-I$(srcdir)/swig $(MYSQL_INCLUDES)
+SWIG_OPTS=-perl5 $(DEFS) -outdir lib -I${top_srcdir} -I$(SWIG_DIR) -I$(srcdir)/swig
$(MYSQL_INCLUDES)
 
-ndbapi/ndbapi_wrap.cpp lib/mysql/cluster/ndbapi.pm: ndbapi.i  $(SWIG_NDB_SOURCES) 
-	mkdir -p lib/mysql/cluster
+#ndbapi/ndbapi_wrap.cpp lib/mysql/cluster/ndbapi.pm: ndbapi.i  $(SWIG_NDB_SOURCES) 
+ndbapi/ndbapi_wrap.cpp lib/ndbapi.pm: ndbapi.i  $(SWIG_NDB_SOURCES) 
+	mkdir -p lib #/mysql/cluster
 	$(SWIG) $(SWIG_OPTS) -o ndbapi/ndbapi_wrap.cpp ndbapi.i
 
-mgmapi/mgmapi_wrap.cpp lib/mysql/cluster/mgmapi.pm: mgmapi.i  $(SWIG_MGM_SOURCES) 
-	mkdir -p lib/mysql/cluster
+mgmapi/mgmapi_wrap.cpp lib/mgmapi.pm: mgmapi.i  $(SWIG_MGM_SOURCES) 
+	mkdir -p lib #/mysql/cluster
 	$(SWIG) $(SWIG_OPTS) -o mgmapi/mgmapi_wrap.cpp mgmapi.i
 
-$(PERL_MAKEFILE): $(srcdir)/Makefile.PL ndbapi/ndbapi_wrap.cpp mgmapi/mgmapi_wrap.cpp
lib/mysql/cluster/ndbapi.pm lib/mysql/cluster/mgmapi.pm $(srcdir)/Makefile.am
+$(PERL_MAKEFILE): $(srcdir)/Makefile.PL ndbapi/ndbapi_wrap.cpp mgmapi/mgmapi_wrap.cpp
lib/ndbapi.pm lib/mgmapi.pm $(srcdir)/Makefile.am
 	echo "$(DEB_MAKE_PL_OPT) should be INSTALLDIRS=vendor"
-	CFLAGS="-I../.. -I../../mgmpp $(CPPFLAGS) $(CFLAGS) $(MYSQL_INCLUDES)"
LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(LIBS)" $(PERL) $(srcdir)/Makefile.PL $(MAKE_PL_OPTS)
$(DEB_MAKE_PL_OPT)
+	CFLAGS="-I../.. -I../../mgmpp $(CPPFLAGS) $(CFLAGS) $(MYSQL_INCLUDES)"
LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(LIBS)" $(PERL) $(srcdir)/Makefile.PL $(MAKE_PL_OPTS)
$(DEB_MAKE_PL_OPT) PREFIX="${prefix}"
 	
 -perl install-perl: $(PERL_MAKEFILE)
 	@target=`echo $@ | sed -e 's/-perl//'`; \
 	echo $(MAKE) -f $(PERL_MAKEFILE) $$target; \
-	DESTDIR=$(DESTDIR) $(MAKE) $(AM_MAKEFLAGS) -f $(PERL_MAKEFILE) $$target 
PREFIX="${PREFIX}"
+	DESTDIR=$(DESTDIR) $(MAKE) $(AM_MAKEFLAGS) -f $(PERL_MAKEFILE) $$target 
PREFIX="${prefix}"
 
 test-perl: $(PERL_MAKEFILE)
 	$(RUN)$(MAKE) -f $(PERL_MAKEFILE) test

=== modified file 'perl/async.pl'
--- a/perl/async.pl	2007-05-07 08:01:13 +0000
+++ b/perl/async.pl	2008-01-11 06:37:46 +0000
@@ -19,7 +19,7 @@
 use lib 'blib/arch';
 use lib 'blib';
 use lib 'blib/lib';
-use mysql::cluster::ndbapi;
+use ndbapi;
 use DBI;
 use POSIX qw( ceil floor );
 use Time::HiRes qw( gettimeofday tv_interval sleep );
@@ -53,7 +53,7 @@
 
 print "connecting to cluster\n";
 
-$connection = mysql::cluster::ndbapi::NdbFactory::createNdbClusterConnection();
+$connection = ndbapi::NdbFactory::createNdbClusterConnection();
 
 
 if ($connection->connect(5,3,1)) {

=== modified file 'perl/blob.pl'
--- a/perl/blob.pl	2007-04-15 08:50:19 +0000
+++ b/perl/blob.pl	2008-01-11 06:37:46 +0000
@@ -20,7 +20,7 @@
 use lib 'blib';
 use lib 'blib/lib';
 
-use mysql::cluster::ndbapi;
+use ndbapi;
 use DBI;
 use POSIX qw( ceil floor );
 use Time::HiRes qw( gettimeofday tv_interval );
@@ -55,7 +55,7 @@
 
 print "connecting to cluster\n";
 
-$connection = new mysql::cluster::ndbapi::Ndb_cluster_connection();
+$connection = new ndbapi::Ndb_cluster_connection();
 
 
 if ($connection->connect(5,3,1)) {
@@ -70,7 +70,7 @@
     exit -1;
 } else { print "cluster ready\n"; }
 
-$myNdb = new mysql::cluster::ndbapi::Ndb($connection,"test_db_1");
+$myNdb = new ndbapi::Ndb($connection,"test_db_1");
 
 
 if ($myNdb->init(4) == -1) {

=== modified file 'perl/mgmapi.i'
--- a/perl/mgmapi.i	2007-11-26 03:09:58 +0000
+++ b/perl/mgmapi.i	2008-01-11 06:37:46 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-%module "mysql::cluster::mgmapi"
+%module "mgmapi"
 
 %include "mgmapi/mgmglobals.i"
 %{

=== modified file 'perl/mgmapi/Makefile.PL'
--- a/perl/mgmapi/Makefile.PL	2007-11-06 22:59:00 +0000
+++ b/perl/mgmapi/Makefile.PL	2008-01-11 06:37:46 +0000
@@ -7,7 +7,7 @@
 
 
 WriteMakefile(
-    'NAME'	=> "mysql::cluster::mgmapi",
+    'NAME'	=> "mgmapi",
     'AUTHOR'    => 'Monty Taylor <mtaylor@stripped>',
     'ABSTRACT'  => "NDB/Perl",
 

=== modified file 'perl/ndbapi.i'
--- a/perl/ndbapi.i	2007-11-06 22:59:00 +0000
+++ b/perl/ndbapi.i	2008-01-11 06:37:46 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-%module "mysql::cluster::ndbapi"
+%module "ndbapi"
 
 %include "ndbapi/ndbglobals.i"
 %{
@@ -35,9 +35,9 @@
 %{
    sub createNdb {
         my $self=$_[0];
-        my $ndb=mysql::cluster::ndbapic::NdbClusterConnection_createNdb(@_);
+        my $ndb=ndbapic::NdbClusterConnection_createNdb(@_);
         my $t=tied(%{$ndb});
-        $mysql::cluster::ndbapi::ndb_connectors_owned{$t}=$self;
+        $ndbapi::ndb_connectors_owned{$t}=$self;
         return $ndb;
     } 
 %}

=== modified file 'perl/ndbapi/Makefile.PL'
--- a/perl/ndbapi/Makefile.PL	2007-11-06 22:59:00 +0000
+++ b/perl/ndbapi/Makefile.PL	2008-01-11 06:37:46 +0000
@@ -7,7 +7,7 @@
 
 
 WriteMakefile(
-    'NAME'	=> "mysql::cluster::ndbapi",
+    'NAME'	=> "ndbapi",
     'AUTHOR'    => 'Monty Taylor <mtaylor@stripped>',
     'ABSTRACT'  => "NDB/Perl",
 

=== modified file 'perl/swig/perl_extend_ndbtransaction_async.i'
--- a/perl/swig/perl_extend_ndbtransaction_async.i	2007-11-05 18:12:57 +0000
+++ b/perl/swig/perl_extend_ndbtransaction_async.i	2008-01-11 06:37:46 +0000
@@ -11,7 +11,7 @@
         my $abort=shift; 
 
 
-mysql::cluster::ndbapic::NdbTransaction_executeAsynchPrepare($self, $exec,
+ndbapic::NdbTransaction_executeAsynchPrepare($self, $exec,
             sub { $sub->(); $self; }, $abort);
     }
 %} 

=== modified file 'perl/test.pl'
--- a/perl/test.pl	2007-07-26 00:26:33 +0000
+++ b/perl/test.pl	2008-01-11 06:37:46 +0000
@@ -20,7 +20,7 @@
 use lib 'blib';
 use lib 'blib/lib';
 
-use mysql::cluster::ndbapi;
+use ndbapi;
 use DBI;
 use POSIX qw( ceil floor );
 use Time::HiRes qw( gettimeofday tv_interval );
@@ -52,7 +52,7 @@
 
 print "connecting to cluster\n";
 
-$connection = mysql::cluster::ndbapi::NdbFactory::createNdbClusterConnection();
+$connection = ndbapi::NdbFactory::createNdbClusterConnection();
 
 
 if ($connection->connect(1,1,1)) {
@@ -104,7 +104,7 @@
 
     }
 
-    my $ret = $myTransaction->execute($mysql::cluster::ndbapi::Commit);
+    my $ret = $myTransaction->execute($ndbapi::Commit);
 
     if ($ret == -1) {
       print $myTransaction->getNdbError()->getMessage(), "\n";
@@ -131,7 +131,7 @@
 
 print $myTransaction->getNdbError()->getMessage() unless $myScanOperation;
 
-if
($myScanOperation->readTuples($mysql::cluster::ndbapi::NdbOperation::LM_CommittedRead))
{
+if ($myScanOperation->readTuples($ndbapi::NdbOperation::LM_CommittedRead)) {
   print $myScanOperation->getNdbError()->getMessage();
 }
 
@@ -139,7 +139,7 @@
 
 my $myRecAttr=$myScanOperation->getValue("ATTR1");
 
-$myTransaction->execute($mysql::cluster::ndbapi::NoCommit);
+$myTransaction->execute($ndbapi::NoCommit);
 
 while ($myScanOperation->nextResult() == 0) {
   
@@ -171,7 +171,7 @@
       my $myRecAttr = $myOper->getValue("ATTR2");
 
      
-      $myTransaction->execute( $mysql::cluster::ndbapi::Commit );
+      $myTransaction->execute( $ndbapi::Commit );
 
       $foo=$myRecAttr->getUint32();
 

Thread
Rev 409: Shrunk Perl namespace from mysql::cluster::ndbapi back to ndbapi. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor11 Jan