httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: [PATCH] dbmmanage, command-line arg for use of specific DB
Date Wed, 10 Mar 1999 10:10:45 GMT

In article <3.0.5.32.19990305131904.009b15c0@pop.ma.ultranet.com> you wrote:
> At 12:44 PM 3/3/99 -0800, Brian Behlendorf wrote:
>>
>[...]
> -#                               -ldb    -lndbm    -lgdbm
> -BEGIN { @AnyDBM_File::ISA = qw(DB_File NDBM_File GDBM_File) }
> +
>  use strict;
>  use Fcntl;
> -use AnyDBM_File ();
> +use Getopt::Std;
> +
> +# shorthand-to-real-name lookup
> +my %formats = ( "db", "DB_File",
> +                "ndbm", "NDBM_File",
> +                "gdbm", "GDBM_File" );
> +
> +my %opts;
> +getopt 'f:', \%opts;
> +if (my $dbm_class = $formats{$opts{'f'}}) {
> +    @AnyDBM_File::ISA = ($dbm_class);
> +}
> +require AnyDBM_File;
>[...]

What if no -f option is given at all?
As it looks to a default/fallback format is missing, isn't it?

PS: Additionally we could also add SDBM because some modules (mod_dav,
    mod_ssl) use this format.
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message