Bit::FlipFlop

Facilitates the maintainance of one bit of state in Perl programs.
Download

Bit::FlipFlop Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Colin Meyer
  • Publisher web site:
  • http://search.cpan.org/~cmeyer/

Bit::FlipFlop Tags


Bit::FlipFlop Description

Facilitates the maintainance of one bit of state in Perl programs. Bit::FlipFlop is a Perl module that facilitates the maintainance of one bit of state in Perl programs.SYNOPSIS use Bit::FlipFlop; my $f = Bit::FlipFlop->new(set => sub { /start/ }, reset => sub { /end/ }); for () { $f->test; print "**leading edge** " if $f->lead_edge; print "number ", $f->series, ": $_" if $f->state; print "**trailing edge** " if $f->trail_edge; } # -- or -- #use Bit::FlipFlop my $f; for () { $f = /start/ .. /end/; print "**lead edge** " if $f == 1; print "number ", +$f, ": $_" if $f; print "**trailing edge** " if $f =~ /E/; }Maintaining one bit of state in a program can be a very useful thing. A Bit::FlipFlop does just that. The flip flop can be false (represented by the integer 0) or true (1). Requirements: · Perl


Bit::FlipFlop Related Software