Text::PromptBalanced

Text::PromptBalanced aid in creating CLI prompts that keep track of balanced text.
Download

Text::PromptBalanced Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jeffrey Goff
  • Publisher web site:
  • http://search.cpan.org/~jgoff/Text-PromptBalanced-0.02/PromptBalanced.pm

Text::PromptBalanced Tags


Text::PromptBalanced Description

Text::PromptBalanced aid in creating CLI prompts that keep track of balanced text. Text::PromptBalanced aid in creating CLI prompts that keep track of balanced text.SYNOPSIS use Text::PromptBalanced qw(balance_factory); ($state,$balance) = balance_factory( string => { type => 'toggle', open => '"' }, paren => { type => 'balanced', open => '(', close => ')', ignore_in => 'string' }, comment => { type =>' eol', open => ';', ignore_in => 'string' }, escape => { type => 'escape', open => '\' } ); while(< STDIN >) { my $cur_balance = $balance->($_); if($state->{string}==1) { print q } elsif($state->{paren} > 0) { print qq } elsif($cur_balance < 0) { warn "Unbalanced paren at character $cur_balance" } else { print q } }Requirements:· Perl


Text::PromptBalanced Related Software