summaryrefslogtreecommitdiff
path: root/lib/Catmandu/Store/DBI
diff options
context:
space:
mode:
authorNicolas Steenlant <nicolas.steenlant@ugent.be>2015-10-13 11:22:48 +0200
committerNicolas Steenlant <nicolas.steenlant@ugent.be>2015-10-13 11:22:48 +0200
commit9eb8ccd4aacc43f08884f86dbdfa46d112948f22 (patch)
tree706b460fbba6537a42aec72ec1c7b0b28c696b3c /lib/Catmandu/Store/DBI
parentd0b524535ee49c60ab523974442c4972ab30188d (diff)
shallow copy default mapping; VERSION everywhere
Diffstat (limited to 'lib/Catmandu/Store/DBI')
-rw-r--r--lib/Catmandu/Store/DBI/Bag.pm4
-rw-r--r--lib/Catmandu/Store/DBI/Handler.pm2
-rw-r--r--lib/Catmandu/Store/DBI/Handler/MySQL.pm2
-rw-r--r--lib/Catmandu/Store/DBI/Handler/Pg.pm2
-rw-r--r--lib/Catmandu/Store/DBI/Handler/SQLite.pm2
-rw-r--r--lib/Catmandu/Store/DBI/Iterator.pm2
6 files changed, 13 insertions, 1 deletions
diff --git a/lib/Catmandu/Store/DBI/Bag.pm b/lib/Catmandu/Store/DBI/Bag.pm
index ed9bebc..9947c6b 100644
--- a/lib/Catmandu/Store/DBI/Bag.pm
+++ b/lib/Catmandu/Store/DBI/Bag.pm
@@ -5,6 +5,8 @@ use Moo;
use Catmandu::Store::DBI::Iterator;
use namespace::clean;
+our $VERSION = "0.05";
+
my $default_mapping = {
_id => {
column => 'id',
@@ -20,7 +22,7 @@ my $default_mapping = {
}
};
-has mapping => (is => 'ro', default => sub { $default_mapping });
+has mapping => (is => 'ro', default => sub { +{%$default_mapping} });
has _iterator => (
is => 'ro',
lazy => 1,
diff --git a/lib/Catmandu/Store/DBI/Handler.pm b/lib/Catmandu/Store/DBI/Handler.pm
index 30037bd..7055552 100644
--- a/lib/Catmandu/Store/DBI/Handler.pm
+++ b/lib/Catmandu/Store/DBI/Handler.pm
@@ -4,6 +4,8 @@ use Catmandu::Sane;
use Moo::Role;
use namespace::clean;
+our $VERSION = "0.05";
+
requires 'create_table';
requires 'add_row';
diff --git a/lib/Catmandu/Store/DBI/Handler/MySQL.pm b/lib/Catmandu/Store/DBI/Handler/MySQL.pm
index 425792f..e1f832f 100644
--- a/lib/Catmandu/Store/DBI/Handler/MySQL.pm
+++ b/lib/Catmandu/Store/DBI/Handler/MySQL.pm
@@ -4,6 +4,8 @@ use Catmandu::Sane;
use Moo;
use namespace::clean;
+our $VERSION = "0.05";
+
with 'Catmandu::Store::DBI::Handler';
# text types are case-insensitive in MySQL
diff --git a/lib/Catmandu/Store/DBI/Handler/Pg.pm b/lib/Catmandu/Store/DBI/Handler/Pg.pm
index 84062d9..a321df2 100644
--- a/lib/Catmandu/Store/DBI/Handler/Pg.pm
+++ b/lib/Catmandu/Store/DBI/Handler/Pg.pm
@@ -5,6 +5,8 @@ use DBD::Pg ();
use Moo;
use namespace::clean;
+our $VERSION = "0.05";
+
with 'Catmandu::Store::DBI::Handler';
sub _column_sql {
diff --git a/lib/Catmandu/Store/DBI/Handler/SQLite.pm b/lib/Catmandu/Store/DBI/Handler/SQLite.pm
index 88596ad..3ae97c0 100644
--- a/lib/Catmandu/Store/DBI/Handler/SQLite.pm
+++ b/lib/Catmandu/Store/DBI/Handler/SQLite.pm
@@ -4,6 +4,8 @@ use Catmandu::Sane;
use Moo;
use namespace::clean;
+our $VERSION = "0.05";
+
with 'Catmandu::Store::DBI::Handler';
sub _column_sql {
diff --git a/lib/Catmandu/Store/DBI/Iterator.pm b/lib/Catmandu/Store/DBI/Iterator.pm
index 5ec0a7e..c917e41 100644
--- a/lib/Catmandu/Store/DBI/Iterator.pm
+++ b/lib/Catmandu/Store/DBI/Iterator.pm
@@ -5,6 +5,8 @@ use Catmandu::Util qw(is_value is_string is_array_ref);
use Moo;
use namespace::clean;
+our $VERSION = "0.05";
+
with 'Catmandu::Iterable';
has bag => (is => 'ro', required => 1);