On Tue, 18 Sep 2001, Stas Bekman wrote:
 
> +use constant WARN_STYLE_NONE => 0;
> +use constant WARN_STYLE_PERL => 1;
> +use constant WARN_STYLE_C    => 2;

one thing to consider though, ModPerl::Code has
noedit_warning_{c,hash} and this comment:

#this is named hash after the `#' character
#rather than named perl, since #comments are used
#non-Perl files, e.g. Makefile, typemap, etc.

many of the genfile() calls are generating files that are not Perl code.
if you look at your patch, there's genfile called for mime.types, *.conf,
.gdb*, etc.  how about this, rather than a style argument to genfile(),
let genfile figure it out for you based on the file extension.

something like:

my %warnings = (
    html => sub {
        "<!-- @_ -->"
    },
    c   => sub {
        "/* @_ */"
    },
    default => sub {
        my $string = join '', @_;
        $string =~ s/^/\#/g;
        $string;
    },
);
$warnings{h} = $warnings{c};


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to