Acme-FSM

 view release on metacpan or  search on metacpan

build_e7BB/Build_iu8t.pm  view on Meta::CPAN

__PACKAGE__->add_property( q|buildq85v_files| => { } );

# FIXME:202502131915:whynot: Instead of B<add_build_element()> it should piggy-back on B<ACTION_docs()>.  Too bad.
sub process_buildq85v_files        {
    my( $qrXNrk, $agxDOs ) = @_;
    $agxDOs eq q|buildq85v|        or die qq|!utOr! wrong target ($agxDOs)\n|;
# WORKAROUND:202502091853:whynot: Hard to imagine B<P::T> being missing, but that's one way to avoid to list it in I<%build_requires> (because C<buildq85v> isn't a target outside of development.
    require Pod::Text         or die qq|!wmvU! [require](Pod::Text) failed\n|;
# NOTE:202502091918:whynot: v3.17
    my $qrSl5y = Pod::Text->new(
      alt => !0, errors => q|stderr|, sentence => !0 );
    my @lmGCWI;
    while( my( $hprHQ0, $hqVg4r ) = each %{ $qrXNrk->buildq85v_files } ) {
        my $hkTrsQ = ( stat $hprHQ0 )[9];
        defined $hkTrsQ               or die qq|!0lnO! [stat]($hprHQ0): $!\n|;
        my $hkVGdJ = -e $hqVg4r ? ( stat $hqVg4r )[9] : 0;
        defined $hkVGdJ               or die qq|!R6ZO! [stat]($hqVg4r): $!\n|;
        $hkTrsQ < $hkVGdJ and next;
        open my $hpNrEp, q|<|, $hprHQ0                                  or die
          qq|!nUAe! [open]($hprHQ0): $!\n|;
        open my $hqrXZZ, q|>|, $hqVg4r                                  or die

lib/FSM.pm  view on Meta::CPAN

While straightforward I<[turn]>s (such as C<tturn>, C<fturn>, and such) could
be in fact queried through L<B<fst()> method|/fst()> turn map needs bit more
sophisticated handling;
and that's what B<turn()> does;
in fact asking for C<turns> will result in B<croak>.
I<$action> of C<START> and C<CONTINUE> special states suffer implicit
defaulting to empty string.

=item anything else

No arguments or more then two is an non-fatal error.
Returns C<undef> (with B<carp>).

=back

=cut

# TODO:202202172011:whynot: As soon as supported perl is young enough change it to smartmatch, plz.
my %special_turns = map { $_ => 1 } qw| eturn uturn tturn fturn |;
# TODO:202202162030:whynot: Consider more elaborate (informative) returns.
sub turn {

lib/FSM.pm  view on Meta::CPAN

Each object has it's own,
however it's inherited when objects are copied.

Defined levels are:

=over

=item C<0>

Nothing at all.
Even error reporting is suppressed.

=item C<1>

Default.
Errors of here-be-dragons type.

=item C<2>

Basic diagnostics for callbacks.

lib/FSM.pm  view on Meta::CPAN


=item C<[fst]: creating {%s}{%s} entry>

B<(basic trace)>, L<B<fst()> method|/fst()>.
New entry named I<%s> (the latter) has been created in record named I<%s> (the
former).

=item C<[fst]: no args>

B<(warning)>, L<B<fst()> method|/fst()>.
No arguments, it's an error.
However, instead of promptly dieing, C<undef> is returned
in blind hope this will be devastating enough.

=item C<[fst]: (%s): no such {fst} record>

B<(warning)>, L<B<fst()> method|/fst()>.
Requested entry I<%s> is missing.
State record ought to exist beforehand for any usecase except
L<record creation|/set {state} of specific $state>.

lib/FSM.pm  view on Meta::CPAN


B<(croak)>, L<B<turn()> method|/turn()>.
There was request for I<[turn]> I<%s> (the latter) of I<$state> I<%s> (the
former).
While I<{state}> record has been found and is OK,
there is no such I<$rule>.

=item C<[turn]: no args>

B<(warning)>, L<B<turn()> method|/turn()>.
No argumets, it's an error.

=item C<[turn]: too many args (%i)>

B<(warning)>, L<B<turn()> method|/turn()>.
There's no way to handle that many (namely: I<%i>) arguments.

=item C<[verify]: {%s}{%s}: %s !isa defined>

B<(croak)>, L<B<verify()> method|/verify()>.
I<$rc> queried



( run in 0.332 second using v1.01-cache-2.11-cpan-74e6d1fb12f )