Skip Menu |

This queue is for tickets about the DBD-Mock CPAN distribution.

Report information
The Basics
Id: 84495
Status: resolved
Priority: 0/
Queue: DBD-Mock

People
Owner: Nobody in particular
Requestors: DAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.48



Subject: no way to test ternary form of bind_param()
DBD::Mock::st::bind_param ignores its $attr parameter, so if a client uses the ternary form of $sth->bind_param($num, $val, $attr), there is no way to test the result. Better would be to store the pair [$val, $attr] into {bound_params}, or to add a new entry {bound_param_types} into StatementTrack.pm. Thanks in advance, Laurent D.
On Sun Apr 07 20:12:04 2013, DAMI wrote: Show quoted text
> DBD::Mock::st::bind_param ignores its $attr parameter, so if a client > uses the ternary form of $sth->bind_param($num, $val, $attr), there is > no way to test the result. > > Better would be to store the pair [$val, $attr] into {bound_params}, > or to add a new entry {bound_param_types} into StatementTrack.pm. > > Thanks in advance, Laurent D.
Hi, I've recently picked up support for DBD::Mock and I've had a look at your suggest for tracking the ternary form of bind_param. I've just committed some new functionality DBD::Mock's codebase which adds a bound_param_attrs method to StatementTrack along with a new entry of {mock_param_attrs}. The functionality will be in the next release (v1.48), in the meantime, if you want some more details about it then have a look at git repository: https://gitlab.com/scrapheap/DBD-Mock Regards, Jason.
On Sat Sep 07 15:37:06 2019, JLCOOPER wrote: Show quoted text
> On Sun Apr 07 20:12:04 2013, DAMI wrote:
> > DBD::Mock::st::bind_param ignores its $attr parameter, so if a client > > uses the ternary form of $sth->bind_param($num, $val, $attr), there > > is > > no way to test the result. > > > > Better would be to store the pair [$val, $attr] into {bound_params}, > > or to add a new entry {bound_param_types} into StatementTrack.pm. > > > > Thanks in advance, Laurent D.
> > > Hi, > I've recently picked up support for DBD::Mock and I've had a look at > your suggest for tracking the ternary form of bind_param. I've just > committed some new functionality DBD::Mock's codebase which adds a > bound_param_attrs method to StatementTrack along with a new entry of > {mock_param_attrs}. > > The functionality will be in the next release (v1.48), in the > meantime, if you want some more details about it then have a look at > git repository: https://gitlab.com/scrapheap/DBD-Mock > > Regards, > Jason.
Hi, DBD::Mock v1.48 was released at the end of last week (quickly followed by v1.49 that resolved some issues with old Perl versions). The new version includes support of the ternary form of bind_param. I'll resolve this case now, but feel free to open a new one if you find any issues it. Regards, Jason.