Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 86213
Status: open
Priority: 0/
Queue: SQL-Statement

Owner: Nobody in particular
Requestors: mschwern [...]

Bug Information
Severity: (no value)
Broken in:
  • 1.404
  • 1.405
Fixed in: (no value)

Subject: SQL::Parser->dialect() silently discards new dialect.
As the attached test shows, the dialect cannot be set.  It is silently discarded without warning.  This is due to and that the dialect is always set on object construction.

This contradicts the documentation for dialect "Loading a new dialect configuration file erases all current parser features and resets them to those defined in the configuration file" and makes setting a new dialect anywhere else but with new impossible.
Subject: dialect.t
Download dialect.t
text/x-perl 209b
use strict; use warnings; use Test::More; use SQL::Parser; my $sp = SQL::Parser->new; my $orig_dialect = $sp->dialect; isnt $orig_dialect, "CSV"; $sp->dialect("CSV"); is $sp->dialect, "CSV"; done_testing;
Download (untitled) / with headers
text/plain 444b
I used your test on the first commit with a Makefile.PL (sometimes around 2005). $ perl -Mblib ./setdia.t ok 1 not ok 2 # Failed test at ./setdia.t line 13. # got: 'ANSI' # expected: 'CSV' 1..2 # Looks like you failed 1 test of 2. I agree, that documentation doesn't match behavior, and my personal intension would be to correct the documentation (dialect is only a getter after construction - setter only during construction).

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to