/usr/lib/perl5/Params/ValidateXS.pm is in libparams-validate-perl 0.97-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | package Params::Validate;
BEGIN {
$Params::Validate::VERSION = '0.97';
}
use strict;
use warnings;
require XSLoader;
XSLoader::load(
'Params::Validate',
exists $Params::Validate::{VERSION}
? do { ${ $Params::Validate::{VERSION} } }
: 42
);
my $default_fail = sub {
require Carp;
Carp::confess( $_[0] );
};
{
my %defaults = (
ignore_case => 0,
strip_leading => 0,
allow_extra => 0,
on_fail => $default_fail,
stack_skip => 1,
normalize_keys => undef,
);
*set_options = \&validation_options;
sub validation_options {
my %opts = @_;
my $caller = caller;
foreach ( keys %defaults ) {
$opts{$_} = $defaults{$_} unless exists $opts{$_};
}
$OPTIONS{$caller} = \%opts;
}
}
sub _check_regex_from_xs {
return ( defined $_[0] ? $_[0] : '' ) =~ /$_[1]/ ? 1 : 0;
}
BEGIN {
*validate = \&_validate;
*validate_pos = \&_validate_pos;
*validate_with = \&_validate_with;
}
1;
# ABSTRACT: XS implementation of Params::Validate
=pod
=head1 NAME
Params::Validate - XS implementation of Params::Validate
=head1 VERSION
version 0.97
=head1 SYNOPSIS
See Params::Validate
=head1 DESCRIPTION
This is an XS implementation of Params::Validate. See the
Params::Validate documentation for details.
=head1 AUTHOR
Dave Rolsky, <autarch@urth.org> and Ilya Martynov <ilya@martynov.org>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky and Ilya Martynov.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
__END__
|