in reply to CGI::Safe to CPAN
Well,
my system doesn't have a /bin/sh nor /bin nor /usr/bin. I hate modules that want you to edit the global module source code to provide reasonable behavior.$ENV{ PATH } = '/bin:/usr/bin'; # or whatever you need $ENV{ SHELL } = '/bin/sh' if exists $ENV{SHELL};
I'd expect a CGI::Safe module to untaint parameters (defaulting to only /(\w[-\w.]+)/ but allowing alternates). Based on what this does, I see no point in having CGI::Safe to inherit from CGI.pm. I'd rather move the new() functionality into import() and have your module work via:
And no, that "r" isn't a typo. (:use CGI qw( :standard ); use CGI::Safer( POST_MAX=>1024*1024 ); my $q= CGI->new();
Update: I'm not suggesting that people should use both the OO and functional interfaces to CGI.pm at the same time. I'm just giving examples of the two cases in one short bit of example code.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: (tye)Re: CGI::Safe to CPAN
by Ovid (Cardinal) on Nov 09, 2001 at 03:36 UTC | |
by tye (Sage) on Nov 09, 2001 at 04:16 UTC |