blib/lib/Convert/UUlib.pm

filter: Statementstmt 44.7% 17 / 38 Branchbran 0.0% 0 / 36 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod 75.0% 3 / 4 totaltotal 26.1% 22 / 84 CC 19 SCAR 39.3
CC
19
Cov
23%
strencoding
72.0
strmsglevel
56.0
straction
42.0
CRAP 51.0
↑ Summary perlmulticore.h »
1 package Convert::UUlib;
2  
3 1 ▶use common::sense;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8 1 require DynaLoader;
9  
10 1 our $VERSION = 1.8;
11  
12 1 our @ISA = qw(Exporter DynaLoader);
13  
14 1 our @_consts = qw(
15 ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING
16  
17 FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA
18 FILE_NOEND FILE_OK FILE_READ FILE_TMPFILE
19  
20 MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING
21  
22 OPT_RBUF OPT_WBUF
23 OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT
24 OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB
25 OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE
26 OPT_VERSION OPT_REMOVE OPT_MOREMIME OPT_DOTDOT OPT_AUTOCHECK
27  
28 RET_CANCEL RET_CONT RET_EXISTS RET_ILLVAL RET_IOERR RET_NODATA
29 RET_NOEND RET_NOMEM RET_OK RET_UNSUP
30  
31 B64_ENCODED BH_ENCODED PT_ENCODED QP_ENCODED
32 XX_ENCODED UU_ENCODED YENC_ENCODED
33 );
34  
35 1 our @_funcs = qw(
36 Initialize CleanUp GetOption SetOption strerror SetMsgCallback
37 SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback
38 FNameFilter LoadFile GetFileListItem GetFileList RenameFile DecodeToTemp
39 RemoveTemp DecodeFile InfoFile Smerge QuickDecode EncodeMulti
40 EncodePartial EncodeToStream EncodeToFile E_PrepSingle
41 E_PrepPartial
42  
43 straction strencoding strmsglevel
44 );
45  
46 1 our @EXPORT = @_consts;
47 1 our @EXPORT_OK = @_funcs;
48 1 our %EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts);
49  
50 1 bootstrap Convert::UUlib $VERSION;
51  
52 # dummy function for compatiiblity with pre-1.7 versions
53 0 ▶sub Initialize { }
Subroutine Initialize: not called CC=1 SCAR=0.0
Pod undocumented
54  
55 # action code -> string mapping
56 0 ▶sub straction($) {
Subroutine straction: not called CC=6 SCAR=37.4
Pod documented
57 0 ▶ return 'copying' if $_[0] == &ACT_COPYING;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &ACT_COPYING 0 0 0
58 0 ▶ return 'decoding' if $_[0] == &ACT_DECODING;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &ACT_DECODING 0 0 0
59 0 ▶ return 'encoding' if $_[0] == &ACT_ENCODING;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &ACT_ENCODING 0 0 0
60 0 ▶ return 'idle' if $_[0] == &ACT_IDLE;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &ACT_IDLE 0 0 0
61 0 ▶ return 'scanning' if $_[0] == &ACT_SCANNING;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &ACT_SCANNING 0 0 0
62 0 'unknown';
63 }
64  
65 # encoding type -> string mapping
66 0 ▶sub strencoding($) {
Subroutine strencoding: not called CC=8 SCAR=42.8
Pod documented
67 0 ▶ return 'uuencode' if $_[0] == &UU_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &UU_ENCODED 0 0 0
68 0 ▶ return 'base64' if $_[0] == &B64_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &B64_ENCODED 0 0 0
69 0 ▶ return 'yenc' if $_[0] == &YENC_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &YENC_ENCODED 0 0 0
70 0 ▶ return 'binhex' if $_[0] == &BH_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &BH_ENCODED 0 0 0
71 0 ▶ return 'plaintext' if $_[0] == &PT_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &PT_ENCODED 0 0 0
72 0 ▶ return 'quoted-printable' if $_[0] == &QP_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &QP_ENCODED 0 0 0
73 0 ▶ return 'xxencode' if $_[0] == &XX_ENCODED;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &XX_ENCODED 0 0 0
74 0 'unknown';
75 }
76  
77 0 ▶sub strmsglevel($) {
Subroutine strmsglevel: not called CC=7 SCAR=40.3
Pod documented
78 0 ▶ return 'message' if $_[0] == &MSG_MESSAGE;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_MESSAGE 0 0 0
79 0 ▶ return 'note' if $_[0] == &MSG_NOTE;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_NOTE 0 0 0
80 0 ▶ return 'warning' if $_[0] == &MSG_WARNING;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_WARNING 0 0 0
81 0 ▶ return 'error' if $_[0] == &MSG_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_ERROR 0 0 0
82 0 ▶ return 'panic' if $_[0] == &MSG_PANIC;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_PANIC 0 0 0
83 0 ▶ return 'fatal' if $_[0] == &MSG_FATAL;
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] == &MSG_FATAL 0 0 0
84 0 'unknown';
85 }
86  
87 1 1;
88 __END__
↑ Summary perlmulticore.h »