# x.xxxxx xxxx-xx-xx
# ----------------------------------------------------------
+* Fixed Pg parser - caching the compiled P::RD schema is a *very*
+ bad idea
+
# ----------------------------------------------------------
# 0.09006 2009-06-10
# ----------------------------------------------------------
$::RD_WARN = 1; # Enable warnings. This will warn on unused rules &c.
$::RD_HINT = 1; # Give out hints to help fix problems.
-my $parser; # should we do this? There's no programmic way to
- # change the grammar, so I think this is safe.
-
$GRAMMAR = q!
{ my ( %tables, @views, $table_order, $field_order, @table_comments) }
# -------------------------------------------------------------------
sub parse {
my ( $translator, $data ) = @_;
- $parser ||= Parse::RecDescent->new($GRAMMAR);
+ my $parser = Parse::RecDescent->new($GRAMMAR);
$::RD_TRACE = $translator->trace ? 1 : undef;
$DEBUG = $translator->debug;