blib/lib/Embperl/Recipe/Embperl.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 7 SCAR 36.8
CC
7
Cov
0%
get_recipe
56.0
BEGIN
2.0
BEGIN
2.0
CRAP 39.8
1  
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2015 Gerald Richter
6 # Embperl - Copyright (c) 2015-2023 actevy.io
7 #
8 # You may distribute under the terms of either the GNU General Public
9 # License or the Artistic License, as specified in the Perl README file.
10 #
11 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
12 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
13 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 #
15 ###################################################################################
16  
17  
18 package Embperl::Recipe::Embperl ;
19  
20 use strict ;
21 use vars qw{@ISA} ;
22  
23 no warnings "uninitialized" ;
24  
25 @ISA = ('Embperl::Recipe') ;
26  
27 # ---------------------------------------------------------------------------------
28 #
29 # Create a new recipe by converting request parameter
30 #
31 # ---------------------------------------------------------------------------------
32  
33  
34 sub get_recipe
35  
36 {
37 my ($class, $r, $recipe, $src, $syntax) = @_ ;
38  
39 my $self ;
40 my $param = $r -> component -> param ;
41 my @recipe ;
42  
43 if (!$src)
44 {
45 push @recipe, {'type' => ref ($param -> input)?'memory':($param -> subreq?'apoutfilter':'file') } ;
46 }
47 else
48 {
49 push @recipe, ref $src eq 'ARRAY'?@$src:$src ;
50 }
51  
52 push @recipe, {'type' => 'epparse', $syntax?(syntax => $syntax):() } ;
53 push @recipe, {'type' => 'epcompile', cache => 1 } ;
54 push @recipe, {'type' => 'eprun' } if ($param -> import < 0) ;
55  
56 return \@recipe ;
57 }
58  
59 1;
60  
61 __END__