1
爲什麼我得到兩次「ANSI」而不是第一次「ANSI」,第二次是「AnyData」?如何在SQL :: Parser中設置方言?
#!/usr/bin/perl
use warnings;
use strict;
use 5.010;
use SQL::Parser;
my $parser = SQL::Parser->new();
my @dialects = $parser->list('dialects');
say "available dialects : @dialects"; # AnyData CSV ANSI
my $dialect = $parser->dialect;
say "Current dialect: $dialect"; # ANSI
my $dialect_name = 'AnyData';
$parser->dialect($dialect_name); # load a dialect configuration file
$dialect = $parser->dialect; # get the name of the current dialect
say "Current dialect: $dialect"; # ANSI