annotate lib/IMPL/ORM/Helpers.pm @ 408:5c80e33f1218 ref20150831

added 'coarsen' function
author cin
date Mon, 07 Sep 2015 01:35:25 +0300
parents c6e90e02dd17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
407
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
1 package IMPL::ORM::Helpers;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
2 use strict;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
3 use warnings;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
4
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
5 require Exporter;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
6 our @ISA = qw(Exporter);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
7 our @EXPORT_OK = qw(&Map &Box);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
8
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
9 sub Map($$) {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
10 my ($TKey,$TValue) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
11
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
12 $TKey =~ s/:://g;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
13 $TValue =~ s/:://g;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
14
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
15 return "IMPL::ORM::Map::${TKey}${TValue}";
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
16 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
17
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
18 sub Box($) {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
19 my ($TValue) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
20 $TValue =~ s/:://g;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
21 return "IMPL::ORM::Box::$TValue";
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
22 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
23
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
24 1;