Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Tie::Filehandle::Preempt::Stdin 0.02

    Download button

    No screenshots available
    Downloads: 159  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    James E Keenan | More programs
    Perl Artistic License / FREE
    September 9th, 2010, 01:34 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::Filehandle::Preempt::Stdin description

    Preempt STDIN during testing

    Suppose a program requires manual input from the keyboard operator. How do we test that we have properly handled operator input? More specifically, how do we incorporate testing for user input in files built on Perl's standard testing apparatus (Test::Simple, Test::More, etc.)?

    Tie::Filehandle::Preempt::Stdin is a Perl module that offers one way to do it -- a relatively simple and unsophisticated todo it. The most difficult part is analyzing the program to be tested so that you recognize all the points at which input is needed via STDIN. This in turn requires an understanding of all the different branches your program flow can take in response to standard input. Once you know that, you construct a list of dummy data that will be fed to each test at the points the program, when put into production, would normally prompt for operator input. This list of dummy data 'pre-empts' standard input via a tie of filehandle STDIN; hence, the module's name.

    SYNOPSIS

     use Tie::Filehandle::Preempt::Stdin;
     @prompts = qw| alpha beta gamma |;
     $object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts;



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    preempt STDIN | Perl module | preempt | STDIN | testing

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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