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 https://metacpan.org/source/REHSACK/SQL-Statement-1.405/lib/SQL/Parser.pm#L286 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.
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 |
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;