DBIx-Perlish
view release on metacpan or search on metacpan
query subs which were parsed by the module
to appear "covered".
This is done because the query subs are **never** executed,
and thus would normally be presented as "not covered" by
the [Devel::Cover](https://metacpan.org/pod/Devel%3A%3ACover) reporter.
Although a developer has no trouble deciding to ignore
such "red islands", he has to perform this decision every
time he looks at the coverage data, which tends to become
annoying rather quickly.
Currently, only statement and sub execution data are faked.
# DEPENDENCIES
The `DBIx::Perlish` module needs at least perl 5.14.
This module requires `DBI` to do anything useful.
In order to support the special handling of the `$dbh` variable,
`Keyword::Pluggable` needs to be installed. `Devel::Caller` is
needed for some magic, and `Pod::Markdown` is a developer dependency
for auto-generating README.md.
Other modules used used by `DBIx::Perlish` are included
into the standard Perl distribution.
# INCOMPATIBILITIES
Starting with version 0.54 the handling of key fields
(return -k $t->field) has incompatibly changed.
The previous behavior was to always return individual
results as hash references, even when only one
column (not counting the key fields) was specified
in the return statement. The current behavior is
to return simple values in this case.
If you use `DBIx::Perlish` together with [HTML::Mason](https://metacpan.org/pod/HTML%3A%3AMason),
you are likely to see warnings "Useless use of ... in void context"
that Mason helpfully converts into fatal errors.
To fix this, edit your `handler.pl` and add the following line:
$ah->interp->ignore_warnings_expr("(?i-xsm:Subroutine .* redefined|Useless use of .+ in void context)");
Here `$ah` must refer to an instance of `HTML::Mason::ApacheHandler`
class.
Mason is to blame for this, since it disregards
warnings' handlers installed by other modules.
# BACKWARD COMPATIBILITY
Perl 5.22 introduced certain changes to the way optree is constructed.
Some of these cannot be adequately treated, because whole constructs might be
simply optimized away before even they hit the parser (example: `join(1,2)` gets translated into constant `2`).
Known cases are not documented so far, but look in the tests for _optree\_version_ invocations
to see where these are found.
# BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to
`bug-dbix-perlish@rt.cpan.org`, or through the web interface at
[http://rt.cpan.org](http://rt.cpan.org).
A number of features found in many SQL dialects is not supported.
The module cannot handle more than 100 tables in a single
query sub.
Although variables closed over the query sub can be used
in it, only simple scalars, hash elements, and dereferenced
hasref elements are understood at the moment.
If you would like to see something implemented,
or find a nice Perlish syntax for some SQL feature,
please let me know!
# AUTHOR
Anton Berezin `<tobez@tobez.org>`
# ACKNOWLEDGEMENTS
Special thanks to Dmitry Karasik,
who contributed code and syntax ideas on several occasions,
and with whom I spent considerable time discussing
this module.
I would also like to thank
Henrik Andersen,
Mathieu Arnold,
Phil Regnauld,
and Lars Thegler,
for discussions, suggestions, bug reports and code contributions.
This work is in part sponsored by Telia Denmark.
# SUPPORT
There is also the project website at
http://dbix-perlish.tobez.org/
# LICENSE AND COPYRIGHT
Copyright (c) 2007-2013, Anton Berezin `<tobez@tobez.org>`. 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.
( run in 2.206 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )