1SQL::Abstract::Util(3)User Contributed Perl DocumentationSQL::Abstract::Util(3)
2
3
4
6 SQL::Abstract::Util - Small collection of utilities for
7 SQL::Abstract::Classic
8
10 is_plain_value
11 Determines if the supplied argument is a plain value as understood by
12 this module:
13
14 · The value is "undef"
15
16 · The value is a non-reference
17
18 · The value is an object with stringification overloading
19
20 · The value is of the form "{ -value => $anything }"
21
22 On failure returns "undef", on success returns a scalar reference to
23 the original supplied argument.
24
25 · Note
26
27 The stringification overloading detection is rather advanced: it
28 takes into consideration not only the presence of a "" overload,
29 but if that fails also checks for enabled autogenerated versions of
30 "", based on either "0+" or "bool".
31
32 Unfortunately testing in the field indicates that this detection
33 may tickle a latent bug in perl versions before 5.018, but only
34 when very large numbers of stringifying objects are involved. At
35 the time of writing ( Sep 2014 ) there is no clear explanation of
36 the direct cause, nor is there a manageably small test case that
37 reliably reproduces the problem.
38
39 If you encounter any of the following exceptions in random places
40 within your application stack - this module may be to blame:
41
42 Operation "ne": no method found,
43 left argument in overloaded package <something>,
44 right argument in overloaded package <something>
45
46 or perhaps even
47
48 Stub found while resolving method "???" overloading """" in package <something>
49
50 If you fall victim to the above - please attempt to reduce the
51 problem to something that could be sent to the
52 SQL::Abstract::Classic developers (either publicly or privately).
53 As a workaround in the meantime you can set
54 $ENV{SQLA_ISVALUE_IGNORE_AUTOGENERATED_STRINGIFICATION} to a true
55 value, which will most likely eliminate your problem (at the
56 expense of not being able to properly detect exotic forms of
57 stringification).
58
59 This notice and environment variable will be removed in a future
60 version, as soon as the underlying problem is found and a reliable
61 workaround is devised.
62
63 is_literal_value
64 Determines if the supplied argument is a literal value as understood by
65 this module:
66
67 · "\$sql_string"
68
69 · "\[ $sql_string, @bind_values ]"
70
71 On failure returns "undef", on success returns an array reference
72 containing the unpacked version of the supplied literal SQL and bind
73 values.
74
75
76
77perl v5.32.0 2020-07-28 SQL::Abstract::Util(3)