Ron Savage schreef:
> Dr.Ruud:

>> So we're back at:
>>   /\A(?:mysql|pg)\z/i
>>   /\A(?i:mysql|pg)\z/
>
> [db_vendor()]
> In the case of 'DBI DSN' => 'dbi:Pg:dbname=staff', I store 'Pg'.
> In the case of 'DBI DSN' => 'dbi:ODBC:pg-staff', I store 'Pg'.
> [...]
> if ($self -> db_vendor() =~ /(?:mysql|Pg)/)
> [...]
> my($vendor) = $self -> db_vendor();
>
> if ( ($vendor eq 'mysql') || ($vendor eq 'Pg') )

That last variant is what I prefer as well, although I would write it a
bit different:

  my $vendor = $self -> db_vendor();

  if ( $vendor eq 'mysql' or $vendor eq 'Pg' )

But that difference is mainly at the source level, see:
  perl -MO=Deparse,x=7 -e 'if ( ($vendor eq q{mysql}) || ($vendor eq
q{Pg}) ){}'



> o This thread is closed, ended, finished, shut down, terminated, etc,
> as previously noted

Welcome to usenet.

-- 
Affijn, Ruud

"Gewoon is een tijger."

Reply via email to