Hyper-Developer

 view release on metacpan or  search on metacpan

bin/model_check.pl  view on Meta::CPAN

sub step_transition_content {
    my $config = shift;

    # build up steps_of hash and @transitions_from list 
    # with all steps and all transitions
    my @transitions_from = ();
    for my $step ($config->GroupMembers('Step')) {
        my $name = $step;
        $name =~s{\A Step \s}{}xms;
        if ($name =~m{\s}) {
            my ($from, $to) = split m{\s} , $name;
            push @transitions_from, $name; 
        } 
    }

    for my $transition (@transitions_from) {
        my @parameters = $config->Parameters("Step $transition") 
            ? $config->Parameters("Step $transition") 
            : ();
        
        my @invalid = grep { $_ ne 'condition' } @parameters;

bin/model_check.pl  view on Meta::CPAN

    my $config = shift;

    # build up steps_of hash and @transitions_from list 
    # with all steps and all transitions
    my %steps_of = ();
    my @transitions_from = ();
    for my $step ($config->GroupMembers('Step')) {
        my $name = $step;
        $name =~s{\A Step \s}{}xms;
        if ($name =~m{\s}) {
            my ($from, $to) = split m{\s} , $name;
            push @transitions_from, { from => $from, to => $to }; 
        } 
        else {
            $steps_of{ $name } = 1;
        }
    }
    
    # check wheter all transitions have a valid source and destination 
    for my $transition (@transitions_from) {
        warn "ERROR: Non-existant transition source $transition->{ from } "

bin/model_check.pl  view on Meta::CPAN

    }
    for my $step ($config->GroupMembers('Step')) {
        my $name = $step;
        $name =~s{\A Step \s}{}xms;
        next if ($name =~m{\s});
        my @action_from = defined $config->val( "Step $name", 'action')
            ? $config->val( "Step $name", 'action')
            : ();
        
        foreach my $action(@action_from) {
            my ($target, $source) = split m{=}, $action || $action;
            
            # only try if our target looks like identifier.identifier
            if ($target =~ s{ \A ([^\.]+) \. .+  \Z }{$1}xms ) {          
                warn "ERROR: Non-existant target $target specified in action $action in [Step $name]\n"
                    if not exists $controls_of{ $target };
            }    

            # only try if our sourcelooks like identifier.identifier            
            if ($source =~ s{ \A ([A-z][A-z0-9]+) \. .+ \Z}{$1}xms) {
                warn "ERROR: Non-existant source $source specified in action $action in [Step $name]\n"

lib/Hyper/Developer/Generator/Control/ContainerFlow.pm  view on Meta::CPAN

                  . '[qw('
                  . ( join q{ }, @{$item{variables}} )
                  . ")], $item{mixed});"
               }
             | method
               { "$item{method};" }
    });

    # return input converted to grammar
    my $result = eval {
        join "\n", map { $parser->line($_) } split m{\n}, $param;
    };

    throw("$@ Error generating action code near\n$param") if $@;

    return $result;
}

sub _create_condition_code :RESTRICTED {
    my $self   = shift;
    my $param  = shift;

lib/Hyper/Developer/Generator/Control/ContainerFlow.pm  view on Meta::CPAN

    });

    $parser->Replace(q{
        expr  : mixed logop expr
                { join q{ }, @item[1..3] }
              | mixed
    });

    # return input converted to grammar
    my $result = eval {
        join "\n", map { $parser->line($_); } split m{\n}, $param;
    };

    throw("$@ Error generating condition code near\n $param") if $@;

    return $result;
}

1;
__END__

lib/Hyper/Developer/Server.pm  view on Meta::CPAN


    eval {
        # Child
        print "content-type:text/html; charset=utf-8\n\n";
        my @flow_controls;
        my @container_controls;
        find(
            sub {
                m{.ini\Z} or return;
                my ($type, $service, $last_part)
                    = (split m{/}, $File::Find::name)[-3..-1];
                my ($usecase) = $last_part =~ m{(?: F|C)([^\.]+)\.ini}xms;

                my %value_of = (
                    service   => $service,
                    usecase   => $usecase,
                    is_broken => do {
                        $last_part =~ s{\.ini\Z}{}xms;
                        eval "use $namespace\::Control\::$type\::$service\::$last_part;";
                        warn "use $namespace\::Control\::$type\::$service\::$last_part;";
                        $@;



( run in 1.004 second using v1.01-cache-2.11-cpan-71847e10f99 )