Showing 10 changed files with 1015 additions and 115 deletions
+885
Makefile.old
... ...
@@ -0,0 +1,885 @@
1
+# This Makefile is for the DBIx::Custom extension to perl.
2
+#
3
+# It was generated automatically by MakeMaker version
4
+# 6.56 (Revision: 65600) from the contents of
5
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
6
+#
7
+#       ANY CHANGES MADE HERE WILL BE LOST!
8
+#
9
+#   MakeMaker ARGV: ()
10
+#
11
+
12
+#   MakeMaker Parameters:
13
+
14
+#     ABSTRACT_FROM => q[lib/DBIx/Custom.pm]
15
+#     AUTHOR => q[Yuki Kimoto <kimoto.yuki@gmail.com>]
16
+#     BUILD_REQUIRES => {  }
17
+#     LICENSE => q[perl]
18
+#     NAME => q[DBIx::Custom]
19
+#     PL_FILES => {  }
20
+#     PREREQ_PM => { Test::More=>q[0], Object::Simple=>q[3.0616], DBD::SQLite=>q[1.25], DBI=>q[1.605] }
21
+#     VERSION_FROM => q[lib/DBIx/Custom.pm]
22
+#     clean => { FILES=>q[DBIx-Custom-*] }
23
+#     dist => { COMPRESS=>q[gzip -9f], SUFFIX=>q[gz] }
24
+
25
+# --- MakeMaker post_initialize section:
26
+
27
+
28
+# --- MakeMaker const_config section:
29
+
30
+# These definitions are from config.sh (via /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Config.pm).
31
+# They may have been overridden via Makefile.PL or on the command line.
32
+AR = ar
33
+CC = gcc
34
+CCCDLFLAGS = -fPIC
35
+CCDLFLAGS = -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
36
+DLEXT = so
37
+DLSRC = dl_dlopen.xs
38
+EXE_EXT = 
39
+FULL_AR = /usr/bin/ar
40
+LD = gcc
41
+LDDLFLAGS = -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib
42
+LDFLAGS =  -L/usr/local/lib
43
+LIBC = /lib/libc-2.5.so
44
+LIB_EXT = .a
45
+OBJ_EXT = .o
46
+OSNAME = linux
47
+OSVERS = 2.6.18-53.el5
48
+RANLIB = :
49
+SITELIBEXP = /usr/lib/perl5/site_perl/5.8.8
50
+SITEARCHEXP = /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
51
+SO = so
52
+VENDORARCHEXP = /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
53
+VENDORLIBEXP = /usr/lib/perl5/vendor_perl/5.8.8
54
+
55
+
56
+# --- MakeMaker constants section:
57
+AR_STATIC_ARGS = cr
58
+DIRFILESEP = /
59
+DFSEP = $(DIRFILESEP)
60
+NAME = DBIx::Custom
61
+NAME_SYM = DBIx_Custom
62
+VERSION = 0.1680
63
+VERSION_MACRO = VERSION
64
+VERSION_SYM = 0_1680
65
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
66
+XS_VERSION = 0.1680
67
+XS_VERSION_MACRO = XS_VERSION
68
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
69
+INST_ARCHLIB = blib/arch
70
+INST_SCRIPT = blib/script
71
+INST_BIN = blib/bin
72
+INST_LIB = blib/lib
73
+INST_MAN1DIR = blib/man1
74
+INST_MAN3DIR = blib/man3
75
+MAN1EXT = 1
76
+MAN3EXT = 3pm
77
+INSTALLDIRS = site
78
+DESTDIR = 
79
+PREFIX = $(SITEPREFIX)
80
+PERLPREFIX = /usr
81
+SITEPREFIX = /usr
82
+VENDORPREFIX = /usr
83
+INSTALLPRIVLIB = /usr/lib/perl5/5.8.8
84
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
85
+INSTALLSITELIB = /usr/lib/perl5/site_perl/5.8.8
86
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
87
+INSTALLVENDORLIB = /usr/lib/perl5/vendor_perl/5.8.8
88
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
89
+INSTALLARCHLIB = /usr/lib/perl5/5.8.8/i386-linux-thread-multi
90
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
91
+INSTALLSITEARCH = /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
92
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
93
+INSTALLVENDORARCH = /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
94
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
95
+INSTALLBIN = /usr/bin
96
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
97
+INSTALLSITEBIN = /usr/bin
98
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
99
+INSTALLVENDORBIN = /usr/bin
100
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
101
+INSTALLSCRIPT = /usr/bin
102
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
103
+INSTALLSITESCRIPT = /usr/bin
104
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
105
+INSTALLVENDORSCRIPT = /usr/bin
106
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
107
+INSTALLMAN1DIR = /usr/share/man/man1
108
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
109
+INSTALLSITEMAN1DIR = /usr/share/man/man1
110
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
111
+INSTALLVENDORMAN1DIR = /usr/share/man/man1
112
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
113
+INSTALLMAN3DIR = /usr/share/man/man3
114
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
115
+INSTALLSITEMAN3DIR = /usr/share/man/man3
116
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
117
+INSTALLVENDORMAN3DIR = /usr/share/man/man3
118
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
119
+PERL_LIB = /usr/lib/perl5/5.8.8
120
+PERL_ARCHLIB = /usr/lib/perl5/5.8.8/i386-linux-thread-multi
121
+LIBPERL_A = libperl.a
122
+FIRST_MAKEFILE = Makefile
123
+MAKEFILE_OLD = Makefile.old
124
+MAKE_APERL_FILE = Makefile.aperl
125
+PERLMAINCC = $(CC)
126
+PERL_INC = /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
127
+PERL = /usr/bin/perl
128
+FULLPERL = /usr/bin/perl
129
+ABSPERL = $(PERL)
130
+PERLRUN = $(PERL)
131
+FULLPERLRUN = $(FULLPERL)
132
+ABSPERLRUN = $(ABSPERL)
133
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
134
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
135
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
136
+PERL_CORE = 0
137
+PERM_DIR = 755
138
+PERM_RW = 644
139
+PERM_RWX = 755
140
+
141
+MAKEMAKER   = /home/kimoto/perl5/lib/perl5/ExtUtils/MakeMaker.pm
142
+MM_VERSION  = 6.56
143
+MM_REVISION = 65600
144
+
145
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
146
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
147
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
148
+# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
149
+MAKE = make
150
+FULLEXT = DBIx/Custom
151
+BASEEXT = Custom
152
+PARENT_NAME = DBIx
153
+DLBASE = $(BASEEXT)
154
+VERSION_FROM = lib/DBIx/Custom.pm
155
+OBJECT = 
156
+LDFROM = $(OBJECT)
157
+LINKTYPE = dynamic
158
+BOOTDEP = 
159
+
160
+# Handy lists of source code files:
161
+XS_FILES = 
162
+C_FILES  = 
163
+O_FILES  = 
164
+H_FILES  = 
165
+MAN1PODS = 
166
+MAN3PODS = lib/DBIx/Custom.pm \
167
+	lib/DBIx/Custom/Guide.pod \
168
+	lib/DBIx/Custom/Guide/Ja.pod \
169
+	lib/DBIx/Custom/Model.pm \
170
+	lib/DBIx/Custom/Query.pm \
171
+	lib/DBIx/Custom/QueryBuilder.pm \
172
+	lib/DBIx/Custom/Result.pm \
173
+	lib/DBIx/Custom/Tag.pm \
174
+	lib/DBIx/Custom/Util.pm \
175
+	lib/DBIx/Custom/Where.pm
176
+
177
+# Where is the Config information that we are using/depend on
178
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
179
+
180
+# Where to build things
181
+INST_LIBDIR      = $(INST_LIB)/DBIx
182
+INST_ARCHLIBDIR  = $(INST_ARCHLIB)/DBIx
183
+
184
+INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
185
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
186
+
187
+INST_STATIC      = 
188
+INST_DYNAMIC     = 
189
+INST_BOOT        = 
190
+
191
+# Extra linker info
192
+EXPORT_LIST        = 
193
+PERL_ARCHIVE       = 
194
+PERL_ARCHIVE_AFTER = 
195
+
196
+
197
+TO_INST_PM = lib/DBIx/Custom.pm \
198
+	lib/DBIx/Custom/Guide.pod \
199
+	lib/DBIx/Custom/Guide/Ja.pod \
200
+	lib/DBIx/Custom/Model.pm \
201
+	lib/DBIx/Custom/Query.pm \
202
+	lib/DBIx/Custom/QueryBuilder.pm \
203
+	lib/DBIx/Custom/Result.pm \
204
+	lib/DBIx/Custom/Tag.pm \
205
+	lib/DBIx/Custom/Util.pm \
206
+	lib/DBIx/Custom/Where.pm
207
+
208
+PM_TO_BLIB = lib/DBIx/Custom/Tag.pm \
209
+	blib/lib/DBIx/Custom/Tag.pm \
210
+	lib/DBIx/Custom/Guide/Ja.pod \
211
+	blib/lib/DBIx/Custom/Guide/Ja.pod \
212
+	lib/DBIx/Custom/Util.pm \
213
+	blib/lib/DBIx/Custom/Util.pm \
214
+	lib/DBIx/Custom/Guide.pod \
215
+	blib/lib/DBIx/Custom/Guide.pod \
216
+	lib/DBIx/Custom/Where.pm \
217
+	blib/lib/DBIx/Custom/Where.pm \
218
+	lib/DBIx/Custom/Model.pm \
219
+	blib/lib/DBIx/Custom/Model.pm \
220
+	lib/DBIx/Custom.pm \
221
+	blib/lib/DBIx/Custom.pm \
222
+	lib/DBIx/Custom/Query.pm \
223
+	blib/lib/DBIx/Custom/Query.pm \
224
+	lib/DBIx/Custom/Result.pm \
225
+	blib/lib/DBIx/Custom/Result.pm \
226
+	lib/DBIx/Custom/QueryBuilder.pm \
227
+	blib/lib/DBIx/Custom/QueryBuilder.pm
228
+
229
+
230
+# --- MakeMaker platform_constants section:
231
+MM_Unix_VERSION = 6.56
232
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
233
+
234
+
235
+# --- MakeMaker tool_autosplit section:
236
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
237
+AUTOSPLITFILE = $(ABSPERLRUN)  -e 'use AutoSplit;  autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
238
+
239
+
240
+
241
+# --- MakeMaker tool_xsubpp section:
242
+
243
+
244
+# --- MakeMaker tools_other section:
245
+SHELL = /bin/sh
246
+CHMOD = chmod
247
+CP = cp
248
+MV = mv
249
+NOOP = $(TRUE)
250
+NOECHO = @
251
+RM_F = rm -f
252
+RM_RF = rm -rf
253
+TEST_F = test -f
254
+TOUCH = touch
255
+UMASK_NULL = umask 0
256
+DEV_NULL = > /dev/null 2>&1
257
+MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
258
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
259
+FALSE = false
260
+TRUE = true
261
+ECHO = echo
262
+ECHO_N = echo -n
263
+UNINST = 0
264
+VERBINST = 0
265
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
266
+DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
267
+UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
268
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
269
+MACROSTART = 
270
+MACROEND = 
271
+USEMAKEFILE = -f
272
+FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
273
+
274
+
275
+# --- MakeMaker makemakerdflt section:
276
+makemakerdflt : all
277
+	$(NOECHO) $(NOOP)
278
+
279
+
280
+# --- MakeMaker dist section:
281
+TAR = tar
282
+TARFLAGS = cvf
283
+ZIP = zip
284
+ZIPFLAGS = -r
285
+COMPRESS = gzip -9f
286
+SUFFIX = gz
287
+SHAR = shar
288
+PREOP = $(NOECHO) $(NOOP)
289
+POSTOP = $(NOECHO) $(NOOP)
290
+TO_UNIX = $(NOECHO) $(NOOP)
291
+CI = ci -u
292
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
293
+DIST_CP = best
294
+DIST_DEFAULT = tardist
295
+DISTNAME = DBIx-Custom
296
+DISTVNAME = DBIx-Custom-0.1680
297
+
298
+
299
+# --- MakeMaker macro section:
300
+
301
+
302
+# --- MakeMaker depend section:
303
+
304
+
305
+# --- MakeMaker cflags section:
306
+
307
+
308
+# --- MakeMaker const_loadlibs section:
309
+
310
+
311
+# --- MakeMaker const_cccmd section:
312
+
313
+
314
+# --- MakeMaker post_constants section:
315
+
316
+
317
+# --- MakeMaker pasthru section:
318
+
319
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
320
+	LINKTYPE="$(LINKTYPE)"\
321
+	PREFIX="$(PREFIX)"
322
+
323
+
324
+# --- MakeMaker special_targets section:
325
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
326
+
327
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
328
+
329
+
330
+
331
+# --- MakeMaker c_o section:
332
+
333
+
334
+# --- MakeMaker xs_c section:
335
+
336
+
337
+# --- MakeMaker xs_o section:
338
+
339
+
340
+# --- MakeMaker top_targets section:
341
+all :: pure_all manifypods
342
+	$(NOECHO) $(NOOP)
343
+
344
+
345
+pure_all :: config pm_to_blib subdirs linkext
346
+	$(NOECHO) $(NOOP)
347
+
348
+subdirs :: $(MYEXTLIB)
349
+	$(NOECHO) $(NOOP)
350
+
351
+config :: $(FIRST_MAKEFILE) blibdirs
352
+	$(NOECHO) $(NOOP)
353
+
354
+help :
355
+	perldoc ExtUtils::MakeMaker
356
+
357
+
358
+# --- MakeMaker blibdirs section:
359
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
360
+	$(NOECHO) $(NOOP)
361
+
362
+# Backwards compat with 6.18 through 6.25
363
+blibdirs.ts : blibdirs
364
+	$(NOECHO) $(NOOP)
365
+
366
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
367
+	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
368
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
369
+	$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
370
+
371
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
372
+	$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
373
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
374
+	$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
375
+
376
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
377
+	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
378
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
379
+	$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
380
+
381
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
382
+	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
383
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
384
+	$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
385
+
386
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
387
+	$(NOECHO) $(MKPATH) $(INST_BIN)
388
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
389
+	$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
390
+
391
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
392
+	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
393
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
394
+	$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
395
+
396
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
397
+	$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
398
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
399
+	$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
400
+
401
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
402
+	$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
403
+	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
404
+	$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
405
+
406
+
407
+
408
+# --- MakeMaker linkext section:
409
+
410
+linkext :: $(LINKTYPE)
411
+	$(NOECHO) $(NOOP)
412
+
413
+
414
+# --- MakeMaker dlsyms section:
415
+
416
+
417
+# --- MakeMaker dynamic section:
418
+
419
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
420
+	$(NOECHO) $(NOOP)
421
+
422
+
423
+# --- MakeMaker dynamic_bs section:
424
+
425
+BOOTSTRAP =
426
+
427
+
428
+# --- MakeMaker dynamic_lib section:
429
+
430
+
431
+# --- MakeMaker static section:
432
+
433
+## $(INST_PM) has been moved to the all: target.
434
+## It remains here for awhile to allow for old usage: "make static"
435
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
436
+	$(NOECHO) $(NOOP)
437
+
438
+
439
+# --- MakeMaker static_lib section:
440
+
441
+
442
+# --- MakeMaker manifypods section:
443
+
444
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
445
+POD2MAN = $(POD2MAN_EXE)
446
+
447
+
448
+manifypods : pure_all  \
449
+	lib/DBIx/Custom/Tag.pm \
450
+	lib/DBIx/Custom/Guide/Ja.pod \
451
+	lib/DBIx/Custom/Util.pm \
452
+	lib/DBIx/Custom/Guide.pod \
453
+	lib/DBIx/Custom/Where.pm \
454
+	lib/DBIx/Custom/Model.pm \
455
+	lib/DBIx/Custom.pm \
456
+	lib/DBIx/Custom/Query.pm \
457
+	lib/DBIx/Custom/Result.pm \
458
+	lib/DBIx/Custom/QueryBuilder.pm
459
+	$(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
460
+	  lib/DBIx/Custom/Tag.pm $(INST_MAN3DIR)/DBIx::Custom::Tag.$(MAN3EXT) \
461
+	  lib/DBIx/Custom/Guide/Ja.pod $(INST_MAN3DIR)/DBIx::Custom::Guide::Ja.$(MAN3EXT) \
462
+	  lib/DBIx/Custom/Util.pm $(INST_MAN3DIR)/DBIx::Custom::Util.$(MAN3EXT) \
463
+	  lib/DBIx/Custom/Guide.pod $(INST_MAN3DIR)/DBIx::Custom::Guide.$(MAN3EXT) \
464
+	  lib/DBIx/Custom/Where.pm $(INST_MAN3DIR)/DBIx::Custom::Where.$(MAN3EXT) \
465
+	  lib/DBIx/Custom/Model.pm $(INST_MAN3DIR)/DBIx::Custom::Model.$(MAN3EXT) \
466
+	  lib/DBIx/Custom.pm $(INST_MAN3DIR)/DBIx::Custom.$(MAN3EXT) \
467
+	  lib/DBIx/Custom/Query.pm $(INST_MAN3DIR)/DBIx::Custom::Query.$(MAN3EXT) \
468
+	  lib/DBIx/Custom/Result.pm $(INST_MAN3DIR)/DBIx::Custom::Result.$(MAN3EXT) \
469
+	  lib/DBIx/Custom/QueryBuilder.pm $(INST_MAN3DIR)/DBIx::Custom::QueryBuilder.$(MAN3EXT) 
470
+
471
+
472
+
473
+
474
+# --- MakeMaker processPL section:
475
+
476
+
477
+# --- MakeMaker installbin section:
478
+
479
+
480
+# --- MakeMaker subdirs section:
481
+
482
+# none
483
+
484
+# --- MakeMaker clean_subdirs section:
485
+clean_subdirs :
486
+	$(NOECHO) $(NOOP)
487
+
488
+
489
+# --- MakeMaker clean section:
490
+
491
+# Delete temporary files but do not touch installed files. We don't delete
492
+# the Makefile here so a later make realclean still has a makefile to use.
493
+
494
+clean :: clean_subdirs
495
+	- $(RM_F) \
496
+	  *$(LIB_EXT) core \
497
+	  core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
498
+	  core.[0-9][0-9] $(BASEEXT).bso \
499
+	  pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
500
+	  $(BASEEXT).x $(BOOTSTRAP) \
501
+	  perl$(EXE_EXT) tmon.out \
502
+	  *$(OBJ_EXT) pm_to_blib \
503
+	  $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
504
+	  core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
505
+	  core.*perl.*.? $(MAKE_APERL_FILE) \
506
+	  perl $(BASEEXT).def \
507
+	  core.[0-9][0-9][0-9] mon.out \
508
+	  lib$(BASEEXT).def perlmain.c \
509
+	  perl.exe so_locations \
510
+	  $(BASEEXT).exp 
511
+	- $(RM_RF) \
512
+	  DBIx-Custom-* blib 
513
+	- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
514
+
515
+
516
+# --- MakeMaker realclean_subdirs section:
517
+realclean_subdirs :
518
+	$(NOECHO) $(NOOP)
519
+
520
+
521
+# --- MakeMaker realclean section:
522
+# Delete temporary files (via clean) and also delete dist files
523
+realclean purge ::  clean realclean_subdirs
524
+	- $(RM_F) \
525
+	  $(MAKEFILE_OLD) $(FIRST_MAKEFILE) 
526
+	- $(RM_RF) \
527
+	  $(DISTVNAME) 
528
+
529
+
530
+# --- MakeMaker metafile section:
531
+metafile : create_distdir
532
+	$(NOECHO) $(ECHO) Generating META.yml
533
+	$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
534
+	$(NOECHO) $(ECHO) 'name:               DBIx-Custom' >> META_new.yml
535
+	$(NOECHO) $(ECHO) 'version:            0.1680' >> META_new.yml
536
+	$(NOECHO) $(ECHO) 'abstract:           Useful database access, respecting SQL!' >> META_new.yml
537
+	$(NOECHO) $(ECHO) 'author:' >> META_new.yml
538
+	$(NOECHO) $(ECHO) '    - Yuki Kimoto <kimoto.yuki@gmail.com>' >> META_new.yml
539
+	$(NOECHO) $(ECHO) 'license:            perl' >> META_new.yml
540
+	$(NOECHO) $(ECHO) 'distribution_type:  module' >> META_new.yml
541
+	$(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
542
+	$(NOECHO) $(ECHO) '    ExtUtils::MakeMaker:  0' >> META_new.yml
543
+	$(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
544
+	$(NOECHO) $(ECHO) '    ExtUtils::MakeMaker:  0' >> META_new.yml
545
+	$(NOECHO) $(ECHO) 'requires:' >> META_new.yml
546
+	$(NOECHO) $(ECHO) '    DBD::SQLite:     1.25' >> META_new.yml
547
+	$(NOECHO) $(ECHO) '    DBI:             1.605' >> META_new.yml
548
+	$(NOECHO) $(ECHO) '    Object::Simple:  3.0616' >> META_new.yml
549
+	$(NOECHO) $(ECHO) '    Test::More:      0' >> META_new.yml
550
+	$(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
551
+	$(NOECHO) $(ECHO) '    directory:' >> META_new.yml
552
+	$(NOECHO) $(ECHO) '        - t' >> META_new.yml
553
+	$(NOECHO) $(ECHO) '        - inc' >> META_new.yml
554
+	$(NOECHO) $(ECHO) 'generated_by:       ExtUtils::MakeMaker version 6.56' >> META_new.yml
555
+	$(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
556
+	$(NOECHO) $(ECHO) '    url:      http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
557
+	$(NOECHO) $(ECHO) '    version:  1.4' >> META_new.yml
558
+	-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
559
+
560
+
561
+# --- MakeMaker signature section:
562
+signature :
563
+	cpansign -s
564
+
565
+
566
+# --- MakeMaker dist_basics section:
567
+distclean :: realclean distcheck
568
+	$(NOECHO) $(NOOP)
569
+
570
+distcheck :
571
+	$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
572
+
573
+skipcheck :
574
+	$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
575
+
576
+manifest :
577
+	$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
578
+
579
+veryclean : realclean
580
+	$(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old 
581
+
582
+
583
+
584
+# --- MakeMaker dist_core section:
585
+
586
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
587
+	$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
588
+	  -e '    if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
589
+
590
+tardist : $(DISTVNAME).tar$(SUFFIX)
591
+	$(NOECHO) $(NOOP)
592
+
593
+uutardist : $(DISTVNAME).tar$(SUFFIX)
594
+	uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
595
+
596
+$(DISTVNAME).tar$(SUFFIX) : distdir
597
+	$(PREOP)
598
+	$(TO_UNIX)
599
+	$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
600
+	$(RM_RF) $(DISTVNAME)
601
+	$(COMPRESS) $(DISTVNAME).tar
602
+	$(POSTOP)
603
+
604
+zipdist : $(DISTVNAME).zip
605
+	$(NOECHO) $(NOOP)
606
+
607
+$(DISTVNAME).zip : distdir
608
+	$(PREOP)
609
+	$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
610
+	$(RM_RF) $(DISTVNAME)
611
+	$(POSTOP)
612
+
613
+shdist : distdir
614
+	$(PREOP)
615
+	$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
616
+	$(RM_RF) $(DISTVNAME)
617
+	$(POSTOP)
618
+
619
+
620
+# --- MakeMaker distdir section:
621
+create_distdir :
622
+	$(RM_RF) $(DISTVNAME)
623
+	$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
624
+		-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
625
+
626
+distdir : create_distdir distmeta 
627
+	$(NOECHO) $(NOOP)
628
+
629
+
630
+
631
+# --- MakeMaker dist_test section:
632
+disttest : distdir
633
+	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL 
634
+	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
635
+	cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
636
+
637
+
638
+
639
+# --- MakeMaker dist_ci section:
640
+
641
+ci :
642
+	$(PERLRUN) "-MExtUtils::Manifest=maniread" \
643
+	  -e "@all = keys %{ maniread() };" \
644
+	  -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
645
+	  -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
646
+
647
+
648
+# --- MakeMaker distmeta section:
649
+distmeta : create_distdir metafile
650
+	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
651
+	  -e '    or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
652
+
653
+
654
+
655
+# --- MakeMaker distsignature section:
656
+distsignature : create_distdir
657
+	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
658
+	  -e '    or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
659
+	$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
660
+	cd $(DISTVNAME) && cpansign -s
661
+
662
+
663
+
664
+# --- MakeMaker install section:
665
+
666
+install :: pure_install doc_install
667
+	$(NOECHO) $(NOOP)
668
+
669
+install_perl :: pure_perl_install doc_perl_install
670
+	$(NOECHO) $(NOOP)
671
+
672
+install_site :: pure_site_install doc_site_install
673
+	$(NOECHO) $(NOOP)
674
+
675
+install_vendor :: pure_vendor_install doc_vendor_install
676
+	$(NOECHO) $(NOOP)
677
+
678
+pure_install :: pure_$(INSTALLDIRS)_install
679
+	$(NOECHO) $(NOOP)
680
+
681
+doc_install :: doc_$(INSTALLDIRS)_install
682
+	$(NOECHO) $(NOOP)
683
+
684
+pure__install : pure_site_install
685
+	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
686
+
687
+doc__install : doc_site_install
688
+	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
689
+
690
+pure_perl_install :: all
691
+	$(NOECHO) $(MOD_INSTALL) \
692
+		read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
693
+		write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
694
+		$(INST_LIB) $(DESTINSTALLPRIVLIB) \
695
+		$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
696
+		$(INST_BIN) $(DESTINSTALLBIN) \
697
+		$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
698
+		$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
699
+		$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
700
+	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
701
+		$(SITEARCHEXP)/auto/$(FULLEXT)
702
+
703
+
704
+pure_site_install :: all
705
+	$(NOECHO) $(MOD_INSTALL) \
706
+		read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
707
+		write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
708
+		$(INST_LIB) $(DESTINSTALLSITELIB) \
709
+		$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
710
+		$(INST_BIN) $(DESTINSTALLSITEBIN) \
711
+		$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
712
+		$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
713
+		$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
714
+	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
715
+		$(PERL_ARCHLIB)/auto/$(FULLEXT)
716
+
717
+pure_vendor_install :: all
718
+	$(NOECHO) $(MOD_INSTALL) \
719
+		read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
720
+		write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
721
+		$(INST_LIB) $(DESTINSTALLVENDORLIB) \
722
+		$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
723
+		$(INST_BIN) $(DESTINSTALLVENDORBIN) \
724
+		$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
725
+		$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
726
+		$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
727
+
728
+doc_perl_install :: all
729
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
730
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
731
+	-$(NOECHO) $(DOC_INSTALL) \
732
+		"Module" "$(NAME)" \
733
+		"installed into" "$(INSTALLPRIVLIB)" \
734
+		LINKTYPE "$(LINKTYPE)" \
735
+		VERSION "$(VERSION)" \
736
+		EXE_FILES "$(EXE_FILES)" \
737
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
738
+
739
+doc_site_install :: all
740
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
741
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
742
+	-$(NOECHO) $(DOC_INSTALL) \
743
+		"Module" "$(NAME)" \
744
+		"installed into" "$(INSTALLSITELIB)" \
745
+		LINKTYPE "$(LINKTYPE)" \
746
+		VERSION "$(VERSION)" \
747
+		EXE_FILES "$(EXE_FILES)" \
748
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
749
+
750
+doc_vendor_install :: all
751
+	$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
752
+	-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
753
+	-$(NOECHO) $(DOC_INSTALL) \
754
+		"Module" "$(NAME)" \
755
+		"installed into" "$(INSTALLVENDORLIB)" \
756
+		LINKTYPE "$(LINKTYPE)" \
757
+		VERSION "$(VERSION)" \
758
+		EXE_FILES "$(EXE_FILES)" \
759
+		>> $(DESTINSTALLARCHLIB)/perllocal.pod
760
+
761
+
762
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs
763
+	$(NOECHO) $(NOOP)
764
+
765
+uninstall_from_perldirs ::
766
+	$(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
767
+
768
+uninstall_from_sitedirs ::
769
+	$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
770
+
771
+uninstall_from_vendordirs ::
772
+	$(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
773
+
774
+
775
+# --- MakeMaker force section:
776
+# Phony target to force checking subdirectories.
777
+FORCE :
778
+	$(NOECHO) $(NOOP)
779
+
780
+
781
+# --- MakeMaker perldepend section:
782
+
783
+
784
+# --- MakeMaker makefile section:
785
+# We take a very conservative approach here, but it's worth it.
786
+# We move Makefile to Makefile.old here to avoid gnu make looping.
787
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
788
+	$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
789
+	$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
790
+	-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
791
+	-$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
792
+	- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
793
+	$(PERLRUN) Makefile.PL 
794
+	$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
795
+	$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
796
+	$(FALSE)
797
+
798
+
799
+
800
+# --- MakeMaker staticmake section:
801
+
802
+# --- MakeMaker makeaperl section ---
803
+MAP_TARGET    = perl
804
+FULLPERL      = /usr/bin/perl
805
+
806
+$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
807
+	$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
808
+
809
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
810
+	$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
811
+	$(NOECHO) $(PERLRUNINST) \
812
+		Makefile.PL DIR= \
813
+		MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
814
+		MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
815
+
816
+
817
+# --- MakeMaker test section:
818
+
819
+TEST_VERBOSE=0
820
+TEST_TYPE=test_$(LINKTYPE)
821
+TEST_FILE = test.pl
822
+TEST_FILES = t/*.t
823
+TESTDB_SW = -d
824
+
825
+testdb :: testdb_$(LINKTYPE)
826
+
827
+test :: $(TEST_TYPE) subdirs-test
828
+
829
+subdirs-test ::
830
+	$(NOECHO) $(NOOP)
831
+
832
+
833
+test_dynamic :: pure_all
834
+	PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
835
+
836
+testdb_dynamic :: pure_all
837
+	PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
838
+
839
+test_ : test_dynamic
840
+
841
+test_static :: test_dynamic
842
+testdb_static :: testdb_dynamic
843
+
844
+
845
+# --- MakeMaker ppd section:
846
+# Creates a PPD (Perl Package Description) for a binary distribution.
847
+ppd :
848
+	$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="0.1680">' > $(DISTNAME).ppd
849
+	$(NOECHO) $(ECHO) '    <ABSTRACT>Useful database access, respecting SQL!</ABSTRACT>' >> $(DISTNAME).ppd
850
+	$(NOECHO) $(ECHO) '    <AUTHOR>Yuki Kimoto &lt;kimoto.yuki@gmail.com&gt;</AUTHOR>' >> $(DISTNAME).ppd
851
+	$(NOECHO) $(ECHO) '    <IMPLEMENTATION>' >> $(DISTNAME).ppd
852
+	$(NOECHO) $(ECHO) '        <REQUIRE NAME="DBD::SQLite" VERSION="1.25" />' >> $(DISTNAME).ppd
853
+	$(NOECHO) $(ECHO) '        <REQUIRE NAME="DBI::" VERSION="1.605" />' >> $(DISTNAME).ppd
854
+	$(NOECHO) $(ECHO) '        <REQUIRE NAME="Object::Simple" VERSION="3.0616" />' >> $(DISTNAME).ppd
855
+	$(NOECHO) $(ECHO) '        <REQUIRE NAME="Test::More" />' >> $(DISTNAME).ppd
856
+	$(NOECHO) $(ECHO) '        <ARCHITECTURE NAME="i386-linux-thread-multi-5.8" />' >> $(DISTNAME).ppd
857
+	$(NOECHO) $(ECHO) '        <CODEBASE HREF="" />' >> $(DISTNAME).ppd
858
+	$(NOECHO) $(ECHO) '    </IMPLEMENTATION>' >> $(DISTNAME).ppd
859
+	$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
860
+
861
+
862
+# --- MakeMaker pm_to_blib section:
863
+
864
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
865
+	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
866
+	  lib/DBIx/Custom/Tag.pm blib/lib/DBIx/Custom/Tag.pm \
867
+	  lib/DBIx/Custom/Guide/Ja.pod blib/lib/DBIx/Custom/Guide/Ja.pod \
868
+	  lib/DBIx/Custom/Util.pm blib/lib/DBIx/Custom/Util.pm \
869
+	  lib/DBIx/Custom/Guide.pod blib/lib/DBIx/Custom/Guide.pod \
870
+	  lib/DBIx/Custom/Where.pm blib/lib/DBIx/Custom/Where.pm \
871
+	  lib/DBIx/Custom/Model.pm blib/lib/DBIx/Custom/Model.pm \
872
+	  lib/DBIx/Custom.pm blib/lib/DBIx/Custom.pm \
873
+	  lib/DBIx/Custom/Query.pm blib/lib/DBIx/Custom/Query.pm \
874
+	  lib/DBIx/Custom/Result.pm blib/lib/DBIx/Custom/Result.pm \
875
+	  lib/DBIx/Custom/QueryBuilder.pm blib/lib/DBIx/Custom/QueryBuilder.pm 
876
+	$(NOECHO) $(TOUCH) pm_to_blib
877
+
878
+
879
+# --- MakeMaker selfdocument section:
880
+
881
+
882
+# --- MakeMaker postamble section:
883
+
884
+
885
+# End.
+62 -70
lib/DBIx/Custom.pm
... ...
@@ -1,6 +1,6 @@
1 1
 package DBIx::Custom;
2 2
 
3
-our $VERSION = '0.1679';
3
+our $VERSION = '0.1680';
4 4
 
5 5
 use 5.008001;
6 6
 use strict;
... ...
@@ -16,7 +16,7 @@ use DBIx::Custom::QueryBuilder;
16 16
 use DBIx::Custom::Where;
17 17
 use DBIx::Custom::Model;
18 18
 use DBIx::Custom::Tag;
19
-use DBIx::Custom::Util;
19
+use DBIx::Custom::Util qw/_array_to_hash _subname/;
20 20
 use Encode qw/encode_utf8 decode_utf8/;
21 21
 
22 22
 use constant DEBUG => $ENV{DBIX_CUSTOM_DEBUG} || 0;
... ...
@@ -78,8 +78,8 @@ sub AUTOLOAD {
78 78
         $self->dbh->$dbh_method(@_);
79 79
     }
80 80
     else {
81
-        croak qq{Can't locate object method "$mname" via "$package"}
82
-            . qq{ (DBIx::Custom::AUTOLOAD)}
81
+        croak qq{Can't locate object method "$mname" via "$package" }
82
+            . _subname;
83 83
     }
84 84
 }
85 85
 
... ...
@@ -111,10 +111,10 @@ sub apply_filter {
111 111
         
112 112
         # Filter infomation
113 113
         my $finfo = $cinfos[$i + 1] || {};
114
-        croak "$usage (table: $table) (DBIx::Custom::apply_filter)"
114
+        croak "$usage (table: $table) " . _subname
115 115
           unless  ref $finfo eq 'HASH';
116 116
         foreach my $ftype (keys %$finfo) {
117
-            croak "$usage (table: $table) (DBIx::Custom::apply_filter)"
117
+            croak "$usage (table: $table) " . _subname
118 118
               unless $ftype eq 'in' || $ftype eq 'out' || $ftype eq 'end'; 
119 119
         }
120 120
         
... ...
@@ -134,8 +134,7 @@ sub apply_filter {
134 134
             next if $state eq 'not_exists';
135 135
             
136 136
             # Check filter name
137
-            croak qq{Filter "$filter" is not registered}
138
-                . qq{ (DBIx::Custom::apply_filter)}
137
+            croak qq{Filter "$filter" is not registered } . _subname
139 138
               if  $state eq 'name'
140 139
                && ! exists $self->filters->{$filter};
141 140
             
... ...
@@ -229,7 +228,7 @@ sub create_query {
229 228
     
230 229
     if ($@) {
231 230
         $self->_croak($@, qq{. Following SQL is executed.\n}
232
-                        . qq{$query->{sql}\n(DBIx::Custom::create_query)});
231
+                        . qq{$query->{sql}\n} . _subname);
233 232
     }
234 233
     
235 234
     # Set statement handle
... ...
@@ -255,8 +254,7 @@ sub dbh {
255 254
     else {
256 255
         # From Connction manager
257 256
         if (my $connector = $self->connector) {
258
-            croak "connector must have dbh() method"
259
-                . " (DBIx::Custom::dbh)"
257
+            croak "connector must have dbh() method " . _subname
260 258
               unless ref $connector && $connector->can('dbh');
261 259
               
262 260
             return $self->{dbh} = $connector->dbh;
... ...
@@ -274,14 +272,13 @@ sub delete {
274 272
 
275 273
     # Check arguments
276 274
     foreach my $name (keys %args) {
277
-        croak qq{"$name" is wrong option}
278
-            . qq{ (DBIx::Custom::delete)}
275
+        croak qq{"$name" is wrong option } . _subname
279 276
           unless $DELETE_ARGS{$name};
280 277
     }
281 278
     
282 279
     # Arguments
283 280
     my $table = $args{table} || '';
284
-    croak qq{"table" option must be specified. (DBIx::Custom::delete)}
281
+    croak qq{"table" option must be specified. } . _subname
285 282
       unless $table;
286 283
     my $where            = delete $args{where} || {};
287 284
     my $append           = delete $args{append};
... ...
@@ -293,7 +290,7 @@ sub delete {
293 290
     
294 291
     # Where clause
295 292
     my $where_clause = $where->to_string;
296
-    croak qq{"where" must be specified (DBIx::Custom::delete)}
293
+    croak qq{"where" must be specified } . _subname
297 294
       if $where_clause eq '' && !$allow_delete_all;
298 295
 
299 296
     # Delete statement
... ...
@@ -330,7 +327,7 @@ sub delete_at {
330 327
     
331 328
     # Check arguments
332 329
     foreach my $name (keys %args) {
333
-        croak qq{"$name" is wrong option (DBIx::Custom::delete_at)}
330
+        croak qq{"$name" is wrong option } . _subname
334 331
           unless $DELETE_AT_ARGS{$name};
335 332
     }
336 333
     
... ...
@@ -365,8 +362,7 @@ sub create_model {
365 362
     $self->apply_filter($model->table, @$filter);
366 363
     
367 364
     # Associate table with model
368
-    croak "Table name is duplicated"
369
-        . " (DBIx::Custom::create_model)"
365
+    croak "Table name is duplicated " . _subname
370 366
       if exists $self->{_model_from}->{$model->table};
371 367
     $self->{_model_from}->{$model->table} = $model->name;
372 368
 
... ...
@@ -409,13 +405,13 @@ sub execute {
409 405
     my $tables = delete $args{table} || [];
410 406
     $tables = [$tables] unless ref $tables eq 'ARRAY';
411 407
     my $filter = delete $args{filter};
412
-    $filter = DBIx::Custom::Util::array_to_hash($filter);
408
+    $filter = _array_to_hash($filter);
413 409
     my $type = delete $args{type};
414
-    $type = DBIx::Custom::Util::array_to_hash($type);
410
+    $type = _array_to_hash($type);
415 411
     
416 412
     # Check argument names
417 413
     foreach my $name (keys %args) {
418
-        croak qq{"$name" is wrong option (DBIx::Custom::execute)}
414
+        croak qq{"$name" is wrong option } . _subname
419 415
           unless $EXECUTE_ARGS{$name};
420 416
     }
421 417
     
... ...
@@ -474,8 +470,7 @@ sub execute {
474 470
             $filter->{$column} = undef;
475 471
         }
476 472
         elsif (ref $name ne 'CODE') {
477
-          croak qq{Filter "$name" is not registered"}
478
-              . qq{ (DBIx::Custom::execute}
473
+          croak qq{Filter "$name" is not registered" } . _subname
479 474
             unless exists $self->filters->{$name};
480 475
           $filter->{$column} = $self->filters->{$name};
481 476
         }
... ...
@@ -502,7 +497,7 @@ sub execute {
502 497
     
503 498
     if ($@) {
504 499
         $self->_croak($@, qq{. Following SQL is executed.\n}
505
-                        . qq{$query->{sql}\n});
500
+                        . qq{$query->{sql}\n} . _subname);
506 501
     }
507 502
     
508 503
     # Output SQL for debug
... ...
@@ -548,7 +543,7 @@ sub insert {
548 543
     
549 544
     # Arguments
550 545
     my $table  = delete $args{table};
551
-    croak qq{"table" option must be specified (DBIx::Custom::insert)}
546
+    croak qq{"table" option must be specified } . _subname
552 547
       unless $table;
553 548
     my $param  = delete $args{param} || {};
554 549
     my $append = delete $args{append} || '';
... ...
@@ -556,7 +551,7 @@ sub insert {
556 551
 
557 552
     # Check arguments
558 553
     foreach my $name (keys %args) {
559
-        croak qq{"$name" is wrong option (DBIx::Custom::insert)}
554
+        croak qq{"$name" is wrong option } . _subname
560 555
           unless $INSERT_ARGS{$name};
561 556
     }
562 557
 
... ...
@@ -567,8 +562,7 @@ sub insert {
567 562
     my @columns;
568 563
     my $safety = $self->safety_character;
569 564
     foreach my $column (keys %$param) {
570
-        croak qq{"$column" is not safety column name}
571
-            . qq{ (DBIx::Custom::insert)}
565
+        croak qq{"$column" is not safety column name } . _subname
572 566
           unless $column =~ /^[$safety\.]+$/;
573 567
           $column = "$q$column$q";
574 568
           $column =~ s/\./$q.$q/;
... ...
@@ -607,7 +601,7 @@ sub insert_at {
607 601
     
608 602
     # Check arguments
609 603
     foreach my $name (keys %args) {
610
-        croak qq{"$name" is wrong option (DBIx::Custom::insert_at)}
604
+        croak qq{"$name" is wrong option } . _subname
611 605
           unless $INSERT_AT_ARGS{$name};
612 606
     }
613 607
     
... ...
@@ -627,8 +621,7 @@ sub insert_param_tag {
627 621
     my @columns;
628 622
     my @placeholders;
629 623
     foreach my $column (keys %$param) {
630
-        croak qq{"$column" is not safety column name}
631
-            . qq{ (DBIx::Custom::insert_param_tag) }
624
+        croak qq{"$column" is not safety column name } . _subname
632 625
           unless $column =~ /^[$safety\.]+$/;
633 626
         $column = "$q$column$q";
634 627
         $column =~ s/\./$q.$q/;
... ...
@@ -650,20 +643,18 @@ sub include_model {
650 643
     unless ($model_infos) {
651 644
 
652 645
         # Load name space module
653
-        croak qq{"$name_space" is invalid class name}
654
-            . qq{ (DBIx::Custom::include_model)}
646
+        croak qq{"$name_space" is invalid class name } . _subname
655 647
           if $name_space =~ /[^\w:]/;
656 648
         eval "use $name_space";
657
-        croak qq{Name space module "$name_space.pm" is needed. $@}
658
-            . qq{ (DBIx::Custom::include_model)}
649
+        croak qq{Name space module "$name_space.pm" is needed. $@ }
650
+            . _subname
659 651
           if $@;
660 652
         
661 653
         # Search model modules
662 654
         my $path = $INC{"$name_space.pm"};
663 655
         $path =~ s/\.pm$//;
664 656
         opendir my $dh, $path
665
-          or croak qq{Can't open directory "$path": $!}
666
-                 . qq{ (DBIx::Custom::include_model)};
657
+          or croak qq{Can't open directory "$path": $! } . _subname
667 658
         $model_infos = [];
668 659
         while (my $module = readdir $dh) {
669 660
             push @$model_infos, $module
... ...
@@ -689,12 +680,11 @@ sub include_model {
689 680
         }
690 681
         else { $model_class = $model_name = $model_table = $model_info }
691 682
         my $mclass = "${name_space}::$model_class";
692
-        croak qq{"$mclass" is invalid class name}
693
-            . qq{ (DBIx::Custom::inculde_model)}
683
+        croak qq{"$mclass" is invalid class name } . _subname
694 684
           if $mclass =~ /[^\w:]/;
695 685
         unless ($mclass->can('isa')) {
696 686
             eval "use $mclass";
697
-            croak "$@ (DBIx::Custom::include_model)" if $@;
687
+            croak "$@ " . _subname if $@;
698 688
         }
699 689
         
700 690
         # Create model
... ...
@@ -749,7 +739,7 @@ sub model {
749 739
     }
750 740
     
751 741
     # Check model existance
752
-    croak qq{Model "$name" is not included (DBIx::Custom::model)}
742
+    croak qq{Model "$name" is not included } . _subname
753 743
       unless $self->models->{$name};
754 744
     
755 745
     # Get model
... ...
@@ -774,7 +764,7 @@ sub new {
774 764
     # Check attributes
775 765
     my @attrs = keys %$self;
776 766
     foreach my $attr (@attrs) {
777
-        croak qq{"$attr" is wrong name (DBIx::Custom::new)}
767
+        croak qq{"$attr" is wrong name } . _subname
778 768
           unless $self->can($attr);
779 769
     }
780 770
     
... ...
@@ -826,8 +816,7 @@ sub select {
826 816
     my $where     = delete $args{where} || {};
827 817
     my $append    = delete $args{append};
828 818
     my $join      = delete $args{join} || [];
829
-    croak qq{"join" must be array reference}
830
-        . qq{ (DBIx::Custom::select)}
819
+    croak qq{"join" must be array reference } . _subname
831 820
       unless ref $join eq 'ARRAY';
832 821
     my $relation = delete $args{relation};
833 822
     my $param = delete $args{param} || {};
... ...
@@ -836,7 +825,7 @@ sub select {
836 825
 
837 826
     # Check arguments
838 827
     foreach my $name (keys %args) {
839
-        croak qq{"$name" is wrong option (DBIx::Custom::select)}
828
+        croak qq{"$name" is wrong option } . _subname
840 829
           unless $SELECT_ARGS{$name};
841 830
     }
842 831
     
... ...
@@ -873,19 +862,25 @@ sub select {
873 862
         push @sql, "$q$main_table$q";
874 863
     }
875 864
     pop @sql if ($sql[-1] || '') eq ',';
876
-    croak "Not found table name (DBIx::Custom::select)"
865
+    croak "Not found table name " . _subname
877 866
       unless $tables->[-1];
878 867
 
879 868
     # Add tables in parameter
880 869
     unshift @$tables, @{$self->_search_tables(join(' ', keys %$param) || '')};
881 870
     
882 871
     # Where
883
-    $where = $self->_where_to_obj($where);
884
-    $param = keys %$param ? $self->merge_param($param, $where->param)
885
-                          : $where->param;
886
-    
887
-    # String where
888
-    my $where_clause = $where->to_string;
872
+    my $where_clause;
873
+    if (ref $where) {
874
+        $where = $self->_where_to_obj($where);
875
+        $param = keys %$param ? $self->merge_param($param, $where->param)
876
+                              : $where->param;
877
+        
878
+        # String where
879
+        $where_clause = $where->to_string;
880
+    }
881
+    else {
882
+        $where_clause = $where;
883
+    }
889 884
     
890 885
     # Add table names in where clause
891 886
     unshift @$tables, @{$self->_search_tables($where_clause)};
... ...
@@ -904,7 +899,7 @@ sub select {
904 899
     
905 900
     # Wrap
906 901
     if ($wrap) {
907
-        croak "wrap option must be array refrence (DBIx::Custom::select)"
902
+        croak "wrap option must be array refrence " . _subname
908 903
           unless ref $wrap eq 'ARRAY';
909 904
         unshift @sql, $wrap->[0];
910 905
         push @sql, $wrap->[1];
... ...
@@ -941,12 +936,12 @@ sub select_at {
941 936
     
942 937
     # Check arguments
943 938
     foreach my $name (keys %args) {
944
-        croak qq{"$name" is wrong option (DBIx::Custom::select_at)}
939
+        croak qq{"$name" is wrong option } . _subname
945 940
           unless $SELECT_AT_ARGS{$name};
946 941
     }
947 942
     
948 943
     # Table
949
-    croak qq{"table" option must be specified (DBIx::Custom::select_at)}
944
+    croak qq{"table" option must be specified } . _subname
950 945
       unless $args{table};
951 946
     my $table = ref $args{table} ? $args{table}->[-1] : $args{table};
952 947
     
... ...
@@ -979,7 +974,7 @@ sub update {
979 974
 
980 975
     # Arguments
981 976
     my $table = delete $args{table} || '';
982
-    croak qq{"table" option must be specified (DBIx::Custom::update)}
977
+    croak qq{"table" option must be specified } . _subname
983 978
       unless $table;
984 979
     my $param            = delete $args{param} || {};
985 980
     my $where            = delete $args{where} || {};
... ...
@@ -988,7 +983,7 @@ sub update {
988 983
     
989 984
     # Check argument names
990 985
     foreach my $name (keys %args) {
991
-        croak qq{"$name" is wrong option (DBIx::Custom::update)}
986
+        croak qq{"$name" is wrong option } . _subname
992 987
           unless $UPDATE_ARGS{$name};
993 988
     }
994 989
     
... ...
@@ -997,8 +992,7 @@ sub update {
997 992
     my $safety = $self->safety_character;
998 993
     my $q = $self->reserved_word_quote;
999 994
     foreach my $column (keys %$param) {
1000
-        croak qq{"$column" is not safety column name}
1001
-            . qq{ (DBIx::Custom::update)}
995
+        croak qq{"$column" is not safety column name } . _subname
1002 996
           unless $column =~ /^[$safety\.]+$/;
1003 997
           $column = "$q$column$q";
1004 998
           $column =~ s/\./$q.$q/;
... ...
@@ -1011,7 +1005,7 @@ sub update {
1011 1005
     # Where
1012 1006
     $where = $self->_where_to_obj($where);
1013 1007
     my $where_clause = $where->to_string;
1014
-    croak qq{"where" must be specified (DBIx::Custom::update)}
1008
+    croak qq{"where" must be specified } . _subname
1015 1009
       if "$where_clause" eq '' && !$allow_update_all;
1016 1010
     
1017 1011
     # Update statement
... ...
@@ -1055,7 +1049,7 @@ sub update_at {
1055 1049
 
1056 1050
     # Check arguments
1057 1051
     foreach my $name (keys %args) {
1058
-        croak qq{"$name" is wrong option (DBIx::Custom::update_at)}
1052
+        croak qq{"$name" is wrong option } . _subname
1059 1053
           unless $UPDATE_AT_ARGS{$name};
1060 1054
     }
1061 1055
     
... ...
@@ -1073,8 +1067,7 @@ sub update_param_tag {
1073 1067
     my $safety = $self->safety_character;
1074 1068
     my $q = $self->reserved_word_quote;
1075 1069
     foreach my $column (keys %$param) {
1076
-        croak qq{"$column" is not safety column name}
1077
-            . qq{ (DBIx::Custom::update_param_tag) }
1070
+        croak qq{"$column" is not safety column name } . _subname
1078 1071
           unless $column =~ /^[$safety\.]+$/;
1079 1072
         my $column = "$q$column$q";
1080 1073
         $column =~ s/\./$q.$q/;
... ...
@@ -1172,7 +1165,7 @@ sub _connect {
1172 1165
     
1173 1166
     # Attributes
1174 1167
     my $data_source = $self->data_source;
1175
-    croak qq{"data_source" must be specified (DBIx::Custom::dbh)"}
1168
+    croak qq{"data_source" must be specified } . _subname
1176 1169
       unless $data_source;
1177 1170
     my $user        = $self->user;
1178 1171
     my $password    = $self->password;
... ...
@@ -1190,7 +1183,7 @@ sub _connect {
1190 1183
     )};
1191 1184
     
1192 1185
     # Connect error
1193
-    croak "$@ (DBIx::Custom::dbh)" if $@;
1186
+    croak "$@ " . _subname if $@;
1194 1187
     
1195 1188
     return $dbh;
1196 1189
 }
... ...
@@ -1246,15 +1239,14 @@ sub _push_join {
1246 1239
         if ($join_clause =~ $join_re) {
1247 1240
             my $table1 = $1;
1248 1241
             my $table2 = $2;
1249
-            croak qq{right side table of "$join_clause" must be unique}
1250
-                . qq{ (DBIx::Custom::select)}
1242
+            croak qq{right side table of "$join_clause" must be unique }
1243
+                . _subname
1251 1244
               if exists $tree->{$table2};
1252 1245
             $tree->{$table2}
1253 1246
               = {position => $i, parent => $table1, join => $join_clause};
1254 1247
         }
1255 1248
         else {
1256
-            croak qq{join "$join_clause" must be two table name}
1257
-                . qq{ (DBIx::Custom::select)};
1249
+            croak qq{join "$join_clause" must be two table name } . _subname
1258 1250
         }
1259 1251
     }
1260 1252
     
... ...
@@ -1332,7 +1324,7 @@ sub _where_to_obj {
1332 1324
     # Check where argument
1333 1325
     croak qq{"where" must be hash reference or DBIx::Custom::Where object}
1334 1326
         . qq{or array reference, which contains where clause and paramter}
1335
-        . " (" . (caller(1))[3] . ")"
1327
+        . _subname
1336 1328
       unless ref $obj eq 'DBIx::Custom::Where';
1337 1329
     
1338 1330
     return $obj;
+13 -4
lib/DBIx/Custom/Model.pm
... ...
@@ -6,6 +6,7 @@ use warnings;
6 6
 use base 'Object::Simple';
7 7
 
8 8
 use Carp 'croak';
9
+use DBIx::Custom::Util '_subname';
9 10
 
10 11
 # Carp trust relationship
11 12
 push @DBIx::Custom::CARP_NOT, __PACKAGE__;
... ...
@@ -40,8 +41,8 @@ sub AUTOLOAD {
40 41
         $self->dbi->dbh->$dbh_method(@_);
41 42
     }
42 43
     else {
43
-        croak qq{Can't locate object method "$mname" via "$package"}
44
-            . qq{ (DBIx::Custom::Model::AUTOLOAD) }
44
+        croak qq{Can't locate object method "$mname" via "$package" }
45
+            . _subname;
45 46
     }
46 47
 }
47 48
 
... ...
@@ -110,8 +111,7 @@ sub new {
110 111
     # Check attribute names
111 112
     my @attrs = keys %$self;
112 113
     foreach my $attr (@attrs) {
113
-        croak qq{"$attr" is invalid attribute name}
114
-            . qq{ (DBIx::Custom::Model::new) }
114
+        croak qq{"$attr" is invalid attribute name } . _subname
115 115
           unless $self->can($attr);
116 116
     }
117 117
     
... ...
@@ -170,6 +170,15 @@ Join clause, this is used as C<select()>'s C<join> option.
170 170
 Table name, this is used as C<select()> C<table> option.
171 171
 Generally, this is automatically set from class name.
172 172
 
173
+=head2 C<table_alias> EXPERIMENTAL
174
+
175
+    my $table_alias = $model->table_alias;
176
+    $model = $model->table_alias(user1 => 'user', user2 => 'user');
177
+
178
+Table alias. If you define table alias,
179
+same filter as the table is avaliable
180
+, and can write $dbi->column('user1') to get all columns.
181
+
173 182
 =head2 C<primary_key>
174 183
 
175 184
     my $primary_key = $model->primary_key;
+2 -2
lib/DBIx/Custom/Query.pm
... ...
@@ -6,6 +6,7 @@ use warnings;
6 6
 use base 'Object::Simple';
7 7
 
8 8
 use Carp 'croak';
9
+use DBIx::Custom::Util '_subname';
9 10
 
10 11
 __PACKAGE__->attr([qw/columns sql sth filters tables/]);
11 12
 
... ...
@@ -43,8 +44,7 @@ sub filter {
43 44
               && defined $fname
44 45
               && ref $fname ne 'CODE') 
45 46
             {
46
-              croak qq{Filter "$fname" is not registered"}
47
-                  . qq{ (DBIx::Custom::Query::filter) }
47
+              croak qq{Filter "$fname" is not registered" } . _subname
48 48
                 unless exists $self->filters->{$fname};
49 49
               
50 50
               $filter->{$column} = $self->filters->{$fname};
+9 -13
lib/DBIx/Custom/QueryBuilder.pm
... ...
@@ -7,6 +7,7 @@ use base 'Object::Simple';
7 7
 
8 8
 use Carp 'croak';
9 9
 use DBIx::Custom::Query;
10
+use DBIx::Custom::Util '_subname';
10 11
 
11 12
 # Carp trust relationship
12 13
 push @DBIx::Custom::CARP_NOT, __PACKAGE__;
... ...
@@ -77,21 +78,19 @@ sub _build_query {
77 78
                              || $self->tags->{$tag_name};
78 79
             
79 80
             # Tag is not registered
80
-            croak qq{Tag "$tag_name" in "{a }" is not registered}
81
-                . qq{ (DBIx::Custom::QueryBuilder::build_query)}
81
+            croak qq{Tag "$tag_name" in "{a }" is not registered } . _subname
82 82
               unless $tag;
83 83
             
84 84
             # Tag not sub reference
85
-            croak qq{Tag "$tag_name" must be sub reference}
86
-                . qq{ (DBIx::Custom::QueryBuilder::build_query)}
85
+            croak qq{Tag "$tag_name" must be sub reference } . _subname
87 86
               unless ref $tag eq 'CODE';
88 87
             
89 88
             # Execute tag
90 89
             my $r = $tag->(@$tag_args);
91 90
             
92 91
             # Check tag return value
93
-            croak qq{Tag "$tag_name" must return [STRING, ARRAY_REFERENCE]}
94
-                . qq{ (DBIx::Custom::QueryBuilder::build_query)}
92
+            croak qq{Tag "$tag_name" must return [STRING, ARRAY_REFERENCE] }
93
+                . _subname
95 94
               unless ref $r eq 'ARRAY' && defined $r->[0] && ref $r->[1] eq 'ARRAY';
96 95
             
97 96
             # Part of SQL statement and colum names
... ...
@@ -109,7 +108,7 @@ sub _build_query {
109 108
     my $placeholder_count = $self->_placeholder_count($sql);
110 109
     my $column_count      = @$all_columns;
111 110
     croak qq{Placeholder count in "$sql" must be same as column count $column_count}
112
-        . qq{ (DBIx::Custom::QueryBuilder::build_query)}
111
+        . _subname
113 112
       unless $placeholder_count eq @$all_columns;
114 113
     
115 114
     # Add semicolon
... ...
@@ -192,8 +191,7 @@ sub _parse {
192 191
                 # Unexpected
193 192
                 else {
194 193
                     croak qq{Parsing error. unexpected "\}". }
195
-                        . qq{pos $pos of "$original"}
196
-                        . qq{ (DBIx::Custom::QueryBuilder::build_query)};
194
+                        . qq{pos $pos of "$original" } . _subname
197 195
                 }
198 196
             }
199 197
             
... ...
@@ -216,8 +214,7 @@ sub _parse {
216 214
                 # Unexpected
217 215
                 else {
218 216
                     croak qq{Parsing error. unexpected "\{". }
219
-                        . qq{pos $pos of "$original"}
220
-                        . qq{ (DBIx::Custom::QueryBuilder::build_query)};
217
+                        . qq{pos $pos of "$original" } . _subname
221 218
                 }
222 219
             }
223 220
             
... ...
@@ -258,8 +255,7 @@ sub _parse {
258 255
     }
259 256
     
260 257
     # Tag not finished
261
-    croak qq{Tag not finished. "$original"}
262
-        . qq{ (DBIx::Custom::QueryBuilder::build_query)}
258
+    croak qq{Tag not finished. "$original" } . _subname
263 259
       if $state eq 'tag';
264 260
     
265 261
     # Add rest text
+7 -9
lib/DBIx/Custom/Result.pm
... ...
@@ -6,7 +6,7 @@ use warnings;
6 6
 use base 'Object::Simple';
7 7
 
8 8
 use Carp 'croak';
9
-use DBIx::Custom::Util;
9
+use DBIx::Custom::Util qw/_array_to_hash _subname/;
10 10
 
11 11
 __PACKAGE__->attr(
12 12
     [qw/filters sth/],
... ...
@@ -23,7 +23,7 @@ sub filter {
23 23
             $filter = $_[0];
24 24
         }
25 25
         else {
26
-            $filter = DBIx::Custom::Util::array_to_hash(
26
+            $filter = _array_to_hash(
27 27
                 @_ > 1 ? [@_] : $_[0]
28 28
             );
29 29
         }
... ...
@@ -35,8 +35,7 @@ sub filter {
35 35
               && defined $fname
36 36
               && ref $fname ne 'CODE') 
37 37
             {
38
-              croak qq{Filter "$fname" is not registered"}
39
-                  . qq{ (DBIx::Custom::Result::filter)}
38
+              croak qq{Filter "$fname" is not registered" } . _subname
40 39
                 unless exists $self->filters->{$fname};
41 40
               
42 41
               $filter->{$column} = $self->filters->{$fname};
... ...
@@ -61,7 +60,7 @@ sub end_filter {
61 60
             $end_filter = $_[0];
62 61
         }
63 62
         else {
64
-            $end_filter = DBIx::Custom::Util::array_to_hash(
63
+            $end_filter = _array_to_hash(
65 64
                 @_ > 1 ? [@_] : $_[0]
66 65
             );
67 66
         }
... ...
@@ -73,8 +72,7 @@ sub end_filter {
73 72
               && defined $fname
74 73
               && ref $fname ne 'CODE') 
75 74
             {
76
-              croak qq{Filter "$fname" is not registered"}
77
-                  . qq{ (DBIx::Custom::Result::end_filter)}
75
+              croak qq{Filter "$fname" is not registered" } . _subname
78 76
                 unless exists $self->filters->{$fname};
79 77
               
80 78
               $end_filter->{$column} = $self->filters->{$fname};
... ...
@@ -215,7 +213,7 @@ sub fetch_hash_multi {
215 213
     my ($self, $count) = @_;
216 214
     
217 215
     # Row count not specified
218
-    croak 'Row count must be specified (DBIx::Custom::Result::fetch_hash_multi)'
216
+    croak 'Row count must be specified ' . _subname
219 217
       unless $count;
220 218
     
221 219
     # Fetch multi rows
... ...
@@ -234,7 +232,7 @@ sub fetch_multi {
234 232
     my ($self, $count) = @_;
235 233
     
236 234
     # Row count not specifed
237
-    croak 'Row count must be specified (DBIx::Custom::Result::fetch_multi)'
235
+    croak 'Row count must be specified ' . _subname
238 236
       unless $count;
239 237
     
240 238
     # Fetch multi rows
+5 -6
lib/DBIx/Custom/Tag.pm
... ...
@@ -4,6 +4,7 @@ use strict;
4 4
 use warnings;
5 5
 
6 6
 use Carp 'croak';
7
+use DBIx::Custom::Util '_subname';
7 8
 
8 9
 # Carp trust relationship
9 10
 push @DBIx::Custom::QueryBuilder::CARP_NOT, __PACKAGE__;
... ...
@@ -16,8 +17,8 @@ sub in {
16 17
     my ($column, $count) = @_;
17 18
     
18 19
     # Check arguments
19
-    croak qq{Column name and count of values must be specified in tag "{in }"}
20
-        . qq{ (DBIx::Custom::Tag::in) }
20
+    croak qq{Column name and count of values must be specified in tag "{in }" }
21
+        . _subname
21 22
       unless $column && $count && $count =~ /^\d+$/;
22 23
 
23 24
     # Part of statement
... ...
@@ -60,8 +61,7 @@ sub placeholder {
60 61
     my $column = shift;
61 62
     
62 63
     # Check arguments
63
-    croak qq{Column name must be specified in tag "{? }"}
64
-        . qq{ (DBIx::Custom::Tag::placeholder)}
64
+    croak qq{Column name must be specified in tag "{? }" } . _subname
65 65
       unless $column;
66 66
     
67 67
     return ['?', [$column]];
... ...
@@ -82,8 +82,7 @@ sub _basic {
82 82
     my ($name, $column) = @_;
83 83
     
84 84
     # Check arguments
85
-    croak qq{Column name must be specified in tag "{$name }"}
86
-        . qq{ (DBIx::Custom::Tag::_basic) }
85
+    croak qq{Column name must be specified in tag "{$name }" } . _subname
87 86
       unless $column;
88 87
     
89 88
     return ["$column $name ?", [$column]];
+7 -1
lib/DBIx/Custom/Util.pm
... ...
@@ -3,7 +3,11 @@ package DBIx::Custom::Util;
3 3
 use strict;
4 4
 use warnings;
5 5
 
6
-sub array_to_hash {
6
+use base 'Exporter';
7
+
8
+our @EXPORT_OK = qw/_array_to_hash _subname/;
9
+
10
+sub _array_to_hash {
7 11
     my $array = shift;
8 12
     
9 13
     return $array if ref $array eq 'HASH';
... ...
@@ -27,6 +31,8 @@ sub array_to_hash {
27 31
     return $hash;
28 32
 }
29 33
 
34
+sub _subname { '(' . (caller 1)[3] . ')' }
35
+
30 36
 1;
31 37
 
32 38
 =head1 NAME
+8 -8
lib/DBIx/Custom/Where.pm
... ...
@@ -8,6 +8,7 @@ use base 'Object::Simple';
8 8
 use overload 'bool' => sub {1}, fallback => 1;
9 9
 use overload '""' => sub { shift->to_string }, fallback => 1;
10 10
 
11
+use DBIx::Custom::Util '_subname';
11 12
 use Carp 'croak';
12 13
 
13 14
 # Carp trust relationship
... ...
@@ -25,8 +26,7 @@ sub new {
25 26
     # Check attribute names
26 27
     my @attrs = keys %$self;
27 28
     foreach my $attr (@attrs) {
28
-        croak qq{"$attr" is invalid attribute name}
29
-            . qq{ (DBIx::Custom::Where::new) }
29
+        croak qq{"$attr" is invalid attribute name (} . _subname . ")"
30 30
           unless $self->can($attr);
31 31
     }
32 32
     
... ...
@@ -63,7 +63,7 @@ sub _parse {
63 63
         
64 64
         # Operation
65 65
         my $op = $clause->[0] || '';
66
-        croak qq{"$op" is invalid operation (DBIx::Custom::Where::to_string)}
66
+        croak qq{"$op" is invalid operation (} . _subname . ")"
67 67
           unless $VALID_OPERATIONS{$op};
68 68
         
69 69
         # Parse internal clause
... ...
@@ -95,8 +95,8 @@ sub _parse {
95 95
             return $pushed;
96 96
         }
97 97
         elsif (@$columns != 1) {
98
-            croak qq{Each tag contains one column name: tag "$clause" }
99
-                  . "(DBIx::Custom::Where::to_string)"
98
+            croak qq{Each tag contains one column name: tag "$clause" (}
99
+                  . _subname . ")";
100 100
         }
101 101
 
102 102
         my $column = $columns->[0];
... ...
@@ -105,7 +105,7 @@ sub _parse {
105 105
         }
106 106
         
107 107
         my $safety = $self->safety_character;
108
-        croak qq{"$column" is not safety column name (DBIx::Custom::Where::to_string)}
108
+        croak qq{"$column" is not safety column name (} . _subname . ")"
109 109
           unless $column =~ /^[$safety\.]+$/;
110 110
         
111 111
         # Column count up
... ...
@@ -131,8 +131,8 @@ sub _parse {
131 131
             $pushed = 1;
132 132
         }
133 133
         else {
134
-            croak "Parameter must be hash reference or undfined value "
135
-                . "(DBIx::Custom::Where::to_string)"
134
+            croak "Parameter must be hash reference or undfined value ("
135
+                . _subname . ")"
136 136
         }
137 137
         return $pushed;
138 138
     }
+17 -2
t/dbix-custom-core-sqlite.t
... ...
@@ -1328,7 +1328,7 @@ $dbi->method({one => sub { 1 }});
1328 1328
 is($dbi->one, 1);
1329 1329
 
1330 1330
 eval{DBIx::Custom->connect()};
1331
-like($@, qr/dbh/);
1331
+like($@, qr/_connect/);
1332 1332
 
1333 1333
 $dbi = DBIx::Custom->connect($NEW_ARGS->{0});
1334 1334
 $dbi->execute($CREATE_TABLE->{0});
... ...
@@ -2149,4 +2149,19 @@ $dbi->select(
2149 2149
     wrap => 'select * from ('
2150 2150
 )
2151 2151
 };
2152
-like($@, qr/array/);
2152
+like($@, qr/array/);
2153
+
2154
+__END__
2155
+
2156
+test 'select() string where';
2157
+$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
2158
+$dbi->execute($CREATE_TABLE->{0});
2159
+$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
2160
+$dbi->insert(table => 'table1', param => {key1 => 2, key2 => 3});
2161
+$rows = $dbi->select(
2162
+    table => 'table1',
2163
+    column => 'key1',
2164
+    where => '{= key1} and {=key2}',
2165
+    param => {key1 => 1, key2 => 2}
2166
+)->fetch_hash_all;
2167
+is_deeply($rows, [{key1 => 1, key2 => 2}]);