nekokak/p5-Teng — pull request #132 by nobuoka (2014-07-10 10:16:41+00:00)
Title: Enable to insert unblessed values with strict-mode SQL::Maker

Currently, `Teng` can be used with strict-mode `SQL::Maker`.

* http://lowreal.net/2014/07/02/2

When we try to insert unblessed values using `Teng->insert` method, the `SQL::Maker` instance throws following error.

> cannot pass in an unblessed ref as an argument in strict mode at /home/nobuoka/Documents/perl/p5-Teng/lib/Teng.pm line 330.

* I wrote test: https://github.com/nobuoka/p5-Teng/compare/nekokak:master...fix/insert_normal_value_with_strict_sql_builder#diff-4f0e50f11e8acd89f8a0b5a3a8da1379R19

This is because

* the `Teng#do_insert` method sets an arrayref to a value of hashref for the second argument of `SQL::Maker#insert` method through the `_bind_sql_type_to_args` method ( https://github.com/nekokak/p5-Teng/blob/master/lib/Teng.pm#L303-314 ), and
* the `insert` method of strict-mode `SQL::Maker` throws error if some value of second-argument hashref is unblessed reference ( https://github.com/tokuhirom/SQL-Maker/blob/master/lib/SQL/Maker.pm#L99 ).

In order to enable to insert unblessed values with strict-mode `SQL::Maker`, I think `Teng#do_insert` method should set an blessed value (instead of arrayref) to a value of hashref for the second argument of `SQL::Maker#insert` method.

How about this? Thanks.