Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial.

  • Loading branch information...
commit 688b6d0ed4e8b8864d41d976b982fcf0e1804678 0 parents
tobez authored
10 .cvsignore
@@ -0,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+DBIx-Perlish-*
+cover_db
15 Changes
@@ -0,0 +1,15 @@
+Revision history for DBIx-Perlish
+
+0.03 Thu Feb 1 13:08:29 2007
+ More docs.
+ Introduce $SQL & @BIND_VALUES globals (for debugging).
+
+0.02 Thu Feb 1 10:06:49 2007
+ Binary comparison operators work.
+ Four binary arithmetic operators work.
+ last unless 5..20 works.
+ First cut at working db_fetch {}.
+
+0.01 Fri Jan 26 14:54:23 2007
+ Initial release.
+
22 MANIFEST
@@ -0,0 +1,22 @@
+Changes
+inc/Module/Install.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/DBIx/Perlish.pm
+lib/DBIx/Perlish/Parse.pm
+Makefile.PL
+MANIFEST
+META.yml
+README
+t/00.load.t
+t/01.gen_sql-simple.t
+t/02.single-comparisons.t
+t/03.simple-closures.t
+t/pod-coverage.t
+t/pod.t
+t/test_utils.pm
12 MANIFEST.SKIP
@@ -0,0 +1,12 @@
+^_build
+^Build$
+^blib
+~$
+\.bak$
+^MANIFEST\.SKIP$
+CVS
+^devel/tt$
+^tags$
+^Makefile$
+^.cvsignore$
+pm_to_blib
20 META.yml
@@ -0,0 +1,20 @@
+---
+name: DBIx-Perlish
+version: 0.03
+author:
+ - 'Anton Berezin <tobez@tobez.org>'
+abstract: a perlish interface to SQL databases
+license: bsd
+requires:
+ Test::More: 0
+ version: 0
+provides:
+ DBIx::Perlish:
+ file: lib/DBIx/Perlish.pm
+ version: 0.03
+ DBIx::Perlish::Parse:
+ file: lib/DBIx/Perlish/Parse.pm
+generated_by: hand
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
10 Makefile.PL
@@ -0,0 +1,10 @@
+use inc::Module::Install;
+
+name 'DBIx-Perlish';
+all_from 'lib/DBIx/Perlish.pm';
+
+build_requires 'Test::More' => '0.42';
+
+no_index directory => 'devel';
+
+WriteAll;
70 README
@@ -0,0 +1,70 @@
+DBIx-Perlish version 0.0.1
+
+[ REPLACE THIS...
+
+ The README is used to introduce the module and provide instructions on
+ how to install the module, any machine dependencies it may have (for
+ example C compilers and installed libraries) and any other information
+ that should be understood before the module is installed.
+
+ A README file is required for CPAN modules since CPAN extracts the
+ README file from a module distribution so that people browsing the
+ archive can use it get an idea of the modules uses. It is usually a
+ good idea to provide version information here so that people can
+ decide whether fixes for the module are worth downloading.
+]
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+
+Alternatively, to install with Module::Build, you can use the following commands:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+
+
+DEPENDENCIES
+
+None.
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2007, Anton Berezin
+
+The software known as DBIx::Perlish is distributed under the following
+terms:
+
+Copyright (C) 2007 Anton Berezin. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
15 devel/db
@@ -0,0 +1,15 @@
+#! /usr/bin/perl
+use lib qw(lib);
+use DBI;
+use DBIx::Perlish;
+
+my $dbh = DBI->connect("dbi:SQLite:");
+$dbh->do("create table tbl (id int, name text)");
+$dbh->do("insert into tbl values (1,'hello')");
+$dbh->do("insert into tbl values (2,'fefe')");
+$dbh->do("insert into tbl values (42,'LIFF')");
+
+my $x = 2;
+my $r = db_fetch { tbl->id / $x - 1 == 20 };
+print "$DBIx::Perlish::SQL\n";
+print "$r->{name}\n";
33 devel/tt
@@ -0,0 +1,33 @@
+#! /usr/bin/perl
+use strict;
+use warnings;
+use lib qw(lib);
+use DBIx::Perlish;
+$DBIx::Perlish::Parse::DEVEL = 1;
+
+sub s1 {
+ my $x : product_tree;
+ $x->circuit_number =~ /^FB-/;
+ $x->id == product_eda_adsl->id;
+};
+
+my $val = "god";
+sub s2 {
+ users->type eq $val,
+ users->id == superusers->user_id;
+};
+
+my $from = 0; my $to = 30;
+sub s3 {
+ my $x : users;
+ last unless $from..$to;
+};
+
+sub s4 {
+ users->id / 2 == 21;
+}
+
+my ($sql, $v) = DBIx::Perlish::gen_sql(\&s3, "select");
+print "$sql\n";
+print "values: ", join ", ", @$v;
+print "\n";
30 tags
@@ -0,0 +1,30 @@
+!_TAG_FILE_FORMAT 2 /extended format/
+!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted/
+!_TAG_PROGRAM_AUTHOR Michael Schaap /mscha@mscha.com/
+!_TAG_PROGRAM_NAME pltags //
+!_TAG_PROGRAM_VERSION 2.21 /supports multiple tags and extended format/
+Parse lib/DBIx/Perlish/Parse.pm /^package DBIx::Perlish::Parse;$/;" p class:Parse
+Perlish lib/DBIx/Perlish.pm /^package DBIx::Perlish;$/;" p class:Perlish
+db_fetch lib/DBIx/Perlish.pm /^sub db_fetch (&)$/;" s class:Perlish
+gen_is lib/DBIx/Perlish/Parse.pm /^sub gen_is$/;" s class:Parse
+gen_sql lib/DBIx/Perlish.pm /^sub gen_sql$/;" s class:Perlish
+gen_want lib/DBIx/Perlish/Parse.pm /^sub gen_want$/;" s class:Parse
+get_all_children lib/DBIx/Perlish/Parse.pm /^sub get_all_children$/;" s class:Parse
+get_tab_field lib/DBIx/Perlish/Parse.pm /^sub get_tab_field$/;" s class:Parse
+get_table lib/DBIx/Perlish/Parse.pm /^sub get_table$/;" s class:Parse
+get_var lib/DBIx/Perlish/Parse.pm /^sub get_var$/;" s class:Parse
+init lib/DBIx/Perlish/Parse.pm /^sub init$/;" s class:Parse
+is lib/DBIx/Perlish/Parse.pm /^sub is$/;" s class:Parse
+is_const lib/DBIx/Perlish/Parse.pm /^sub is_const$/;" s class:Parse
+new_tab lib/DBIx/Perlish/Parse.pm /^sub new_tab$/;" s class:Parse
+new_var lib/DBIx/Perlish/Parse.pm /^sub new_var$/;" s class:Parse
+parse_entersub lib/DBIx/Perlish/Parse.pm /^sub parse_entersub$/;" s class:Parse
+parse_expr lib/DBIx/Perlish/Parse.pm /^sub parse_expr$/;" s class:Parse
+parse_list lib/DBIx/Perlish/Parse.pm /^sub parse_list$/;" s class:Parse
+parse_op lib/DBIx/Perlish/Parse.pm /^sub parse_op$/;" s class:Parse
+parse_sub lib/DBIx/Perlish/Parse.pm /^sub parse_sub$/;" s class:Parse
+parse_term lib/DBIx/Perlish/Parse.pm /^sub parse_term$/;" s class:Parse
+try_parse_attr_assignment lib/DBIx/Perlish/Parse.pm /^sub try_parse_attr_assignment$/;" s class:Parse
+want_ lib/DBIx/Perlish/Parse.pm /^ sub want_$optype {$/;" s class:Parse
+want_const lib/DBIx/Perlish/Parse.pm /^sub want_const$/;" s class:Parse
+want_method lib/DBIx/Perlish/Parse.pm /^sub want_method$/;" s class:Parse
Please sign in to comment.
Something went wrong with that request. Please try again.