Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Data::Validate 0.08

    Download button

    No screenshots available
    Downloads: 165  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Richard Sonnen | More programs
    Perl Artistic License / FREE
    November 9th, 2010, 20:55 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Data::Validate description

    Common data validation methods

    Data::Validate is a Perl module that collects common validation routines to make input validation, and untainting easier and more readable. Most of the functions are not much shorter than their direct perl equivalent (and are much longer in some cases), but their names make it clear what you're trying to test for.

    Almost all functions return an untainted value if the test passes, and undef if it fails. This means that you should always check for a defined status explicitly. Don't assume the return will be true. (e.g. is_integer(0))

    The value to test is always the first (and often only) argument.

    SYNOPSIS

     use Data::Validate qw(:math);
     
     if(defined(is_integer($suspect))){
     print "Looks like an integer\n";
     }
     
     my $name = is_alphanumeric($suspect);
     if(defined($name)){
     print "$name is alphanumeric, and has been untainted\n";
     } else {
     print "$suspect was not alphanumeric"
     }
     
     # or as an object
     my $v = Data::Validate->new();
     
     die "'foo' is not an integer" unless defined($v->is_integer('foo'));



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    data validation | validation methods | Perl module | data | validation | methods

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM