EvalServer/Language/Perl.pm

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 93.9% 31 / 33 CC 2 SCAR 2.2
CC
2
Cov
96%
evaluate
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« EvalServer/Language/Ruby.pm ↑ Summary EvalServer/Language/Deparse.pm »
1 package App::EvalServer::Language::Perl;
2 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 $App::EvalServer::Language::Perl::AUTHORITY = 'cpan:HINRIK';
4 }
5 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 $App::EvalServer::Language::Perl::VERSION = '0.08';
7 }
8  
9 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 # TODO: attempt to load the utf8/unicode libraries.
13 #use utf8;
14 #use charnames qw(:full);
15 #BEGIN {
16 # eval "\$\343\201\257 = 42";
17 # uc "\x{666}";
18 #}
19  
20 1 ▶sub evaluate {
Subroutine evaluate: called CC=2 SCAR=6.9
Pod undocumented
21 1 my ($package, $code) = @_;
22  
23 1 local $@ = undef;
24 1 local @INC = undef;
25 1 local $_ = undef;
26  
27 1 $code = "no strict; no warnings; package main; $code";
28 1 ▶ my $ret = eval $code;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 1 ▶ print STDERR $@ if length($@);
Branch: 1 branch
BranchTrueFalseTotal
if length $@ 0 1 1
31 1 return $ret;
32 }
33  
34 2 1;
35  
36 =encoding utf8
37  
38 =head1 NAME
39  
40 App::EvalServer::Language::Perl - Evaluate Perl code
41  
42 =head1 AUTHOR
43  
44 Hinrik E<Ouml>rn SigurE<eth>sson, hinrik.sig@gmail.com
45  
46 =head1 LICENSE AND COPYRIGHT
47  
48 Copyright 2010 Hinrik E<Ouml>rn SigurE<eth>sson
49  
50 This program is free software, you can redistribute it and/or modify
51 it under the same terms as Perl itself.
52  
53 =cut
« EvalServer/Language/Ruby.pm ↑ Summary EvalServer/Language/Deparse.pm »