You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2004/10/01 05:05:04 UTC
cvs commit: modperl-2.0/t/lib/TestCommon Utils.pm
stas 2004/09/30 20:05:04
Added: t/lib/TestCommon Utils.pm
Log:
start working to remove code duplicates, moving them into a library
- add is_tainted function
Revision Changes Path
1.1 modperl-2.0/t/lib/TestCommon/Utils.pm
Index: Utils.pm
===================================================================
package TestCommon::Utils;
sub is_tainted {
my $data = shift;
eval { eval $data };
return ($@ && $@ =~ qr/Insecure dependency in eval/) ? 1 : 0;
}
1;
__END__
=head1 NAME
TestCommon::Utils - Common Test Utils
=head1 Synopsis
use TestCommon::Utils;
$b->read(my $data);
=head1 Description
Various handy testing utils
=head1 API
=head2 is_tainted()
is_tainted($data)
returns I<TRUE> if C<$data> is tainted, I<FALSE> otherwise
=cut
Re: cvs commit: modperl-2.0/t/lib/TestCommon Utils.pm
Posted by Stas Bekman <st...@stason.org>.
stas@apache.org wrote:
> stas 2004/09/30 20:05:04
>
> Added: t/lib/TestCommon Utils.pm
> Log:
> start working to remove code duplicates, moving them into a library
> - add is_tainted function
>
> Revision Changes Path
> 1.1 modperl-2.0/t/lib/TestCommon/Utils.pm
>
> Index: Utils.pm
> ===================================================================
> package TestCommon::Utils;
I'm not certain that this is the best namespace, as it may collide with
some future CPAN Test* modules. Mind you these modules (TestCommon::*,
there is also LogDiff) will never be seen by PAUSE and never installed,
they are just used internally.
So if you think we should use a safer top-level name, please let me know.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org