Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix parameter validaton

  • Loading branch information...
commit 26b6aa95c0ac0523ed31c7ebf6591c681096898b 1 parent 4f6eed2
@matiu authored
Showing with 19 additions and 8 deletions.
  1. +9 −6 Makefile
  2. +3 −0  Makefile.PL
  3. +1 −0  etc/ctags
  4. +6 −2 lib/SQL/Bibliosoph.pm
View
15 Makefile
@@ -12,6 +12,7 @@
# ABSTRACT => q[A SQL Query library]
# AUTHOR => q[Matias Alejo Garcia ( matiu@cpan.org ) ]
+# MIN_PERL_VERSION => q[5.010000]
# NAME => q[SQL::Bibliosoph]
# PREREQ_PM => { Package::Constants=>undef, DBD::Mock=>undef, Tie::Hash::Random=>q[1], Time::HiRes=>undef, Carp=>undef, Test::More=>q[0.88], DBD::mysql=>q[4.004], Devel::Cover=>undef, DBI=>q[1.5], Tie::Array::Random=>q[1], Moose=>q[0.82] }
# VERSION_FROM => q[lib/SQL/Bibliosoph.pm]
@@ -53,11 +54,11 @@ DIRFILESEP = /
DFSEP = $(DIRFILESEP)
NAME = SQL::Bibliosoph
NAME_SYM = SQL_Bibliosoph
-VERSION = 2.02
+VERSION = 2.04
VERSION_MACRO = VERSION
-VERSION_SYM = 2_02
+VERSION_SYM = 2_04
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
-XS_VERSION = 2.02
+XS_VERSION = 2.04
XS_VERSION_MACRO = XS_VERSION
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
INST_ARCHLIB = blib/arch
@@ -263,7 +264,7 @@ RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
DIST_CP = best
DIST_DEFAULT = tardist
DISTNAME = SQL-Bibliosoph
-DISTVNAME = SQL-Bibliosoph-2.02
+DISTVNAME = SQL-Bibliosoph-2.04
# --- MakeMaker macro section:
@@ -490,7 +491,7 @@ metafile : create_distdir
$(NOECHO) $(ECHO) Generating META.yml
$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
$(NOECHO) $(ECHO) 'name: SQL-Bibliosoph' >> META_new.yml
- $(NOECHO) $(ECHO) 'version: 2.02' >> META_new.yml
+ $(NOECHO) $(ECHO) 'version: 2.04' >> META_new.yml
$(NOECHO) $(ECHO) 'abstract: A SQL Query library' >> META_new.yml
$(NOECHO) $(ECHO) 'author:' >> META_new.yml
$(NOECHO) $(ECHO) ' - Matias Alejo Garcia ( matiu@cpan.org ) ' >> META_new.yml
@@ -508,6 +509,7 @@ metafile : create_distdir
$(NOECHO) $(ECHO) ' Devel::Cover: ~' >> META_new.yml
$(NOECHO) $(ECHO) ' Moose: 0.82' >> META_new.yml
$(NOECHO) $(ECHO) ' Package::Constants: ~' >> META_new.yml
+ $(NOECHO) $(ECHO) ' perl: 5.010000' >> META_new.yml
$(NOECHO) $(ECHO) ' Test::More: 0.88' >> META_new.yml
$(NOECHO) $(ECHO) ' Tie::Array::Random: 1' >> META_new.yml
$(NOECHO) $(ECHO) ' Tie::Hash::Random: 1' >> META_new.yml
@@ -810,10 +812,11 @@ testdb_static :: testdb_dynamic
# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
ppd :
- $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="2.02">' > $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="2.04">' > $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ABSTRACT>A SQL Query library</ABSTRACT>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <AUTHOR>Matias Alejo Garcia ( matiu@cpan.org ) </AUTHOR>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <PERLCORE VERSION="5,010000,0,0" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <REQUIRE NAME="Carp::" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <REQUIRE NAME="DBD::Mock" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <REQUIRE NAME="DBD::mysql" VERSION="4.004" />' >> $(DISTNAME).ppd
View
3  Makefile.PL
@@ -1,5 +1,7 @@
use ExtUtils::MakeMaker;
+use 5.10.0;
+
WriteMakefile(
NAME => 'SQL::Bibliosoph',
VERSION_FROM => 'lib/SQL/Bibliosoph.pm',
@@ -18,5 +20,6 @@ WriteMakefile(
'Package::Constants'=> undef,
'Devel::Cover' => undef,
},
+ MIN_PERL_VERSION => '5.10.0',
);
View
1  etc/ctags
@@ -3,6 +3,7 @@
--exclude=blib
--exclude=buildp
--exclude=OBSOLETE
+--exclude=OLD
--langdef=sql_bibliosoph
--langdef=html_template
--langdef=perl2
View
8 lib/SQL/Bibliosoph.pm
@@ -6,14 +6,14 @@ package SQL::Bibliosoph; {
use SQL::Bibliosoph::Query;
use SQL::Bibliosoph::CatalogFile;
- our $VERSION = "2.03";
+ our $VERSION = "2.05";
has 'dbh' => ( is => 'ro', isa => 'DBI::db', required=> 1);
has 'catalog' => ( is => 'ro', isa => 'ArrayRef', default => sub { return [] } );
has 'catalog_str'=>( is => 'ro', isa => 'Str');
- has 'constants_from' =>( is => 'ro', isa => 'Str');
+ has 'constants_from' =>( is => 'ro', isa => 'Maybe[Str]');
has 'delayed' => ( is => 'ro', isa => 'Bool', default=> 0);
has 'debug' => ( is => 'ro', isa => 'Bool', default=> 0);
@@ -394,6 +394,10 @@ SQL::Bibliosoph - A SQL Statements Library
my $last_insert_id = $bs->insert_person($name,$age);
+ # Usefull when no primary key is defined
+ my ($dummy_last_insert_id, $total_inserted) = $bs->insert_person($name,$age);
+
+
# Updating some rows
# Query:
Please sign in to comment.
Something went wrong with that request. Please try again.