blib/lib/Term/Menus.pm

filter: Statementstmt 3.6% 140 / 3869 Branchbran 1.1% 27 / 2344 Conditioncond 0.6% 12 / 1960 MC/DCmcdc 0.0% 0 / 1067 Subroutinesub 38.8% 21 / 54 Podpod 12.5% 3 / 24 totaltotal 2.1% 203 / 9318 CC 1916 SCAR 137.9
CC
1916
Cov
2%
pick
1536360.0
Menu
28730.0
BEGIN
12438.7
CRAP 970307.3
↑ Summary
1 package Term::Menus;
2
3 # Menus.pm
4 #
5 # Copyright (C) 2000-2024
6 #
7 # by Brian M. Kelly. <Brian.Kelly@fullautosoftware.net>
8 #
9 # You may distribute under the terms of the GNU Affero General
10 # Public License, as specified in the LICENSE file.
11 # <http://www.gnu.org/licenses/agpl.html>.
12 #
13 # http://www.fullautosoftware.net/
14
15 ## See user documentation at the end of this file. Search for =head
16
17 1 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.6
18 1 ▶ *NEW_PERL = ($] >= 5.010) ? sub(){1} : sub(){0};
Branch: 1 branch
BranchTrueFalseTotal
$] >= 5.01 ? : 1 0 1
19 }
20
21 1 our $VERSION = '3.041';
22
23
24 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
25
26 1 my $menu_return_debug=0;
27
28 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 ## Module export.
31 1 require Exporter;
32 1 our @ISA = qw(Exporter);
33 1 ▶use vars qw(@EXPORT @EXPORT_OK %term_input %test %Dump %tosspass %b
Subroutine BEGIN: called CC=1 SCAR=0.0
34 %blanklines %parent_menu %Hosts %fa_code %canload %setsid
35 %VERSION %SetTerminalSize %SetControlChars %find_Selected
36 %clearpath %noclear %ReadKey %local_hostname %BEGIN %ISA
37 %editor %__ANON__ %data_dump_streamer %ReadMode %filechk
38 %fa_conf %transform_pmsi %termwidth %a %tm_menu %fa_code
39 %DumpVars %DumpLex %fullauto %delete_Selected %timeout
40 %pick %termheight %EXPORT_OK %ReadLine %fa_login %Menu
41 %fa_host %fa_menu %abs_path $fa_code %log %FH %AUTOLOAD
42 %get_all_hosts %hostname %GetSpeed %get_subs_from_menu
43 %passwd_file_loc %run_sub %GetTerminalSize %escape_quotes
44 %GetControlChars %numerically %rawInput %transform_sicm
45 %return_result $MenuMap %get_Menu_map_count %MenuMap %facall
46 %get_Menu_map %check_for_dupe_menus %EXPORT_FAIL %EXPORT
47 %import $new_user_flag %new_user_flag %DB_ENV_DSYNC_LOG
48 %DB_LOCK_PUT %DB_ST_IS_RECNO &DB_JOINENV %DB_LOCK_INHERIT
49 %DB_VERB_REP_SYSTEM %DB_VERSION_MISMATCH %DB_ENV_STANDALONE
50 %DB_LOG_VERIFY_ERR %DB_EVENT_REG_ALIVE %DB_XA_CREATE
51 %DB_VERB_REP_ELECT %DB_REP_JOIN_FAILURE %DB_DELIMITER
52 %DB_ENV_TXN %DB_ENV_RPCCLIENT %DB_MPOOL_CLEAN %DB_BTREEOLDVER
53 %DB_TEMPORARY %DB_REPMGR_ACKS_ONE %DB_OLD_VERSION %padwalker
54 %DB_TEST_POSTLOGMETA %DB_SET_RECNO %DB_SA_UNKNOWNKEY
55 %DB_MAX_RECORDS %DB_LOCK_CONFLICT %DB_REP_NEWMASTER %banner
56 %DB_LOCK_FREE_LOCKER %DB_POSITIONI %DB_VERB_FILEOPS
57 %DB_LOCK_DEFAULT %DB_REP_ANYWHERE %DB_REPMGR_CONF_2SITE_STRICT
58 %DB_AUTO_COMMIT %DB_TXN_NOWAIT %DB_STAT_LOCK_PARAMS %pw
59 %DB_REP_CONF_NOWAIT %DB_OK_RECNO %DB_SEQ_WRAPPED %test_hashref
60 %DB_MUTEX_LOCKED %DB_BEFORE %DB_EVENT_REP_MASTER_FAILURE
61 %DB_QUEUE %DB_TXN_LOCK_OPTIMISTIC %DB_REP_UNAVAIL %eval_error
62 %DB_FOREIGN_CASCADE %DB_NOOVERWRITE %DB_REP_CONF_AUTOINIT
63 %LOGREC_OP %DB_RUNRECOVERY %DB_UNREF %DB_REPMGR_ISPEER
64 %DB_VERIFY_BAD %DB_STAT_NOERROR %DB_ENV_LOG_AUTOREMOVE
65 %DB_REP_PAGELOCKED %DB_ST_RECNUM %DB_ORDERCHKONLY %DB_JOINENV
66 %DB_PRIORITY_VERY_LOW %DB_BTREEMAGIC %DB_LOCK_NOTHELD
67 %DB_QAMOLDVER %DB_TEST_POSTSYNC %DB_LOG_AUTO_REMOVE
68 %DB_BTREEVERSION %DB_GET_BOTHC %DB_ENV_RPCCLIENT_GIVEN
69 %DB_CREATE %DB_ARCH_DATA %DB_VERB_WAITSFOR %DB_INIT_REP
70 %DB_ENV_RECOVER_FATAL %DB_LOCK_GET_TIMEOUT %DB_STAT_CLEAR
71 %DB_REP_FULL_ELECTION %DB_VERB_REP_LEASE %DB_REGISTERED
72 %DB_APPLY_LOGREG %DB_REP_HANDLE_DEAD %DB_NOORDERCHK
73 %DB_HEAP_RID_SZ %DB_VERIFY_PARTITION %DB_THREADID_STRLEN
74 %DB_FIRST %DB_REPMGR_CONF_ELECTIONS %DB_SEQ_DEC
75 %DB_REP_CONF_INMEM %DB_MUTEX_ALLOCATED %DB_JOIN_ITEM
76 %DB_REP_CONF_NOAUTOINIT %DB_REPMGR_DISCONNECTED
77 %DB_DUPSORT %DB_TXN_POPENFILES %DB_LOCK_RW_N %NEW_PERL
78 %DB_TXN_NOT_DURABLE %DB_LOCK_NORUN %DB_REP_CONF_BULK
79 %DB_STAT_SUBSYSTEM %DB_USERCOPY_GETDATA %DB_LOCK_TRADE
80 %DB_COMMIT %DB_LOG_AUTOREMOVE %DB_MPOOL_TRY %DB_WRITEOPEN
81 %DB_STAT_LOCK_CONF %DB_CLIENT %DB_ENV_TIME_NOTGRANTED
82 %DB_REPFLAGS_MASK %DB_ENV_NOPANIC %DB_DUPCURSOR
83 %DB_ENV_APPINIT %DB_LOGFILEID_INVALID %DB_LOCKMAGIC
84 %DB_STAT_MEMP_HASH %DB_REP_FULL_ELECTION_TIMEOUT
85 %DB_TXN_CKP %DB_QAMVERSION %DB_EVENT_REP_CLIENT
86 %DB_NOCOPY %DB_TXNVERSION %LOGREC_PGLIST %DB_RENAMEMAGIC
87 %DB_REP_DUPMASTER %DB_OPEN_CALLED %DB_PAGE_NOTFOUND
88 %DB_VERB_DEADLOCK %DB_TXN_FORWARD_ROLL %DB_MULTIVERSION
89 %DB_LOCK_TIMEOUT %DB_JOIN_NOSORT %DB_NEEDSPLIT
90 %DB_SET_TXN_NOW %DB_TXN_OPENFILES %DB_TEST_POSTOPEN
91 %DB_RECORD_LOCK %DB_TEST_PREOPEN %DB_RPC_SERVERVERS
92 %DB_PRINTABLE %DB_VERB_REPLICATION %DB_MULTIPLE
93 %DB_COMPACT_FLAGS %DB_KEYEXIST %DB_PRIORITY_VERY_HIGH
94 %DB_NOERROR %DB_VERSION_RELEASE %DB_USE_ENVIRON
95 %DB_LOG_VERIFY_DBFILE %DB_TEST_ELECTSEND %DB_TXN_REDO
96 %DB_DURABLE_UNKNOWN %DB_ARCH_LOG %DB_QAMMAGIC
97 %DB_TIMEOUT %DB_VERB_REPMGR_MISC %DB_REP_PAGEDONE
98 %DB_LOCK_PUT_OBJ %DB_VERSION_FAMILY %DB_OK_BTREE
99 %DB_MAX_PAGES %DB_RDONLY %DB_CACHED_COUNTS
100 %DB_CKP_INTERNAL %DB_LOG_IN_MEMORY %DB_LOCK_GET
101 %DB_AGGRESSIVE %DB_STAT_LOCK_LOCKERS %DB_LOCKVERSION
102 %DB_PRIORITY_DEFAULT %DB_ENV_REP_MASTER %DB_FAILCHK
103 %DB_ENV_LOG_INMEMORY %DB_LOG_VERIFY_FORWARD
104 %DB_LOG_VERIFY_WARNING %DB_IGNORE_LEASE %DB_BACKUP_CLEAN
105 %DB_ENV_DBLOCAL %DB_GET_BOTH_RANGE %DB_FOREIGN_ABORT
106 %DB_REP_PERMANENT %DB_MPOOL_NOFILE %DB_LOG_BUFFER_FULL
107 %DB_ENV_MULTIVERSION %DB_RPC_SERVERPROG %DB_MPOOL_DIRTY
108 %DB_REP_NOBUFFER %DB_USE_ENVIRON_ROOT %DB_LOCK_CHECK
109 %DB_PREV_NODUP %DB_ST_TOPLEVEL %DB_PAGEYIELD %DB_EXCL
110 %DB_UPGRADE %DB_INORDER %DB_YIELDCPU %DB_ENV_DSYNC_DB
111 %DB_REP_ELECTION %DB_LOCK_RIW_N %DB_PAGE_LOCK
112 %DB_TXN_SYNC %DB_ST_DUPSORT %DB_LOG_SILENT_ERR
113 %DB_MPOOL_UNLINK %LOGREC_PGDBT %DB_DIRECT %DB_CHKSUM
114 %DB_ENV_OVERWRITE %DB_TXN_LOG_UNDO %DB_INIT_TXN
115 %DB_REP_CHECKPOINT_DELAY %DB_TEST_ELECTVOTE2
116 %DB_TEST_ELECTINIT %DB_EID_BROADCAST %DB_DELETED
117 %DB_REPMGR_ACKS_QUORUM %DB_ENV_LOCKDOWN
118 %DB_MUTEXDEBUG %DB_FREE_SPACE %DB_VERB_REGISTER
119 %DB_MPOOL_EDIT %DB_NORECURSE %DB_TEST_ELECTVOTE1
120 %DB_PRIORITY_LOW %DB_EVENT_REP_PERM_FAILED
121 %DB_SET_RANGE %DB_FORCE %LOGREC_LOCKS %DB_RENUMBER
122 %DB_REP_CONNECTION_RETRY %DB_MPOOL_PRIVATE
123 %DB_SEQUENCE_OLDVER %DB_LOG_CHKPNT %DB_FREELIST_ONLY
124 %DB_VERB_REP_MISC %DB_ENV_REGION_INIT %DB_RENUMBER
125 %DB_TXN_BACKWARD_ROLL %DB_LOCK_ABORT %DB_LOG_RESEND
126 %DB_ENV_REF_COUNTED %DB_DONOTINDEX %DB_NOMMAP
127 %DB_LOCK_UPGRADE %DB_REP_STARTUPDONE %DB_NEXT_DUP
128 %DB_ENV_OPEN_CALLED %DB_LOGVERSION_LATCHING
129 %DB_REP_ELECTION_RETRY %DB_VERB_REP_TEST
130 %DB_VERB_REP_MSGS %DB_debug_FLAG %DB_LOG_DSYNC
131 %DB_DSYNC_LOG %DB_GET_BOTH_LTE %DB_TXN_LOG_VERIFY
132 %DB_LOCK_RANDOM %DB_KEYEMPTY %DB_DIRECT_LOG
133 %DB_LOG_ZERO %DB_ENV_REP_LOGSONLY %DB_NOSYNC
134 %DB_LOG_VERIFY_INTERR %DB_SHALLOW_DUP %DB_SET
135 %DB_LOCK_SET_TIMEOUT %DB_UPDATE_SECONDARY
136 %DB_THREAD %DB_USERCOPY_SETDATA %DB_ASSOC_CREATE
137 %DB_MUTEXLOCKS %DB_LOGOLDVER %DB_TXN_LOCK_MASK
138 %DB_REGION_NAME %DB_NOLOCKING %DB_MPOOL_CREATE
139 %DB_INIT_MPOOL %DB_CURLSN %DB_LOG_PERM %DB_WRITELOCK
140 %DB_ENV_FAILCHK %DB_EVENT_REP_NEWMASTER
141 %DB_JAVA_CALLBACK %DB_OVERWRITE_DUP %DB_RPCCLIENT
142 %DB_ENV_CREATE %DB_ENV_THREAD %DB_PR_HEADERS
143 %DB_TXN_APPLY %DB_WRITELOCK %DB_VRFY_FLAGMASK
144 %DB_REP_LOCKOUT %DB_EVENT_NOT_HANDLED %DB_NEXT
145 %DB_TIME_NOTGRANTED %DB_LOG_INMEMORY %LOGREC_Done
146 %DB_LOG_DIRECT %DB_ALREADY_ABORTED %DB_INCOMPLETE
147 %DB_MUTEX_LOGICAL_LOCK %DB_TXN_LOG_MASK %DB_PREV
148 %DB_STAT_MEMP_NOERROR %DB_CL_WRITER %DB_DSYNC_DB
149 %DB_ENV_TXN_NOWAIT %DB_REGISTER %DB_ODDFILESIZE
150 %DB_FAST_STAT %DB_LOG_NOT_DURABLE %DB_CDB_ALLDB
151 %DB_LOG_NOCOPY %DB_INIT_CDB %DB_RECORDCOUNT
152 %LOGREC_DATA %DB_NEXT_DUP %DB_SET_LOCK_TIMEOUT
153 %DB_PERMANENT %DB_TXN_LOG_REDO %DB_CHECKPOINT
154 %DB_ENV_CDB_ALLDB %DB_EVENT_REP_JOIN_FAILURE
155 %DB_LOG_VERIFY_VERBOSE %DB_LOGCHKSUM %DB_BTREE
156 %DB_LOG_VERIFY_PARTIAL %DB_KEYFIRST %DB_EXTENT
157 %DB_TXN_SNAPSHOT %DB_REP_ISPERM %DB_NOPANIC
158 %DB_LOCK_UPGRADE_WRITE %DB_FOREIGN_CONFLICT
159 %DB_MPOOL_NEW %DB_TXN_UNDO %DB_REGION_MAGIC
160 %DB_PRIORITY_HIGH %DB_ENV_DIRECT_DB %LOGREC_HDR
161 %DB_RECOVER_FATAL %DB_LOCK_REMOVE %DB_LOGVERSION
162 %DB_GID_SIZE %DB_PRIORITY_UNCHANGED %LOGREC_HDR
163 %DB_LOGC_BUF_SIZE %DB_REVSPLITOFF %DB_LOCK_NOWAIT
164 %DB_SEQUENTIAL %DB_REGION_ANON %DB_ENV_NOMMAP
165 %DB_SEQUENCE_VERSION %DB_SYSTEM_MEM %DB_AFTER
166 %DB_REP_ELECTION_TIMEOUT %DB_STAT_ALL %DB_APPEND
167 %DB_HASHVERSION %DB_LOCK_OLDEST %DB_XIDDATASIZE
168 %DB_VERIFY_FATAL %DB_ASSOC_IMMUTABLE_KEY
169 %DB_SEQ_RANGE_SET %DB_REGION_INIT %DB_RECOVER
170 %DB_LOCK_MAXLOCKS %DB_REP_CONF_DELAYCLIENT
171 %DB_EVENT_REP_ELECTION_FAILED %DB_ENV_YIELDCPU
172 %DB_OK_QUEUE %DB_MULTIPLE_KEY %DB_DIRECT_DB
173 %DB_LOCK_DUMP %DB_TEST_PREDESTROY %DB_ENCRYPT
174 %DB_EID_INVALID %DB_LOCK_MINLOCKS %LOGREC_TIME
175 %LOGREC_DBOP %DB_ENV_REP_CLIENT %DB_SPARE_FLAG
176 %DB_TXNMAGIC %DB_LOCK_NOTEXIST %DB_REP_REREQUEST
177 %DB_VERB_REP_SYNC %DB_NO_AUTO_COMMIT %DB_PR_PAGE
178 %DB_EVENT_REP_DUPMASTER %DB_GET_BOTH %DB_HASH
179 %DB_TXN_BULK %DB_TEST_POSTLOG %DB_REP_LOGSONLY
180 %DB_ENV_TXN_NOT_DURABLE %DB_POSITION %DB_RECNUM
181 %DB_LOCKDOWN %DB_LOG_NO_DATA %DB_ST_DUPSET
182 %DB_REP_HEARTBEAT_SEND %DB_SET_TXN_TIMEOUT
183 %DB_REPMGR_ACKS_ALL_PEERS %DB_TEST_ELECTWAIT2
184 %DB_ENV_DATABASE_LOCKING %DB_GET_RECNO
185 %DB_ARCH_REMOVE %DB_LOCK_RECORD %DB_EVENT_PANIC
186 %DB_LOG_LOCKED %DB_LOCK_NOTGRANTED %DB_RMW
187 %DB_ENV_AUTO_COMMIT %DB_NEXT_NODUP %DB_SEQ_WRAP
188 %DB_LOCK_PUT_READ %DB_REP_ACK_TIMEOUT
189 %DB_VERB_CHKPOINT %DB_LOG_DISK %DB_HASHMAGIC
190 %DB_HASHOLDVER %DB_OK_HASH %DB_REP_NEWSITE
191 %DB_TEST_POSTRENAME %DB_ST_RELEN %DB_TXN_LOCK
192 %DB_NOSERVER_ID %DB_UNKNOWN %DB_ENV_LOGGING
193 %DB_EVENT_NO_SUCH_EVENT %DB_NODUPDATA
194 %DB_BUFFER_SMALL %DB_APP_INIT %DB_TXN_FAMILY
195 %DB_ENV_SYSTEM_MEM %DB_READ_UNCOMMITTED
196 %DB_MPOOL_DISCARD %DB_SNAPSHOT %DB_NOSERVER
197 %DB_REPMGR_CONNECTED %DB_VERSION_FULL_STRING
198 %DB_SWAPBYTES %DB_REP_MASTER %DB_SECONDARY_BAD
199 %DB_TXN_LOCK_2PL %DB_TXN_LOG_UNDOREDO
200 %DB_LOG_WRNOSYNC %DB_ENV_FATAL %DB_TRUNCATE
201 %DB_LOCK_PUT_ALL %DB_MUTEX_SELF_BLOCK
202 %DB_CURSOR_BULK %DB_VERSION_PATCH %DB_ENV_CDB
203 %DB_DATABASE_LOCK %DB_HANDLE_LOCK %DB_SET_LTE
204 %DB_LOG_VERIFY_BAD %DB_OPFLAGS_MASK %DB_PAD
205 %DB_SET_REG_TIMEOUT %DB_REP_BULKOVF
206 %DB_REP_CONF_LEASE %DB_INIT_LOCK %DB_NOTFOUND
207 %DB_TXN_PRINT %DB_INIT_LOG %DB_TEST_SUBDB_LOCKS
208 %DB_ARCH_ABS %DB_ST_DUPOK %DB_REP_IGNORE
209 %DB_REPMGR_PEER %DB_REPMGR_ACKS_NONE %LOGREC_DBT
210 %DB_WRNOSYNC %DB_VERSION_STRING %DB_ST_OVFL_LEAF
211 %DB_ENV_TXN_NOSYNC %DB_SA_SKIPFIRSTKEY %DB_FLUSH
212 %DB_REP_EGENCHG %DB_MPOOL_NEW_GROUP %DB_LOGMAGIC
213 %LOGREC_PGDDBT %DB_MPOOL_FREE %DB_READ_COMMITTED
214 %DB_ENV_NOLOCKING %DB_EVENT_REG_PANIC
215 %DB_TXN_NOSYNC %DB_CONSUME_WAIT %DB_CURRENT
216 %DB_REPMGR_ACKS_ALL %DB_REP_NOTPERM %DB_DEGREE_2
217 %LOGREC_POINTER %DB_REP_OUTDATED %DB_RDWRMASTER
218 %DB_ENV_USER_ALLOC %DB_CURSOR_TRANSIENT
219 %DB_FOREIGN_NULLIFY %DB_LOCK_SWITCH %DB_VERIFY
220 %DB_EVENT_REP_MASTER %DB_DIRTY_READ %LOGREC_DB
221 %DB_MPOOL_LAST %DB_CONSUME %DB_KEYLAST
222 %DB_LOCK_MINWRITE %DB_REP_HEARTBEAT_MONITOR
223 %DB_LOG_COMMIT %DB_VERB_RECOVERY %DB_TXN_WAIT
224 %DB_EVENT_REP_ELECTED %DB_FILE_ID_LEN
225 %DB_TEST_ELECTWAIT1 %DB_LOCK_EXPIRE %DB_LAST
226 %DB_DATABASE_LOCKING %DB_FCNTL_LOCKING
227 %DB_TXN_WRITE_NOSYNC %DB_ENV_NO_OUTPUT_SET
228 %DB_user_BEGIN %DB_EVENT_WRITE_FAILED
229 %DB_MPOOL_NOLOCK %DB_VERSION_MINOR %transform_mbii
230 %DB_REP_CREATE %DB_REP_DEFAULT_PRIORITY
231 %DB_REP_LEASE_TIMEOUT %DB_REP_CLIENT
232 %DB_TXN_LOCK_OPTIMIST %DB_LOCK_DEADLOCK
233 %DB_ENCRYPT_AES %DB_LOCK_MAXWRITE %DB_GETREC
234 %DB_MUTEX_THREAD %DB_ENV_PRIVATE %DB_PREV_DUP
235 %DB_TEST_PRERENAME %DB_PR_RECOVERYTEST
236 %DB_MPOOL_EXTENT %DB_FILEOPEN %DB_SALVAGE
237 %DB_CXX_NO_EXCEPTIONS %DB_LOCK_YOUNGEST
238 %DB_VERB_REPMGR_CONNFAIL %DB_REP_LOGREADY
239 %DB_ENV_TXN_WRITE_NOSYNC %DB_ENV_LOCKING
240 %DB_IMMUTABLE_KEY %DB_MUTEX_SHARED %DB_HEAP
241 %DB_CHKSUM_SHA1 %DB_ENV_TXN_SNAPSHOT
242 %DB_VERSION_MAJOR %DB_ENV_HOTBACKUP %transform_mboi
243 %DB_TEST_POSTDESTROY %DB_FORCESYNC %DB_DUP
244 %DB_NOSERVER_HOME %DB_SEQ_INC %DB_FIXEDLEN
245 %DB_LOG_VERIFY_CAF %DB_TXN_TOKEN_SIZE
246 %DB_VERB_FILEOPS_ALL %LOGREC_ARG %DB_RECNO
247 %DB_REP_LEASE_EXPIRED %DB_HOTBACKUP_IN_PROGRESS
248 %DB_ENV_DIRECT_LOG %DB_REPMGR_ACKS_ALL_AVAILABLE
249 %DB_WRITECURSOR %DB_STAT_LOCK_OBJECTS
250 %DB_TEST_RECYCLE %DB_TXN_ABORT %DB_PRIVATE
251 %DB_PANIC_ENVIRONMENT %DB_OVERWRITE
252 %DB_EVENT_REP_STARTUPDONE %DB_SURPRISE_KID
253 %DB_REPMGR_ACKS_ONE_PEER %DB_REP_HOLDELECTION
254 %DB_EVENT_REP_SITE_ADDED %DB_EVENT_REP_INIT_DONE
255 %DB_MEM_THREAD %DB_EVENT_REP_CONNECT_ESTD
256 %DB_ENV_NOFLUSH %DB_EVENT_REP_LOCAL_SITE_REMOVED
257 %DB_LEGACY %DB_GROUP_CREATOR %DB_EID_MASTER
258 %DB_HEAPVERSION %DB_OK_HEAP %DB_MEM_TRANSACTION
259 %DB_EVENT_REP_CONNECT_TRY_FAILED %DB_NOFLUSH
260 %DB_STAT_SUMMARY %DB_MEM_TRANSACTION %CARP_NOT
261 %DB_HEAPMAGIC %DB_REPMGR_NEED_RESPONSE
262 %DB_MEM_LOCKOBJECT %DB_MEM_LOGID %DB_MEM_LOCKER
263 %DB_INTERNAL_DB %DB_MEM_LOCK %DB_HEAPOLDVER
264 %DB_FAILCHK_ISALIVE %DB_BOOTSTRAP_HELPER
265 %DB_HEAP_FULL %DB_STAT_ALLOC %DB_LOCAL_SITE
266 %DB_NO_CHECKPOINT %DB_EVENT_REP_SITE_REMOVED
267 %DB_EVENT_REP_CONNECT_BROKEN %DB_INIT_MUTEX
268 %DB_VERB_BACKUP %DB_INTERNAL_PERSISTENT_DB
269 %DB_REP_CONF_AUTOROLLBACK %DB2_AM_INTEXCL
270 %DB2_AM_EXCL %DB_INTERNAL_TEMPORARY_DB
271 %DB_BACKUP_UPDATE %DB2_AM_NOWAIT %DB_BACKUP_SIZE
272 %DB_BACKUP_FILES %DB_BACKUP_WRITE_DIRECT
273 %DB_EVENT_REP_WOULD_ROLLBACK &DB_BACKUP_CLEAN
274 %DB_BACKUP_READ_COUNT %DB_BACKUP_SINGLE_DIR
275 %DB_LOCK_IGNORE_REC %DB_BACKUP_READ_SLEEP
276 %DB_BACKUP_NO_LOGS %DB_REP_WOULDROLLBACK
277 %DB_STREAM_WRITE %DB_REP_CONF_ELECT_LOGLENGTH
278 %list_module %DB_STREAM_READ %DB_LOG_BLOB
279 %DB_STREAM_SYNC_WRITE %DB_CHKSUM_FAIL
280 %DB_EVENT_REP_AUTOTAKEOVER_FAILED %DB_VERB_MVCC
281 %DB_REPMGR_ISVIEW %DB_MUTEX_PROCESS_ONLY
282 %transform_mbir %DB_EVENT_REP_INQUEUE_FULL
283 %DB_MUTEX_DESCRIBE_STRLEN %DB_FAILURE_SYMPTOM_SIZE
284 %DB_LOG_NOSYNC %DB_REPMGR_CONF_PREFMAS_CLIENT
285 %DB_SET_MUTEX_FAILCHK_TIMEOUT %DB_INTERNAL_BLOB_DB
286 %DB_EVENT_FAILCHK_PANIC %DB_EXIT_FAILCHK
287 %LOGREC_LONGARG %DB_EVENT_MUTEX_DIED
288 %DB_MUTEX_OWNER_DEAD %DB_STREAM_WRITE
289 %DB_REPMGR_CONF_PREFMAS_MASTER %DB_EXIT_FILE_EXISTS
290 %DB_MEM_EXTFILE_DATABASE %DB_EVENT_REP_AUTOTAKEOVER
291 %DB_FORCESYNCENV %SELECT %DB_REPMGR_CONF_FORWARD_WRITES
292 %DB_REPMGR_CONF_ENABLE_EPOLL %DB2_AM_MPOOL_OPENED
293 %DB_REP_WRITE_FORWARD_TIMEOUT %DB_META_CHKSUM_FAIL
294 %DB_MEM_REP_SITE %DB_LOG_EXT_FILE %DB_OFF_T_MAX
295 %DB_REPMGR_ISELECTABLE %DB_SLICE_CORRUPT
296 %DB_VERB_SLICE %DB_REPMGR_CONF_DISABLE_POLL
297 %DB_TXN_DISPATCH %DB_CONVERT %EPOLL %POLL
298 %DB_SYSTEM_MEM_MISSING %DB_REP_INELECT %DB_SLICED
299 %DB_REGION_MAGIC_RECOVER %DB_NOINTMP %HAVE_EPOLL
300 1 %DB_MEM_DATABASE %DB_MEM_DATABASE_LENGTH);
301
302 1 @EXPORT = qw(pick Menu get_Menu_map);
303
304 #####################################################################
305 #### ###
306 #### DEFAULT MODULE OF Term::Menus $tm_menu IS: ###
307 #### ###
308 #### ==> *NONE* <== If you want a different ###
309 #### ###
310 #### module to be the default, change $tm_menu variable below or ###
311 #### set the $tm_menu variable in the BEGIN { } block ###
312 #### of the top level script invoking &Menu(). (Advised) ###
313 #### ###
314 #####################################################################
315
316 1 our $tm_menu='';
317
318 # Example: our $tm_menu='my_menus.pm'; ###
319 ###
320 # See documentation for more info ###
321 ###
322 #################################################################
323
324 1 ▶use Config ();
Subroutine BEGIN: called CC=1 SCAR=0.0
325 1 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
326 1 ▶use Capture::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
327 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=6.0
328 0 ▶ our $filechk = sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
329 package filechk;
330 0 eval { die };
331 0 my $path=$@;
332 0 $path=~s/Died at (.*)Term\/Menus.pm.*$/$1/s;
333 0 chomp($path);
334 0 ▶ return 0 unless -e "$path$_[0]";
Branch: 1 branch
BranchTrueFalseTotal
unless -e "$path$_[0]" 0 0 0
335 0 return 1;
336 1 };
337 0 ▶ our $canload = sub {
Subroutine __ANON__: not called CC=4 SCAR=30.0
338 package canloadone;
339 0 eval { die };
340 0 my $path=$@;
341 0 $path=~s/Died at (.*)Term\/Menus.pm.*$/$1/s;
342 0 chomp($path);
343 0 my $cwd=Cwd::cwd();
344 0 ▶ return 0 if (!(-e "$path$_[0]") and !(-e "$cwd/$INC[0]/$_[0]"));
Branch: 1 branch
BranchTrueFalseTotal
unless -e "$path$_[0]" or -e "$cwd/$INC[0]/$_[0]" 0 0 0
Condition0%0/3
-e "$path$_[0]" or -e "$cwd/$INC[0]/$_[0]"
l!l&&r!l&&!r
000
MC/DC0%0/2
-e "$path$_[0]" or -e "$cwd/$INC[0]/$_[0]"
-e "$path$_[0]" -e "$cwd/$INC[0]/$_[0]"
Truth table0%0/3
A or B
A= -e "$path$_[0]"B= -e "$cwd/$INC[0]/$_[0]"
ABresult
1X1
011
000
345 0 eval { require $_[0] };
346 0 ▶ unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 0 0
347 0 return 1;
348 } else {
349 0 return 0;
350 }
351 1 };
352 }
353
354 1 ▶unless (defined caller(2) && -1<index caller(2),'FullAuto') {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined caller 2 and index(caller 2, "FullAuto") != -1) 1 0 1
Condition33%1/3
defined caller 2 and index(caller 2, "FullAuto") != -1
!ll&&!rl&&r
010
MC/DC0%0/2
defined caller 2 and index(caller 2, "FullAuto") != -1
defined caller 2 index(caller 2, "FullAuto") != -1
Truth table33%1/3
A and B
A= defined caller 2B= index(caller 2, "FullAuto") != -1
ABresult
0X0
100
111
355
356 ### NOTE: $tm_menu will *NOT* be used when Term::Menus
357 ### is used with Net::FullAuto. Set $fa_menu (below)
358 ### or $main::fa_menu when using Net::FullAuto.
359
360 1 ▶ if ($tm_menu) {
Branch: 2 branches
BranchTrueFalseTotal
if ($tm_menu) { } 0 1 1
elsif (defined $main::tm_menu) { } 0 1 1
361 0 ▶ unless ($Term::Menus::canload->($tm_menu)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (&$Term::Menus::canload($tm_menu)) 0 0 0
362 0 my $die="\n FATAL ERROR: The variable \$tm_menu is defined,\n".
363 " in the module file:\n\n".
364 " $INC{'Term/Menus.pm'}\n\n".
365 " but the value: $tm_menu does not\n".
366 " reference a module that can be loaded";
367 0 die $die;
368 }
369 } elsif (defined $main::tm_menu) {
370 0 ▶ if ($Term::Menus::canload->($main::tm_menu)) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$Term::Menus::canload($main::tm_menu)) { } 0 0 0
371 0 $tm_menu=$main::tm_menu;
372 } else {
373 0 my $die="\n FATAL ERROR: The variable \$tm_menu is defined,\n".
374 " but the value: $tm_menu does not\n".
375 " reference a module that can be loaded";
376 0 die $die;
377 }
378 }
379 1 ▶ if ($tm_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($tm_menu) 0 1 1
380 0 require $tm_menu;
381 0 my $tm=substr($tm_menu,
382 (rindex $tm_menu,'/')+1,-3);
383 0 import $tm;
384 }
385
386 }
387
388 ##############################################################
389 ##############################################################
390 #
391 # THIS BLOCK MARKED BY TWO LINES OF POUND SYMBOLS IS FOR
392 # SETTINGS NEEDED BY THE MODULE Net::FullAuto. IF YOU ARE
393 # USING Term::Menus OUTSIDE OF Net::FullAuto, YOU CAN
394 # SAFELY IGNORE THIS SECTION. (That's 'ignore' - not 'remove')
395 #
396
397 1 our $data_dump_streamer=0;
398 1 eval { require Data::Dump::Streamer };
399 1 ▶unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($@) 1 0 1
400 1 $data_dump_streamer=1;
401 1 import Data::Dump::Streamer;
402 }
403
404 #our $io_interactive=0;
405 #eval { require IO::Interactive };
406 #unless ($@) {
407 # $io_interactive=1;
408 # import IO::Interactive;
409 #}
410
411 1 ▶BEGIN { ## Begin Net::FullAuto Settings
Subroutine BEGIN: called CC=121 SCAR=94.3
412
413 1 eval { require Data::Dump::Streamer };
414 1 ▶ unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($@) 1 0 1
415 1 $data_dump_streamer=1;
416 1 import Data::Dump::Streamer;
417 }
418 1 ▶ unless (exists $INC{'Term/Menus.pm'}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $INC{"Term/Menus.pm"}) 0 1 1
419 0 foreach my $fpath (@INC) {
420 0 my $f=$fpath;
421 0 ▶ if (-e $f.'/Term/Menus.pm') {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $f . '/Term/Menus.pm') 0 0 0
422 0 $INC{'Term/Menus.pm'}=$f.'/Term/Menus.pm';
423 0 last;
424 }
425 }
426 }
427 1 my $vlin=__LINE__;
428 #####################################################################
429 #### ###
430 #### DEFAULT MODULE OF Net::FullAuto $fa_code IS: ###
431 #### ###
432 #### ==> Distro/fa_code_demo.pm <== If you want a different ###
433 #### ###
434 #### module to be the default, change $fa_code variable below or ###
435 #### set the $fa_code variable in the BEGIN { } block ###
436 #### of the top level script invoking Net::FullAuto. (Advised) ###
437 #### ###
438 #####################################################################
439 ###
440 1 our $fa_code=['Distro/fa_code_demo.pm', #<== Change Location Here ###
441 "From $INC{'Term/Menus.pm'}, Line: ".($vlin+13)]; ###
442 ###
443 #####################################################################
444
445 #####################################################################
446 #### ###
447 #### DEFAULT MODULE OF Net::FullAuto $fa_conf IS: ###
448 #### ###
449 #### ==> Distro/fa_conf.pm <== If you want a differnet ###
450 #### ###
451 #### module to be the default, change $fa_conf variable below or ###
452 #### set the $fa_conf variable in the BEGIN { } block ###
453 #### of the top level script invoking Net::FullAuto. (Advised) ###
454 #### ###
455 #####################################################################
456 ###
457 1 our $fa_conf=['Distro/fa_conf.pm', #<== Change Location Here ###
458 "From $INC{'Term/Menus.pm'}, Line: ".($vlin+30)]; ###
459 ###
460 #####################################################################
461
462 #####################################################################
463 #### ###
464 #### DEFAULT MODULE OF Net::FullAuto $fa_host IS: ###
465 #### ###
466 #### ==> Distro/fa_host.pm <== If you want a different ###
467 #### ###
468 #### module to be the default, change $fa_host variable below or ###
469 #### set the $fa_hosts_config variable in the BEGIN { } block ###
470 #### of the top level script invoking Net::FullAuto. (Advised) ###
471 #### ###
472 #####################################################################
473 ###
474 1 our $fa_host=['Distro/fa_host.pm', #<== Change Location Here ###
475 "From $INC{'Term/Menus.pm'}, Line: ".($vlin+47)]; ###
476 ###
477 #####################################################################
478
479 #####################################################################
480 #### ###
481 #### DEFAULT MODULE OF Net::FullAuto $fa_menu IS: ###
482 #### ###
483 #### ==> Distro/fa_menu_demo.pm <== If you want a different ###
484 #### ###
485 #### module to be the default, change $fa_menu variable below or ###
486 #### set the $fa_menu variable in the BEGIN { } block ###
487 #### of the top level script invoking Net::FullAuto. (Advised) ###
488 #### ###
489 #####################################################################
490 ###
491 1 our $fa_menu=['Distro/fa_menu_demo.pm', #<== Change Location Here ###
492 "From $INC{'Term/Menus.pm'}, Line ".($vlin+81)]; ###
493 ###
494 #####################################################################
495
496 1 our $fullauto=0;$new_user_flag=1;
497 1 ▶ if (defined caller(2) && -1<index caller(2),'FullAuto') {
Branch: 1 branch
BranchTrueFalseTotal
if (defined caller 2 and index(caller 2, "FullAuto") != -1) 0 1 1
Condition33%1/3
defined caller 2 and index(caller 2, "FullAuto") != -1
!ll&&!rl&&r
010
MC/DC0%0/2
defined caller 2 and index(caller 2, "FullAuto") != -1
defined caller 2 index(caller 2, "FullAuto") != -1
Truth table33%1/3
A and B
A= defined caller 2B= index(caller 2, "FullAuto") != -1
ABresult
0X0
100
111
498 0 $fullauto=1;
499 0 my $default_modules='';
500 0 ▶ unless ($main::fa_code && $main::fa_conf && $main::fa_host
Branch: 1 branch
BranchTrueFalseTotal
if ($main::fa_code and $main::fa_conf and $main::fa_host and $main::fa_menu) { } 0 0 0
Condition0%0/9
$main::fa_code and $main::fa_conf and $main::fa_host and $main::fa_menu
!ll&&!rl&&r
000
$main::fa_code and $main::fa_conf and $main::fa_host
!ll&&!rl&&r
000
$main::fa_code and $main::fa_conf
!ll&&!rl&&r
000
MC/DC0%0/4
$main::fa_code and $main::fa_conf and $main::fa_host and $main::fa_menu
$main::fa_code $main::fa_conf $main::fa_host $main::fa_menu
Truth table0%0/5
A and B and C and D
A= $main::fa_codeB= $main::fa_confC= $main::fa_hostD= $main::fa_menu
ABCDresult
0XXX0
10XX0
110X0
11100
11111
501 && $main::fa_menu) {
502 0 ▶ unless (exists $INC{'Net/FullAuto.pm'}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $INC{"Net/FullAuto.pm"}) 0 0 0
503 0 foreach my $fpath (@INC) {
504 0 my $f=$fpath;
505 0 ▶ if (-e $f.'/Net/FullAuto.pm') {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $f . '/Net/FullAuto.pm') 0 0 0
506 0 $INC{'Net/FullAuto.pm'}=$f.'/Net/FullAuto.pm';
507 0 last;
508 }
509 }
510 }
511 0 my $fa_path=$INC{'Net/FullAuto.pm'};
512 0 my $progname=substr($0,(rindex $0,'/')+1,-3);
513 0 substr($fa_path,-3)='';
514 0 ▶ my $username=getlogin || getpwuid($<);
Condition0%0/3
getlogin || getpwuid $<
l!l&&r!l&&!r
000
MC/DC0%0/2
getlogin || getpwuid $<
getlogin getpwuid $<
Truth table0%0/3
A || B
A= getloginB= getpwuid $<
ABresult
1X1
011
000
515 0 ▶ if (-f $fa_path.'/fa_global.pm') {
Branch: 1 branch
BranchTrueFalseTotal
if (-f $fa_path . '/fa_global.pm') 0 0 0
516 0 ▶ if (-r $fa_path.'/fa_global.pm') {
Branch: 1 branch
BranchTrueFalseTotal
if (-r $fa_path . '/fa_global.pm') { } 0 0 0
517 {
518 0 ▶ no strict 'subs';
Subroutine BEGIN: called CC=1 SCAR=0.2
519 0 require $fa_path.'/fa_global.pm';
520 0 ▶ $fa_global::berkeley_db_path||='';
Condition0%0/2
$fa_global::berkeley_db_path ||= ""
l!l
00
MC/DC0%0/1
$fa_global::berkeley_db_path ||= ""
$fa_global::berkeley_db_path
Truth table0%0/2
A
A= $fa_global::berkeley_db_path
Aresult
11
00
521 0 ▶ $fa_global::FA_Sudo||={};
Condition0%0/2
$fa_global::FA_Sudo ||= {}
l!l
00
MC/DC0%0/1
$fa_global::FA_Sudo ||= {}
$fa_global::FA_Sudo
Truth table0%0/2
A
A= $fa_global::FA_Sudo
Aresult
11
00
522 0 ▶ if (exists $fa_global::FA_Sudo->{$username}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $fa_global::FA_Sudo->{$username}) 0 0 0
523 0 $username=$fa_global::FA_Sudo->{$username};
524 }
525 0 ▶ if ($fa_global::berkeley_db_path &&
Branch: 1 branch
BranchTrueFalseTotal
if ($fa_global::berkeley_db_path and -d $fa_global::berkeley_db_path . 'Defaults') 0 0 0
Condition0%0/3
$fa_global::berkeley_db_path and -d $fa_global::berkeley_db_path . 'Defaults'
!ll&&!rl&&r
000
MC/DC0%0/2
$fa_global::berkeley_db_path and -d $fa_global::berkeley_db_path . 'Defaults'
$fa_global::berkeley_db_path -d $fa_global::berkeley_db_path . 'Defaults'
Truth table0%0/3
A and B
A= $fa_global::berkeley_db_pathB= -d $fa_global::berkeley_db_path . 'Defaults'
ABresult
0X0
100
111
526 -d $fa_global::berkeley_db_path.'Defaults') {
527 1 ▶ BEGIN { $Term::Menus::facall=caller(2);
Subroutine BEGIN: called CC=2 SCAR=7.2
528 1 ▶ $Term::Menus::facall||='' };
Condition50%1/2
$Term::Menus::facall ||= ""
l!l
10
MC/DC0%0/1
$Term::Menus::facall ||= ""
$Term::Menus::facall
Truth table50%1/2
A
A= $Term::Menus::facall
Aresult
11
00
529 1 ▶ use if (-1<index $Term::Menus::facall,'FullAuto'),
Subroutine BEGIN: called CC=1 SCAR=0.0
530 1 "BerkeleyDB";
531 0 ▶ my $dbenv = BerkeleyDB::Env->new(
Branch: 1 branch
BranchTrueFalseTotal
my $dbenv = "BerkeleyDB::Env"->new("-Home", $fa_global::berkeley_db_path . 'Defaults', "-Flags", "DB_K^MU_OTOOL") or die 'cannot open environment for DB: ' . $BerkeleyDB::Error . "\n", "", "" 0 0 0
532 -Home => $fa_global::berkeley_db_path.'Defaults',
533 -Flags => DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL
534 ) or die(
535 "cannot open environment for DB: ".
536 $BerkeleyDB::Error."\n",'','');
537 0 ▶ my $kind=(grep { /^--test$/ } @ARGV)?'test':'prod';
Branch: 1 branch
BranchTrueFalseTotal
grep({/^--test$/;} @ARGV) ? : 0 0 0
538 0 my $bdb = BerkeleyDB::Btree->new(
539 -Filename => "${progname}_${kind}_defaults.db",
540 -Flags => DB_CREATE,
541 -Env => $dbenv
542 );
543 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
544 0 $bdb = BerkeleyDB::Btree->new(
545 -Filename => "${progname}_${kind}_defaults.db",
546 -Flags => DB_CREATE|DB_RECOVER_FATAL,
547 -Env => $dbenv
548 );
549 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
550 0 die "Cannot Open DB ${progname}_${kind}_defaults.db:".
551 " $BerkeleyDB::Error\n";
552 }
553 }
554 0 ▶ if (exists $ENV{'SSH_CONNECTION'} &&
Branch: 3 branches
BranchTrueFalseTotal
if (exists $ENV{'SSH_CONNECTION'} and exists $ENV{'USER'} and $ENV{'USER'} ne $username) { } 0 0 0
elsif ($username eq 'SYSTEM' and exists $ENV{'IWUSER'} and $ENV{'IWUSER'} ne $username) { } 0 0 0
elsif (grep {/--login/;} @ARGV) { } 0 0 0
Condition0%0/6
exists $ENV{"SSH_CONNECTION"} and exists $ENV{"USER"} and $ENV{"USER"} ne $username
!ll&&!rl&&r
000
exists $ENV{"SSH_CONNECTION"} and exists $ENV{"USER"}
!ll&&!rl&&r
000
MC/DC0%0/3
exists $ENV{"SSH_CONNECTION"} and exists $ENV{"USER"} and $ENV{"USER"} ne $username
exists $ENV{"SSH_CONNECTION"} exists $ENV{"USER"} $ENV{"USER"} ne $username
Truth table0%0/4
A and B and C
A= exists $ENV{"SSH_CONNECTION"}B= exists $ENV{"USER"}C= $ENV{"USER"} ne $username
ABCresult
0XX0
10X0
1100
1111
555 exists $ENV{'USER'} && ($ENV{'USER'}
556 ne $username)) {
557 0 $username=$ENV{'USER'};
558 ▶ } elsif ($username eq 'SYSTEM' &&
Condition0%0/6
$username eq "SYSTEM" and exists $ENV{"IWUSER"} and $ENV{"IWUSER"} ne $username
!ll&&!rl&&r
000
$username eq "SYSTEM" and exists $ENV{"IWUSER"}
!ll&&!rl&&r
000
MC/DC0%0/3
$username eq "SYSTEM" and exists $ENV{"IWUSER"} and $ENV{"IWUSER"} ne $username
$username eq "SYSTEM" exists $ENV{"IWUSER"} $ENV{"IWUSER"} ne $username
Truth table0%0/4
A and B and C
A= $username eq "SYSTEM"B= exists $ENV{"IWUSER"}C= $ENV{"IWUSER"} ne $username
ABCresult
0XX0
10X0
1100
1111
559 exists $ENV{'IWUSER'} && ($ENV{'IWUSER'}
560 ne $username)) {
561 0 my $login_flag=0;
562 0 foreach (@ARGV) {
563 0 my $argv=$_;
564 0 ▶ if ($login_flag) {
Branch: 2 branches
BranchTrueFalseTotal
if ($login_flag) { } 0 0 0
elsif (lc $argv eq '--login') { } 0 0 0
565 0 $username=$argv;
566 0 last;
567 } elsif (lc($argv) eq '--login') {
568 0 $login_flag=1;
569 }
570 }
571 0 ▶ $username=$ENV{'IWUSER'} unless $login_flag;
Branch: 1 branch
BranchTrueFalseTotal
unless $login_flag 0 0 0
572 0 } elsif (grep { /--login/ } @ARGV) {
573 0 my $login_flag=0;
574 0 foreach (@ARGV) {
575 0 my $argv=$_;
576 0 ▶ if ($login_flag) {
Branch: 2 branches
BranchTrueFalseTotal
if ($login_flag) { } 0 0 0
elsif (lc $argv eq '--login') { } 0 0 0
577 0 $username=$argv;
578 0 last;
579 } elsif (lc($argv) eq '--login') {
580 0 $login_flag=1;
581 }
582 }
583 }
584 0 ▶ my $status=$bdb->db_get(
Branch: 1 branch
BranchTrueFalseTotal
if $bdb 0 0 0
585 $username,$default_modules) if $bdb;
586 0 ▶ $default_modules||='';
Condition0%0/2
$default_modules ||= ""
l!l
00
MC/DC0%0/1
$default_modules ||= ""
$default_modules
Truth table0%0/2
A
A= $default_modules
Aresult
11
00
587 0 ▶ $default_modules=~s/\$HASH\d*\s*=\s*//s
Branch: 1 branch
BranchTrueFalseTotal
if index($default_modules, "\$HASH") != -1 0 0 0
588 if -1<index $default_modules,'$HASH';
589 0 $default_modules=eval $default_modules;
590 0 ▶ $default_modules||={};
Condition0%0/2
$default_modules ||= {}
l!l
00
MC/DC0%0/1
$default_modules ||= {}
$default_modules
Truth table0%0/2
A
A= $default_modules
Aresult
11
00
591 0 my $save_defaults_for_user_flag=0;
592 0 ▶ if ($data_dump_streamer) {
Branch: 1 branch
BranchTrueFalseTotal
if ($data_dump_streamer) 0 0 0
593 0 foreach my $mod (keys %{$default_modules}) {
594 0 ▶ if ($mod eq 'set') {
Branch: 1 branch
BranchTrueFalseTotal
if ($mod eq "set") 0 0 0
595 0 ▶ if ($default_modules->{set} ne 'none') {
Branch: 1 branch
BranchTrueFalseTotal
if ($default_modules->{'set'} ne 'none') { } 0 0 0
596 0 $save_defaults_for_user_flag=1;
597 0 next;
598 0 } else { next }
599 }
600 0 ▶ unless ($Term::Menus::filechk->(
Branch: 1 branch
BranchTrueFalseTotal
unless (&$Term::Menus::filechk($default_modules->{$mod})) 0 0 0
601 $default_modules->{$mod})) {
602 0 delete $default_modules->{$mod};
603 0 next;
604 }
605 0 $save_defaults_for_user_flag=1;
606 }
607 0 ▶ if ($save_defaults_for_user_flag) {
Branch: 1 branch
BranchTrueFalseTotal
if ($save_defaults_for_user_flag) { } 0 0 0
608 0 my $def_modules=Data::Dump::Streamer::Dump(
609 $default_modules)->Out();
610 0 ▶ my $status=$bdb->db_put(
Branch: 1 branch
BranchTrueFalseTotal
if $bdb 0 0 0
611 $username,$def_modules) if $bdb;
612 } else {
613 0 ▶ my $status=$bdb->db_del(
Branch: 1 branch
BranchTrueFalseTotal
if $bdb 0 0 0
614 $username) if $bdb;
615 }
616 }
617 0 undef $bdb;
618 0 $dbenv->close();
619 0 undef $dbenv;
620 0 ▶ unless (keys %{$default_modules}) {
Branch: 2 branches
BranchTrueFalseTotal
if (keys %{$default_modules;}) { } 0 0 0
if (do { exists $default_modules->{'set'} and $default_modules->{'set'} ne 'none' }) { } 0 0 0
621 0 $default_modules->{'set'}='none';
622 0 $default_modules->{'fa_code'}=
623 'Net/FullAuto/Distro/fa_code_demo.pm';
624 0 $default_modules->{'fa_conf'}=
625 'Net/FullAuto/Distro/fa_conf.pm';
626 0 $default_modules->{'fa_host'}=
627 'Net/FullAuto/Distro/fa_host.pm';
628 0 $default_modules->{'fa_menu'}=
629 'Net/FullAuto/Distro/fa_menu_demo.pm';
630 ▶ } elsif (exists $default_modules->{'set'} &&
Condition0%0/3
exists $default_modules->{"set"} and $default_modules->{"set"} ne "none"
!ll&&!rl&&r
000
MC/DC0%0/2
exists $default_modules->{"set"} and $default_modules->{"set"} ne "none"
exists $default_modules->{"set"} $default_modules->{"set"} ne "none"
Truth table0%0/3
A and B
A= exists $default_modules->{"set"}B= $default_modules->{"set"} ne "none"
ABresult
0X0
100
111
631 $default_modules->{'set'} ne 'none') {
632 0 $new_user_flag=0;
633 0 my $setname=$default_modules->{'set'};
634 0 ▶ my $stenv = BerkeleyDB::Env->new(
Branch: 1 branch
BranchTrueFalseTotal
my $stenv = "BerkeleyDB::Env"->new("-Home", $fa_global::berkeley_db_path . 'Sets', "-Flags", "DB_K^MU_OTOOL") or die 'cannot open environment for DB: ' . $BerkeleyDB::Error . "\n", "", "" 0 0 0
635 -Home => $fa_global::berkeley_db_path.'Sets',
636 -Flags => DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL
637 ) or die(
638 "cannot open environment for DB: ".
639 $BerkeleyDB::Error."\n",'','');
640 0 my $std = BerkeleyDB::Btree->new(
641 -Filename => "${progname}_sets.db",
642 -Flags => DB_CREATE,
643 -Env => $stenv
644 );
645 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
646 0 $std = BerkeleyDB::Btree->new(
647 -Filename => "${progname}_sets.db",
648 -Flags => DB_CREATE|DB_RECOVER_FATAL,
649 -Env => $stenv
650 );
651 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
652 0 die "Cannot Open DB ${progname}_sets.db:".
653 " $BerkeleyDB::Error\n";
654 }
655 }
656 #my $username=getlogin || getpwuid($<);
657 0 my $set='';
658 0 my $status=$std->db_get(
659 $username,$set);
660 0 ▶ $set||='';
Condition0%0/2
$set ||= ""
l!l
00
MC/DC0%0/1
$set ||= ""
$set
Truth table0%0/2
A
A= $set
Aresult
11
00
661 0 ▶ $set=~s/\$HASH\d*\s*=\s*//s
Branch: 1 branch
BranchTrueFalseTotal
if index($set, "\$HASH") != -1 0 0 0
662 if -1<index $set,'$HASH';
663 0 $set=eval $set;
664 0 ▶ $set||={};
Condition0%0/2
$set ||= {}
l!l
00
MC/DC0%0/1
$set ||= {}
$set
Truth table0%0/2
A
A= $set
Aresult
11
00
665 0 undef $std;
666 0 $stenv->close();
667 0 undef $stenv;
668 0 $fa_code=[$set->{$setname}->{'fa_code'},
669 "From Default Set $setname ".
670 "(Change with fa --set)"];
671 0 $fa_conf=[$set->{$setname}->{'fa_conf'},
672 "From Default Set $setname ".
673 "(Change with fa --set)"];
674 0 $fa_host=[$set->{$setname}->{'fa_host'},
675 "From Default Set $setname ".
676 "(Change with fa --set)"];
677 0 $fa_menu=[$set->{$setname}->{'fa_menu'},
678 "From Default Set $setname ".
679 "(Change with fa --set)"];
680 } else {
681 0 $new_user_flag=0;
682 0 ▶ if (exists $default_modules->{'fa_code'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $default_modules->{"fa_code"}) 0 0 0
683 0 $fa_code=[$default_modules->{'fa_code'},
684 "From Default Setting ".
685 "(Change with fa --defaults)"];
686 }
687 0 ▶ if (exists $default_modules->{'fa_conf'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $default_modules->{"fa_conf"}) 0 0 0
688 0 $fa_conf=[$default_modules->{'fa_conf'},
689 "From Default Setting ".
690 "(Change with fa --defaults)"];
691 }
692 0 ▶ if (exists $default_modules->{'fa_host'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $default_modules->{"fa_host"}) 0 0 0
693 0 $fa_host=[$default_modules->{'fa_host'},
694 "From Default Setting ".
695 "(Change with fa --defaults)"];
696 }
697 0 ▶ if (exists $default_modules->{'fa_menu'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $default_modules->{"fa_menu"}) 0 0 0
698 0 $fa_menu=[$default_modules->{'fa_menu'},
699 "From Default Setting ".
700 "(Change with fa --defaults)"];
701 }
702 }
703 }
704 }
705 } else {
706 0 warn("WARNING: Cannot read defaults file $fa_path/fa_global.pm".
707 " - permission denied (Hint: Perhaps you need to 'Run as ".
708 "administrator'?)");
709 }
710 }
711 0 my @A=();my %A=();
712 0 push @A,@ARGV;
713 0 my $acnt=0;
714 0 foreach my $a (@A) {
715 0 $acnt++;
716 0 my $aa=$a;
717 0 ▶ if (-1<index $aa,'--fa_') {
Branch: 2 branches
BranchTrueFalseTotal
if (index($aa, '--fa_') != -1) { } 0 0 0
elsif (index($aa, '--set') != -1) { } 0 0 0
718 0 my $k=unpack('x5a*',$aa);
719 0 ▶ my $v=$A[$acnt]||'';
Condition0%0/2
$A[$acnt] || ''
l!l
00
MC/DC0%0/1
$A[$acnt] || ''
$A[$acnt]
Truth table0%0/2
A
A= $A[$acnt]
Aresult
11
00
720 0 ▶ unless (-1<index $v, '--fa_') {
Branch: 1 branch
BranchTrueFalseTotal
if (index($v, '--fa_') != -1) { } 0 0 0
721 0 $A{$k}=$v;
722 } else {
723 0 @A=();
724 0 last;
725 }
726 } elsif (-1<index $aa,'--set') {
727 0 ▶ my $v=$A[$acnt]||'';
Condition0%0/2
$A[$acnt] || ''
l!l
00
MC/DC0%0/1
$A[$acnt] || ''
$A[$acnt]
Truth table0%0/2
A
A= $A[$acnt]
Aresult
11
00
728 0 ▶ unless (-1<index $v, '--') {
Branch: 1 branch
BranchTrueFalseTotal
if (index($v, '--') != -1) { } 0 0 0
729 0 $A{set}=$v;
730 } else {
731 0 @A=();
732 0 last;
733 }
734 }
735 }
736 0 foreach my $e (('set','code','conf','host','maps','menu')) {
737 0 ▶ if (exists $A{$e}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $A{$e}) 0 0 0
738 0 $new_user_flag=0;
739 0 ▶ if ($e eq 'set') {
Branch: 5 branches
BranchTrueFalseTotal
if ($e eq 'set') { } 0 0 0
elsif ($e eq 'code') { } 0 0 0
elsif ($e eq 'menu') { } 0 0 0
elsif ($e eq 'host') { } 0 0 0
elsif ($e eq 'conf') { } 0 0 0
740 1 ▶ no strict 'subs';
Subroutine BEGIN: called CC=1 SCAR=0.0
741 0 my $setname=$A{$e};
742 0 my $fa_path=$INC{'Net/FullAuto.pm'};
743 0 my $progname=substr($0,(rindex $0,'/')+1,-3);
744 0 substr($fa_path,-3)='';
745 0 ▶ if (-f $fa_path.'/fa_global.pm') {
Branch: 1 branch
BranchTrueFalseTotal
if (-f $fa_path . '/fa_global.pm') { } 0 0 0
746 0 ▶ my $stenv = BerkeleyDB::Env->new(
Branch: 1 branch
BranchTrueFalseTotal
my $stenv = "BerkeleyDB::Env"->new("-Home", $fa_global::berkeley_db_path . 'Sets', "-Flags", "DB_K^MU_OTOOL") or die 'cannot open environment for DB: ' . $BerkeleyDB::Error . "\n", "", "" 0 0 0
747 -Home => $fa_global::berkeley_db_path.'Sets',
748 -Flags => DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL
749 ) or die(
750 "cannot open environment for DB: ".
751 $BerkeleyDB::Error."\n",'','');
752 0 my $std = BerkeleyDB::Btree->new(
753 -Filename => "${progname}_sets.db",
754 -Flags => DB_CREATE,
755 -Env => $stenv
756 );
757 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
758 0 $std = BerkeleyDB::Btree->new(
759 -Filename => "${progname}_sets.db",
760 -Flags => DB_CREATE|DB_RECOVER_FATAL,
761 -Env => $stenv
762 );
763 0 ▶ unless ($BerkeleyDB::Error=~/Successful/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($BerkeleyDB::Error =~ /Successful/) 0 0 0
764 0 die "Cannot Open DB ${progname}_sets.db:".
765 " $BerkeleyDB::Error\n";
766 }
767 }
768 #my $username=getlogin || getpwuid($<);
769 0 my $set='';
770 0 my $status=$std->db_get(
771 $username,$set);
772 0 ▶ $set||='';
Condition0%0/2
$set ||= ""
l!l
00
MC/DC0%0/1
$set ||= ""
$set
Truth table0%0/2
A
A= $set
Aresult
11
00
773 0 ▶ $set=~s/\$HASH\d*\s*=\s*//s
Branch: 1 branch
BranchTrueFalseTotal
if index($set, "\$HASH") != -1 0 0 0
774 if -1<index $set,'$HASH';
775 0 $set=eval $set;
776 0 ▶ $set||={};
Condition0%0/2
$set ||= {}
l!l
00
MC/DC0%0/1
$set ||= {}
$set
Truth table0%0/2
A
A= $set
Aresult
11
00
777 0 undef $std;
778 0 $stenv->close();
779 0 undef $stenv;
780 0 $fa_code=[$set->{$setname}->{'fa_code'},
781 "From CMD arg fa --set $setname line ".__LINE__];
782 0 $fa_conf=[$set->{$setname}->{'fa_conf'},
783 "From CMD arg fa --set $setname line ".__LINE__];
784 0 $fa_host=[$set->{$setname}->{'fa_host'},
785 "From CMD arg fa --set $setname line ".__LINE__];
786 0 $fa_menu=[$set->{$setname}->{'fa_menu'},
787 "From CMD arg fa --set $setname line ".__LINE__];
788 } else {
789 0 my $die="\n FATAL ERROR: The Set indicated from".
790 " the CMD arg:\n\n".
791 " ==> fa --set $A{$e}n\n".
792 " does not exist. To create this\n".
793 " set, run fa --set without any\n".
794 " other arguments";
795 0 die $die;
796 }
797 } elsif ($e eq 'code') {
798 0 $fa_code=$A{$e};
799 0 $fa_code=[$fa_code,
800 "From CMD arg: fa --fa_code $A{$e}"];
801 } elsif ($e eq 'menu') {
802 0 $fa_menu=$A{$e};
803 0 $fa_menu=[$fa_menu,
804 "From CMD arg: fa --fa_menu $A{$e}"];
805 } elsif ($e eq 'host') {
806 0 $fa_host=$A{$e};
807 0 $fa_host=[$fa_host,
808 "From CMD arg: fa --fa_host $A{$e}"];
809 } elsif ($e eq 'conf') {
810 0 $fa_conf=$A{$e};
811 0 $fa_conf=[$fa_conf,
812 "From CMD arg: fa --fa_conf $A{$e}"];
813 }
814 }
815 0 ▶ my $abspath=abs_path($0)||'';
Condition0%0/2
abs_path($0) || ''
l!l
00
MC/DC0%0/1
abs_path($0) || ''
abs_path($0)
Truth table0%0/2
A
A= abs_path($0)
Aresult
11
00
816 0 $abspath=~s/\.exe$//;
817 0 $abspath.='.pl';
818 0 ▶ if (defined $main::fa_code && $main::fa_code) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::fa_code and $main::fa_code) 0 0 0
Condition0%0/3
defined $main::fa_code and $main::fa_code
!ll&&!rl&&r
000
MC/DC0%0/2
defined $main::fa_code and $main::fa_code
defined $main::fa_code $main::fa_code
Truth table0%0/3
A and B
A= defined $main::fa_codeB= $main::fa_code
ABresult
0X0
100
111
819 0 $new_user_flag=0;
820 0 $fa_code=$main::fa_code;
821 0 ▶ my $p=abs_path($0)||'';
Condition0%0/2
abs_path($0) || ''
l!l
00
MC/DC0%0/1
abs_path($0) || ''
abs_path($0)
Truth table0%0/2
A
A= abs_path($0)
Aresult
11
00
822 0 $fa_code=[$fa_code,
823 "From \$fa_code variable in $abspath"];
824 }
825 0 ▶ if (defined $main::fa_conf && $main::fa_conf) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::fa_conf and $main::fa_conf) 0 0 0
Condition0%0/3
defined $main::fa_conf and $main::fa_conf
!ll&&!rl&&r
000
MC/DC0%0/2
defined $main::fa_conf and $main::fa_conf
defined $main::fa_conf $main::fa_conf
Truth table0%0/3
A and B
A= defined $main::fa_confB= $main::fa_conf
ABresult
0X0
100
111
826 0 $new_user_flag=0;
827 0 $fa_conf=$main::fa_conf;
828 0 $fa_conf=[$fa_conf,
829 "From \$fa_conf variable in $abspath"];
830 }
831 0 ▶ if (defined $main::fa_host && $main::fa_host) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::fa_host and $main::fa_host) 0 0 0
Condition0%0/3
defined $main::fa_host and $main::fa_host
!ll&&!rl&&r
000
MC/DC0%0/2
defined $main::fa_host and $main::fa_host
defined $main::fa_host $main::fa_host
Truth table0%0/3
A and B
A= defined $main::fa_hostB= $main::fa_host
ABresult
0X0
100
111
832 0 $new_user_flag=0;
833 0 $fa_host=$main::fa_host;
834 0 $fa_host=[$fa_host,
835 "From \$fa_host variable in $abspath"];
836 }
837 0 ▶ if (defined $main::fa_menu && $main::fa_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::fa_menu and $main::fa_menu) 0 0 0
Condition0%0/3
defined $main::fa_menu and $main::fa_menu
!ll&&!rl&&r
000
MC/DC0%0/2
defined $main::fa_menu and $main::fa_menu
defined $main::fa_menu $main::fa_menu
Truth table0%0/3
A and B
A= defined $main::fa_menuB= $main::fa_menu
ABresult
0X0
100
111
838 0 $new_user_flag=0;
839 0 $fa_menu=$main::fa_menu;
840 0 $fa_menu=[$fa_menu,
841 "From \$fa_menu variable in $abspath"];
842 }
843 }
844 } else {
845 0 $new_user_flag=0;
846 0 ▶ my $abspath=abs_path($0)||'';
Condition0%0/2
abs_path($0) || ''
l!l
00
MC/DC0%0/1
abs_path($0) || ''
abs_path($0)
Truth table0%0/2
A
A= abs_path($0)
Aresult
11
00
847 0 $abspath=~s/\.exe$//;
848 0 $abspath.='.pl';
849 0 $fa_code=[$fa_code,
850 "From \$fa_code variable in $abspath"];
851 0 $fa_conf=[$fa_conf,
852 "From \$fa_conf variable in $abspath"];
853 0 $fa_host=[$fa_host,
854 "From \$fa_host variable in $abspath"];
855 0 $fa_menu=[$fa_menu,
856 "From \$fa_menu variable in $abspath"];
857 }
858 0 ▶ $fa_code->[0]='Net/FullAuto/'.$fa_code->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code->[0] and index($Term::Menus::fa_code->[0], "Net/FullAuto") == -1 0 0 0
Condition0%0/3
$Term::Menus::fa_code->[0] and index($Term::Menus::fa_code->[0], "Net/FullAuto") == -1
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fa_code->[0] and index($Term::Menus::fa_code->[0], "Net/FullAuto") == -1
$Term::Menus::fa_code->[0] index($Term::Menus::fa_code->[0], "Net/FullAuto") == -1
Truth table0%0/3
A and B
A= $Term::Menus::fa_code->[0]B= index($Term::Menus::fa_code->[0], "Net/FullAuto") == -1
ABresult
0X0
100
111
859 if $fa_code->[0] && -1==index $fa_code->[0],'Net/FullAuto';
860 0 ▶ $fa_code->[0]||='';
Condition0%0/2
$Term::Menus::fa_code->[0] ||= ""
l!l
00
MC/DC0%0/1
$Term::Menus::fa_code->[0] ||= ""
$Term::Menus::fa_code->[0]
Truth table0%0/2
A
A= $Term::Menus::fa_code->[0]
Aresult
11
00
861 0 my $argv=join " ",@ARGV;
862 0 my $rx='^--edi*t* *|^-e[a-z]|^--admin|^-V|^-v|^--VE*R*S*I*O*N*|'.
863 '^--users|^--ve*r*s*i*o*n*|^--cat|^--tutorial|^--figlet';
864 0 ▶ if (!map { /$rx/ } @ARGV) {
Branch: 1 branch
BranchTrueFalseTotal
unless (map {/$rx/;} @ARGV) 0 0 0
865 0 ▶ if ($fa_code->[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fa_code->[0]) { } 0 0 0
866 0 ▶ if ($Term::Menus::canload->($fa_code->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$Term::Menus::canload($Term::Menus::fa_code->[0])) { } 0 0 0
867 0 require $fa_code->[0];
868 0 my $mod=substr($fa_code->[0],(rindex $fa_code->[0],'/')+1,-3);
869 0 import $mod;
870 0 $fa_code=$mod.'.pm';
871 } else {
872 0 my $ln=__LINE__;
873 0 $ln-=5;
874 die "Cannot load module $fa_code->[0]".
875 "\n $fa_code->[1]\n".
876 "\"require $fa_code->[0];\"".
877 0 "--failed at ".$INC{'Term/Menus.pm'}." line $ln\.\n$@\n";
878 }
879 } else {
880 0 require 'Net/FullAuto/Distro/fa_code.pm';
881 0 import fa_code;
882 0 $fa_code='fa_code.pm';
883 }
884 }
885 0 ▶ $fa_conf->[0]='Net/FullAuto/'.$fa_conf->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_conf->[0] and index($Term::Menus::fa_conf->[0], "Net/FullAuto") == -1 0 0 0
Condition0%0/3
$Term::Menus::fa_conf->[0] and index($Term::Menus::fa_conf->[0], "Net/FullAuto") == -1
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fa_conf->[0] and index($Term::Menus::fa_conf->[0], "Net/FullAuto") == -1
$Term::Menus::fa_conf->[0] index($Term::Menus::fa_conf->[0], "Net/FullAuto") == -1
Truth table0%0/3
A and B
A= $Term::Menus::fa_conf->[0]B= index($Term::Menus::fa_conf->[0], "Net/FullAuto") == -1
ABresult
0X0
100
111
886 if $fa_conf->[0] && -1==index $fa_conf->[0],'Net/FullAuto';
887 0 ▶ $fa_conf->[0]||='';
Condition0%0/2
$Term::Menus::fa_conf->[0] ||= ""
l!l
00
MC/DC0%0/1
$Term::Menus::fa_conf->[0] ||= ""
$Term::Menus::fa_conf->[0]
Truth table0%0/2
A
A= $Term::Menus::fa_conf->[0]
Aresult
11
00
888 0 ▶ if ($argv!~/--edit |^-e[a-z]|--cat /) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($argv =~ /--edit |^-e[a-z]|--cat /) 0 0 0
889 0 ▶ if ($fa_conf->[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fa_conf->[0]) { } 0 0 0
890 0 ▶ if ($Term::Menus::canload->($fa_conf->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$Term::Menus::canload($Term::Menus::fa_conf->[0])) { } 0 0 0
891 0 require $fa_conf->[0];
892 0 my $mod=substr($fa_conf->[0],(rindex $fa_conf->[0],'/')+1,-3);
893 0 import $mod;
894 0 $fa_conf=$mod.'.pm';
895 } else {
896 0 my $ln=__LINE__;
897 0 $ln-=5;
898 die "Cannot load module $fa_conf->[0]".
899 "\n $fa_conf->[1]\n".
900 "\"require $fa_conf->[0];\"".
901 0 "--failed at ".$INC{'Term/Menus.pm'}." line $ln\.\n$@\n";
902 }
903 } else {
904 0 require 'Net/FullAuto/Distro/fa_conf.pm';
905 0 import fa_conf;
906 0 $fa_conf='fa_conf.pm';
907 }
908 }
909 0 ▶ $fa_host->[0]='Net/FullAuto/'.$fa_host->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_host->[0] and index($Term::Menus::fa_host->[0], "Net/FullAuto") == -1 0 0 0
Condition0%0/3
$Term::Menus::fa_host->[0] and index($Term::Menus::fa_host->[0], "Net/FullAuto") == -1
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fa_host->[0] and index($Term::Menus::fa_host->[0], "Net/FullAuto") == -1
$Term::Menus::fa_host->[0] index($Term::Menus::fa_host->[0], "Net/FullAuto") == -1
Truth table0%0/3
A and B
A= $Term::Menus::fa_host->[0]B= index($Term::Menus::fa_host->[0], "Net/FullAuto") == -1
ABresult
0X0
100
111
910 if $fa_host->[0] && -1==index $fa_host->[0],'Net/FullAuto';
911 0 ▶ $fa_host->[0]||='';
Condition0%0/2
$Term::Menus::fa_host->[0] ||= ""
l!l
00
MC/DC0%0/1
$Term::Menus::fa_host->[0] ||= ""
$Term::Menus::fa_host->[0]
Truth table0%0/2
A
A= $Term::Menus::fa_host->[0]
Aresult
11
00
912 0 ▶ if ($argv!~/--edit |^-e[a-z]/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($argv =~ /--edit |^-e[a-z]/) 0 0 0
913 0 ▶ if ($fa_host->[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fa_host->[0]) { } 0 0 0
914 0 ▶ if ($Term::Menus::canload->($fa_host->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$Term::Menus::canload($Term::Menus::fa_host->[0])) { } 0 0 0
915 0 require $fa_host->[0];
916 0 my $mod=substr($fa_host->[0],(rindex $fa_host->[0],'/')+1,-3);
917 0 import $mod;
918 0 $fa_host=$mod.'.pm';
919 } else {
920 0 my $ln=__LINE__;
921 0 $ln-=5;
922 die "Cannot load module $fa_host->[0]".
923 "\n $fa_host->[1]\n".
924 "\"require $fa_host->[0];\"".
925 0 "--failed at ".$INC{'Term/Menus.pm'}." line $ln\.\n$@\n";
926 }
927 } else {
928 0 require 'Net/FullAuto/Distro/fa_host.pm';
929 0 import fa_host;
930 0 $fa_host='fa_host.pm';
931 }
932 }
933 0 ▶ $fa_menu->[0]='Net/FullAuto/'.$fa_menu->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_menu->[0] and index($Term::Menus::fa_menu->[0], "Net/FullAuto") == -1 0 0 0
Condition0%0/3
$Term::Menus::fa_menu->[0] and index($Term::Menus::fa_menu->[0], "Net/FullAuto") == -1
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fa_menu->[0] and index($Term::Menus::fa_menu->[0], "Net/FullAuto") == -1
$Term::Menus::fa_menu->[0] index($Term::Menus::fa_menu->[0], "Net/FullAuto") == -1
Truth table0%0/3
A and B
A= $Term::Menus::fa_menu->[0]B= index($Term::Menus::fa_menu->[0], "Net/FullAuto") == -1
ABresult
0X0
100
111
934 if $fa_menu->[0] && -1==index $fa_menu->[0],'Net/FullAuto';
935 0 ▶ $fa_menu->[0]||='';
Condition0%0/2
$Term::Menus::fa_menu->[0] ||= ""
l!l
00
MC/DC0%0/1
$Term::Menus::fa_menu->[0] ||= ""
$Term::Menus::fa_menu->[0]
Truth table0%0/2
A
A= $Term::Menus::fa_menu->[0]
Aresult
11
00
936 0 ▶ if ($argv!~/--edit |^-e[a-z]/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $argv =~ /--edit |^-e[a-z]/) 0 0 0
937 0 ▶ if ($fa_menu->[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fa_menu->[0]) { } 0 0 0
938 0 ▶ if ($Term::Menus::canload->($fa_menu->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$Term::Menus::canload($Term::Menus::fa_menu->[0])) { } 0 0 0
939 0 require $fa_menu->[0];
940 0 my $mod=substr($fa_menu->[0],(rindex $fa_menu->[0],'/')+1,-3);
941 0 import $mod;
942 0 $fa_menu=$mod.'.pm';
943 } else {
944 0 my $ln=__LINE__;
945 0 $ln-=5;
946 die "Cannot load module $fa_menu->[0]".
947 "\n $fa_menu->[1]\n".
948 "\"require $fa_menu->[0];\"".
949 0 "--failed at ".$INC{'Term/Menus.pm'}." line $ln\.\n$@\n";
950 }
951 } else {
952 0 require 'Net/FullAuto/Distro/fa_menu_demo.pm';
953 0 import fa_menu_demo;
954 0 $fa_menu='fa_menu_demo.pm';
955 }
956 }
957
958 }
959
960 }
961
962 1 our %email_defaults=();
963 1 ▶if (%fa_code::email_defaults) {
Branch: 1 branch
BranchTrueFalseTotal
if (%fa_code::email_defaults) 0 1 1
964 0 %email_defaults=%fa_code::email_defaults;
965 }
966 1 our %email_addresses=();
967 1 ▶if (%fa_code::email_addresses) {
Branch: 1 branch
BranchTrueFalseTotal
if (%fa_code::email_addresses) 0 1 1
968 0 %email_addresses=%fa_code::email_addresses;
969 }
970 1 our $passwd_file_loc='';
971 1 ▶if (defined $fa_code::passwd_file_loc && $fa_code::passwd_file_loc) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $fa_code::passwd_file_loc and $fa_code::passwd_file_loc) 0 1 1
Condition33%1/3
defined $fa_code::passwd_file_loc and $fa_code::passwd_file_loc
!ll&&!rl&&r
100
MC/DC0%0/2
defined $fa_code::passwd_file_loc and $fa_code::passwd_file_loc
defined $fa_code::passwd_file_loc $fa_code::passwd_file_loc
Truth table33%1/3
A and B
A= defined $fa_code::passwd_file_locB= $fa_code::passwd_file_loc
ABresult
0X0
100
111
972 0 $passwd_file_loc=$fa_code::passwd_file_loc;
973 }
974 1 our $test=0;
975 1 ▶if (defined $fa_code::test && $fa_code::test) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $fa_code::test and $fa_code::test) 0 1 1
Condition33%1/3
defined $fa_code::test and $fa_code::test
!ll&&!rl&&r
100
MC/DC0%0/2
defined $fa_code::test and $fa_code::test
defined $fa_code::test $fa_code::test
Truth table33%1/3
A and B
A= defined $fa_code::testB= $fa_code::test
ABresult
0X0
100
111
976 0 $test=$fa_code::test;
977 }
978 1 our $timeout=30;
979 1 ▶if (defined $fa_code::timeout && $fa_code::timeout) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $fa_code::timeout and $fa_code::timeout) 0 1 1
Condition33%1/3
defined $fa_code::timeout and $fa_code::timeout
!ll&&!rl&&r
100
MC/DC0%0/2
defined $fa_code::timeout and $fa_code::timeout
defined $fa_code::timeout $fa_code::timeout
Truth table33%1/3
A and B
A= defined $fa_code::timeoutB= $fa_code::timeout
ABresult
0X0
100
111
980 0 $timeout=$fa_code::timeout;
981 }
982 1 our $log=0;
983 1 ▶if (defined $fa_code::log && $fa_code::log) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $fa_code::log and $fa_code::log) 0 1 1
Condition33%1/3
defined $fa_code::log and $fa_code::log
!ll&&!rl&&r
100
MC/DC0%0/2
defined $fa_code::log and $fa_code::log
defined $fa_code::log $fa_code::log
Truth table33%1/3
A and B
A= defined $fa_code::logB= $fa_code::log
ABresult
0X0
100
111
984 0 $log=$fa_code::log;
985 }
986 1 our $tosspass=0;
987 1 ▶if (defined $fa_code::tosspass && $fa_code::tosspass) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $fa_code::tosspass and $fa_code::tosspass) 0 1 1
Condition33%1/3
defined $fa_code::tosspass and $fa_code::tosspass
!ll&&!rl&&r
100
MC/DC0%0/2
defined $fa_code::tosspass and $fa_code::tosspass
defined $fa_code::tosspass $fa_code::tosspass
Truth table33%1/3
A and B
A= defined $fa_code::tosspassB= $fa_code::tosspass
ABresult
0X0
100
111
988 0 $tosspass=$fa_code::tosspass;
989 }
990
991 ## End Net::FullAuto Settings
992
993 ##############################################################
994 ##############################################################
995
996 ## Begin Term::Menus
997
998 1 our $termwidth=0;
999 1 our $termheight=0;
1000 1 our $padwalker=0;
1001 1 our $term_input=0;
1002 1 eval { require Term::ReadKey };
1003 1 ▶unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 1 1
1004 1 import Term::ReadKey;
1005 1 ($termwidth,$termheight)=eval {
1006 1 ▶ no strict 'subs';
Subroutine BEGIN: called CC=1 SCAR=0.0
1007 1 my ($termwidth,$termheight)=('','');
1008 my ($stdout_capture,$stderr_capture)=
1009 1 ▶ Capture::Tiny::capture {
Subroutine __ANON__: called CC=3 SCAR=11.7
1010 1 ($termwidth, $termheight) =
1011 Term::ReadKey::GetTerminalSize();
1012 1 ▶ $termwidth||='';$termheight||='';
Condition50%2/4
$termwidth ||= ""
l!l
01
$termheight ||= ""
l!l
01
MC/DC0%0/1
$termwidth ||= ""
$termwidth
MC/DC0%0/1
$termheight ||= ""
$termheight
Truth table50%1/2
A
A= $termwidth
Aresult
11
00
Truth table50%1/2
A
A= $termheight
Aresult
11
00
1013 1 }; return $termwidth,$termheight;
1014 };
1015 1 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 1 1
1016 0 $termwidth='';$termheight='';
1017 }
1018 } else {
1019 0 $termwidth='';$termheight='';
1020 }
1021 1 ▶if ($termwidth) {
Branch: 1 branch
BranchTrueFalseTotal
if ($termwidth) 0 1 1
1022 0 eval { require Term::RawInput };
1023 0 ▶ unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($@) 0 0 0
1024 0 $term_input=1;
1025 0 import Term::RawInput;
1026 }
1027 }
1028 1 eval { require PadWalker };
1029 1 ▶unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($@) 1 0 1
1030 1 $padwalker=1;
1031 1 import PadWalker;
1032 }
1033 1 eval { require Devel::Symdump };
1034 1 ▶unless ($@) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($@) 1 0 1
1035 #$devel_symdump=1;
1036 1 import Devel::Symdump;
1037 }
1038 1 our $clearpath='';
1039 1 ▶if ($^O ne 'MSWin32' && $^O ne 'MSWin64') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O ne "MSWin32" and $^O ne "MSWin64") 1 0 1
Condition33%1/3
$^O ne "MSWin32" and $^O ne "MSWin64"
!ll&&!rl&&r
001
MC/DC0%0/2
$^O ne "MSWin32" and $^O ne "MSWin64"
$^O ne "MSWin32" $^O ne "MSWin64"
Truth table33%1/3
A and B
A= $^O ne "MSWin32"B= $^O ne "MSWin64"
ABresult
0X0
100
111
1040 1 ▶ if (-e '/usr/bin/clear') {
Branch: 3 branches
BranchTrueFalseTotal
if (-e '/usr/bin/clear') { } 1 0 1
elsif (-e '/bin/clear') { } 0 0 0
elsif (-e '/usr/local/bin/clear') { } 0 0 0
1041 1 $clearpath='/usr/bin/';
1042 } elsif (-e '/bin/clear') {
1043 0 $clearpath='/bin/';
1044 } elsif (-e '/usr/local/bin/clear') {
1045 0 $clearpath='/usr/local/bin/';
1046 }
1047 }
1048
1049 1 our %LookUpMenuName=();
1050 1 our $MenuMap=[];
1051
1052 1 our $noclear=1; # set to one to turn off clear for debugging
1053
1054 0 ▶sub check_for_dupe_menus {
Subroutine check_for_dupe_menus: not called CC=23 SCAR=63.1
Pod undocumented
1055
1056 0 my $m_flag=0;
1057 0 my $s_flag=0;
1058 0 foreach my $dir (@INC) {
1059 0 ▶ if (!$m_flag && -f "$dir/$Term::Menus::fa_menu") {
Branch: 1 branch
BranchTrueFalseTotal
if (not $m_flag and -f "$dir/$Term::Menus::fa_menu") 0 0 0
Condition0%0/3
not $m_flag and -f "$dir/$Term::Menus::fa_menu"
!ll&&!rl&&r
000
MC/DC0%0/2
not $m_flag and -f "$dir/$Term::Menus::fa_menu"
not $m_flag -f "$dir/$Term::Menus::fa_menu"
Truth table0%0/3
not(A) and B
A= not $m_flagB= -f "$dir/$Term::Menus::fa_menu"
ABresult
0X0
100
111
1060 0 $m_flag=1;
1061 0 open(FH,"<$dir/$Term::Menus::fa_menu");
1062 0 my $line='';my %menudups=();
1063 0 ▶ while ($line=<FH>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($line = readline FH)) 0 0 0
1064 0 ▶ if ($line=~/^[ \t]*\%(.*)\s*=/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ /^[ \t]*\%(.*)\s*=/) 0 0 0
1065 0 ▶ if (!exists $menudups{$1}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $menudups{$1}) { } 0 0 0
1066 0 $menudups{$1}='';
1067 } else {
1068 0 my $mcmf=$Term::Menus::fa_menu;my $die='';
1069 0 $die="\n FATAL ERROR! - Duplicate Hash Blocks:"
1070 ."\n -> \"%$1\" is defined more than once\n"
1071 ." in the $dir/$mcmf file.\n\n"
1072 ." Hint: delete or comment-out all duplicates\n\n";
1073 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1074 0 ▶ print $die if !$Net::FullAuto::FA_Core::cron;
Branch: 1 branch
BranchTrueFalseTotal
unless $Net::FullAuto::FA_Core::cron 0 0 0
1075 0 &Net::FullAuto::FA_Core::handle_error($die,'__cleanup__');
1076 0 } else { die $die }
1077 }
1078 }
1079 }
1080 }
1081 0 ▶ if (!$s_flag && -f "$dir/$Term::Menus::fa_code") {
Branch: 1 branch
BranchTrueFalseTotal
if (not $s_flag and -f "$dir/$Term::Menus::fa_code") 0 0 0
Condition0%0/3
not $s_flag and -f "$dir/$Term::Menus::fa_code"
!ll&&!rl&&r
000
MC/DC0%0/2
not $s_flag and -f "$dir/$Term::Menus::fa_code"
not $s_flag -f "$dir/$Term::Menus::fa_code"
Truth table0%0/3
not(A) and B
A= not $s_flagB= -f "$dir/$Term::Menus::fa_code"
ABresult
0X0
100
111
1082 0 $s_flag=1;
1083 0 open(FH,"<$dir/$Term::Menus::fa_code");
1084 0 my $line='';my %dups=();
1085 0 ▶ while ($line=<FH>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($line = readline FH)) 0 0 0
1086 0 ▶ if ($line=~/^[ \t]*\%(.*)\s*=/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ /^[ \t]*\%(.*)\s*=/) 0 0 0
1087 0 ▶ if (!exists $dups{$1}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $dups{$1}) { } 0 0 0
1088 0 $dups{$1}='';
1089 } else {
1090 0 my $die="\n FATAL ERROR! - Duplicate Hash Blocks:"
1091 ."\n -> \"%$1\" is defined more "
1092 ."than once\n in the $dir/"
1093 .$Term::Menus::fa_code
1094 ." file.\n\n Hint: delete "
1095 ."or comment-out all duplicates\n\n";
1096 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1097 0 ▶ print $die if !$Net::FullAuto::FA_Core::cron;
Branch: 1 branch
BranchTrueFalseTotal
unless $Net::FullAuto::FA_Core::cron 0 0 0
1098 0 &Net::FullAuto::FA_Core::handle_error($die,'__cleanup__');
1099 0 } else { die $die }
1100 }
1101 }
1102 }
1103 }
1104 }
1105
1106 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) 0 0 0
1107 0 foreach my $symname (keys %Term::Menus::) {
1108 0 ▶ if (eval "\\%$symname") {
Branch: 1 branch
BranchTrueFalseTotal
if (eval "\\%$symname") 0 0 0
1109 0 my $hashref=eval "\\%$symname";
1110 0 HF: foreach my $key (keys %{$hashref}) {
1111 0 ▶ if (ref $hashref->{$key} eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $hashref->{$key} eq "HASH") 0 0 0
1112 0 foreach my $ky (keys %{$hashref->{$key}}) {
1113 0 ▶ if (lc($ky) eq 'text') {
Branch: 1 branch
BranchTrueFalseTotal
if (lc $ky eq "text") 0 0 0
1114 0 $LookUpMenuName{$hashref}=$symname;
1115 0 last HF;
1116 }
1117 }
1118 }
1119 }
1120 }
1121 }
1122 }
1123
1124 }
1125
1126 1 ▶&check_for_dupe_menus() if defined $main::fa_menu
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::fa_menu and $main::fa_menu 0 1 1
Condition33%1/3
defined $main::fa_menu and $main::fa_menu
!ll&&!rl&&r
100
MC/DC0%0/2
defined $main::fa_menu and $main::fa_menu
defined $main::fa_menu $main::fa_menu
Truth table33%1/3
A and B
A= defined $main::fa_menuB= $main::fa_menu
ABresult
0X0
100
111
1127 && $main::fa_menu;
1128
1129 {
1130 1 ▶ use Sys::Hostname;
Subroutine BEGIN: called CC=1 SCAR=0.0
1131 1 our $local_hostname=&Sys::Hostname::hostname();
1132 }
1133
1134 1 my $count=0;
1135 1 our $blanklines='';
1136 1 ▶if ($Term::Menus::termheight) {
Branch: 1 branch
BranchTrueFalseTotal
if ($termheight) { } 0 1 1
1137 0 $count=$Term::Menus::termheight;
1138 1 } else { $count=30 }
1139 1 ▶while ($count--) { $blanklines.="\n" }
Branch: 1 branch
BranchTrueFalseTotal
if ($count--) 30 1 31
1140 1 our $parent_menu='';
1141
1142 sub fa_login
1143 0 ▶{
Subroutine fa_login: not called CC=14 SCAR=53.5
Pod undocumented
1144 0 my $code='';my $menu_args='';my $to='';my $die='';
1145 0 my $start_menu_ref='';my $cache='';
1146 0 my $returned='';
1147 0 eval {
1148 0 ($code,$menu_args,$to,$cache)=
1149 &Net::FullAuto::FA_Core::fa_login(@_);
1150 0 ▶ $main::cache=$cache if $cache;
Branch: 1 branch
BranchTrueFalseTotal
if $cache 0 0 0
1151 0 ▶ undef $main::cache unless $cache;
Branch: 1 branch
BranchTrueFalseTotal
unless $cache 0 0 0
1152 0 my $mc=substr($Term::Menus::fa_menu,
1153 (rindex $Term::Menus::fa_menu,'/')+1,-3);
1154 0 $start_menu_ref=eval '$'.$mc.'::start_menu_ref';
1155 0 ▶ $to||=0;
Condition0%0/2
$to ||= 0
l!l
00
MC/DC0%0/1
$to ||= 0
$to
Truth table0%0/2
A
A= $to
Aresult
11
00
1156 0 ▶ $timeout=$to if $to;
Branch: 1 branch
BranchTrueFalseTotal
if $to 0 0 0
1157 0 ▶ if ($code) {
Branch: 3 branches
BranchTrueFalseTotal
if ($code) { } 0 0 0
elsif (ref $start_menu_ref eq 'HASH') { } 0 0 0
elsif ($start_menu_ref) { } 0 0 0
1158 0 &run_sub($code,$menu_args);
1159 } elsif (ref $start_menu_ref eq 'HASH') {
1160 0 ▶ unless (keys %LookUpMenuName) {
Branch: 1 branch
BranchTrueFalseTotal
unless (keys %Term::Menus::LookUpMenuName) 0 0 0
1161 0 &check_for_dupe_menus();
1162 }
1163 0 ▶ if ($Net::FullAuto::FA_Core::plan) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Net::FullAuto::FA_Core::plan) 0 0 0
1164 0 my $plann=shift @{$Net::FullAuto::FA_Core::plan};
1165 0 my $return=eval $plann->{Item};
1166 0 ▶ &Net::FullAuto::FA_Core::handle_error($@,'-1') if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
1167 0 return $return;
1168 }
1169 0 $returned=&Menu($start_menu_ref);
1170 } elsif ($start_menu_ref) {
1171 0 my $mcmf=$Term::Menus::fa_menu;
1172 0 my $die="\n FATAL ERROR! - The top level menu "
1173 ."block indicated\n by the "
1174 ."\$start_menu_ref variable in the\n "
1175 ." $mcmf file, does not exist as"
1176 ."\n a properly constructed and"
1177 ."\\or named hash\n block in the"
1178 ." ".__PACKAGE__.".pm file\n\n Hint: "
1179 ."our \$start_menu_ref=\\%Menu_1\;\n\n "
1180 ."\[ Menu_1 is example - name you choose is"
1181 ." optional \]\n\n %Menu_1=\(\n"
1182 ." Item_1 => { ... },\n "
1183 ."...\n \)\;\n";
1184 0 &Net::FullAuto::FA_Core::handle_error($die);
1185 } else {
1186 0 my $mcmf=$Term::Menus::fa_menu;
1187 0 my $die="\n FATAL ERROR! - The \$start_menu_ref\n"
1188 ." variable in the $mcmf\n"
1189 ." file, is not defined or properly"
1190 ."\n initialized with the name of "
1191 ."the\n menu hash block designated"
1192 ." for the\n top level menu.\n\n"
1193 ." Hint: our \$start_menu_ref"
1194 ."=\\%Menu_1\;\n\n \[ Menu_1 is example - "
1195 ."name you choose is optional \]\n\n "
1196 ."%Menu_1=\(\n Item_1 => { ... },\n"
1197 ." ...\n \)\;\n";
1198 0 &Net::FullAuto::FA_Core::handle_error($die);
1199 }
1200 };
1201 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
1202 0 my $cmdlin=52;
1203 0 ▶ $cmdlin=47 if $code;
Branch: 1 branch
BranchTrueFalseTotal
if $code 0 0 0
1204 0 my $errr=$@;
1205 0 $errr=~s/^\s*/\n /s;
1206 0 print $errr;
1207 }
1208 0 ▶ &Net::FullAuto::FA_Core::cleanup(1,$returned) if $returned;
Branch: 1 branch
BranchTrueFalseTotal
if $returned 0 0 0
1209 0 &Net::FullAuto::FA_Core::cleanup(0,'');
1210
1211 }
1212
1213 sub run_sub
1214 0 ▶{
Subroutine run_sub: not called CC=15 SCAR=51.5
Pod undocumented
1215 1 ▶ use if $Term::Menus::fullauto, "IO::Handle";
Subroutine BEGIN: called CC=1 SCAR=0.0
1216 1 ▶ use if $Term::Menus::fullauto, POSIX => qw(setsid);
Subroutine BEGIN: called CC=1 SCAR=0.0
1217
1218 0 ▶ if ($Term::Menus::fullauto && defined $Net::FullAuto::FA_Core::service
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and defined $Net::FullAuto::FA_Core::service and $Net::FullAuto::FA_Core::service) 0 0 0
Condition0%0/6
$Term::Menus::fullauto and defined $Net::FullAuto::FA_Core::service and $Net::FullAuto::FA_Core::service
!ll&&!rl&&r
000
$Term::Menus::fullauto and defined $Net::FullAuto::FA_Core::service
!ll&&!rl&&r
000
MC/DC0%0/3
$Term::Menus::fullauto and defined $Net::FullAuto::FA_Core::service and $Net::FullAuto::FA_Core::service
$Term::Menus::fullauto defined $Net::FullAuto::FA_Core::service $Net::FullAuto::FA_Core::service
Truth table0%0/4
A and B and C
A= $Term::Menus::fullautoB= defined $Net::FullAuto::FA_Core::serviceC= $Net::FullAuto::FA_Core::service
ABCresult
0XX0
10X0
1100
1111
1219 && $Net::FullAuto::FA_Core::service) {
1220 0 print "\n\n ##### TRANSITIONING TO SERVICE ######".
1221 "\n\n FullAuto will now continue running as".
1222 "\n as a Service/Daemon. Now exiting".
1223 "\n interactive mode ...\n\n";
1224 0 ▶ chdir '/' or die "Can't chdir to /: $!";
Branch: 1 branch
BranchTrueFalseTotal
chdir "/" or die "Can't chdir to /: $!" 0 0 0
1225 0 umask 0;
1226 0 ▶ open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
Branch: 1 branch
BranchTrueFalseTotal
open STDIN, "/dev/null" or die "Can't read /dev/null: $!" 0 0 0
1227 0 ▶ open STDOUT, '>/dev/null' or die "Can't write to /dev/null: $!";
Branch: 1 branch
BranchTrueFalseTotal
open STDOUT, ">/dev/null" or die "Can't write to /dev/null: $!" 0 0 0
1228 0 ▶ open STDERR, '>/dev/null' or die "Can't write to /dev/null: $!";
Branch: 1 branch
BranchTrueFalseTotal
open STDERR, ">/dev/null" or die "Can't write to /dev/null: $!" 0 0 0
1229 0 ▶ defined(my $pid = fork) or die "Can't fork: $!";
Branch: 1 branch
BranchTrueFalseTotal
defined(my $pid = fork) or die "Can't fork: $!" 0 0 0
1230 0 ▶ exit if $pid;
Branch: 1 branch
BranchTrueFalseTotal
if $pid 0 0 0
1231 0 ▶ $pid = &setsid or die "Can't start a new session: $!";
Branch: 1 branch
BranchTrueFalseTotal
$pid = &setsid or die "Can't start a new session: $!" 0 0 0
1232 }
1233
1234 0 my $code=$_[0];
1235 0 $code=~s/^[&]//;
1236 0 ▶ my $menu_args= (defined $_[1]) ? $_[1] : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[1] ? : 0 0 0
1237 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3).'::'
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
1238 if $Term::Menus::fa_code;
1239 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
1240 0 my $return=
1241 eval "\&$subfile$code\(\@{\$menu_args}\)";
1242 0 ▶ &Net::FullAuto::FA_Core::handle_error($@,'-1') if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
1243 0 return $return;
1244 }
1245
1246 sub get_all_hosts
1247 0 ▶{
Subroutine get_all_hosts: not called CC=1 SCAR=6.9
Pod undocumented
1248 0 return Net::FullAuto::FA_Core::get_all_hosts(@_);
1249 }
1250
1251 sub get_Menu_map_count
1252 0 ▶{
Subroutine get_Menu_map_count: not called CC=3 SCAR=24.8
Pod undocumented
1253 0 my $map_count=0;$count=0;
1254 0 foreach my $map (@{$_[0]}) {
1255 0 $count=$map->[0];
1256 0 ▶ $map_count=$count if $map_count<$count;
Branch: 1 branch
BranchTrueFalseTotal
if $map_count < $count 0 0 0
1257 }
1258 0 return $map_count;
1259 }
1260
1261 sub get_Menu_map
1262 0 ▶{
Subroutine get_Menu_map: not called CC=3 SCAR=24.8
Pod documented
1263 0 my %tmphash=();my @menu_picks=();
1264 0 foreach my $map (@{$MenuMap}) {
1265 0 $tmphash{$map->[0]}=$map->[1];
1266 }
1267 0 foreach my $number (sort numerically keys %tmphash) {
1268 0 push @menu_picks, $tmphash{$number};
1269 }
1270 0 return @menu_picks;
1271 }
1272
1273 sub eval_error
1274 0 ▶{
Subroutine eval_error: not called CC=9 SCAR=45.0
Pod undocumented
1275
1276 0 ▶ my $log_handle=$_[1]||'';
Condition0%0/2
$_[1] || ''
l!l
00
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
1277 0 ▶ if (10<length $_[0] && unpack('a11',$_[0]) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $_[0] and unpack('a11', $_[0]) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $_[0] and unpack("a11", $_[0]) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $_[0] and unpack("a11", $_[0]) eq "FATAL ERROR"
10 < length $_[0] unpack("a11", $_[0]) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $_[0]B= unpack("a11", $_[0]) eq "FATAL ERROR"
ABresult
0X0
100
111
1278 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1279 -1<index $log_handle,'*') {
1280 0 print $log_handle $@;
1281 0 close($log_handle);
1282 }
1283 0 die $_[0];
1284 } else {
1285 0 my $die="\n FATAL ERROR! - The Local "
1286 ."System $Term::Menus::local_hostname "
1287 ."Conveyed\n"
1288 ." the Following "
1289 ."Unrecoverable Error Condition :\n\n"
1290 ." $_[0]\n line ".__LINE__;
1291 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1292 -1<index $log_handle,'*') {
1293 0 print $log_handle $die;
1294 0 close($log_handle);
1295 }
1296 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1297 0 &Net::FullAuto::FA_Core::handle_error($die);
1298 0 } else { die $die }
1299 }
1300 }
1301
1302 sub banner
1303 0 ▶{
Subroutine banner: not called CC=34 SCAR=70.8
Pod undocumented
1304
1305 0 ▶ my $banner=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
1306 0 ▶ return '' unless $banner;
Branch: 1 branch
BranchTrueFalseTotal
unless $banner 0 0 0
1307 0 ▶ my $Conveyed=$_[1]||{};
Condition0%0/2
$_[1] || {}
l!l
00
MC/DC0%0/1
$_[1] || {}
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
1308 0 ▶ my $SaveMMap=$_[2]||'';
Condition0%0/2
$_[2] || ''
l!l
00
MC/DC0%0/1
$_[2] || ''
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
1309 0 ▶ my $picks_from_parent=$_[3]||'';
Condition0%0/2
$_[3] || ''
l!l
00
MC/DC0%0/1
$_[3] || ''
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
1310 0 ▶ my $numbor=(defined $_[4])?$_[4]:'';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
1311 0 ▶ my $ikey=$_[5]||'';
Condition0%0/2
$_[5] || ''
l!l
00
MC/DC0%0/1
$_[5] || ''
$_[5]
Truth table0%0/2
A
A= $_[5]
Aresult
11
00
1312 0 ▶ my $input=$_[6]||{};
Condition0%0/2
$_[6] || {}
l!l
00
MC/DC0%0/1
$_[6] || {}
$_[6]
Truth table0%0/2
A
A= $_[6]
Aresult
11
00
1313 0 ▶ my $MenuUnit_hash_ref=$_[7]||{};
Condition0%0/2
$_[7] || {}
l!l
00
MC/DC0%0/1
$_[7] || {}
$_[7]
Truth table0%0/2
A
A= $_[7]
Aresult
11
00
1314 0 ▶ my $log_handle=$_[8]||'';
Condition0%0/2
$_[8] || ''
l!l
00
MC/DC0%0/1
$_[8] || ''
$_[8]
Truth table0%0/2
A
A= $_[8]
Aresult
11
00
1315 0 ▶ $banner||='';
Condition0%0/2
$banner ||= ""
l!l
00
MC/DC0%0/1
$banner ||= ""
$banner
Truth table0%0/2
A
A= $banner
Aresult
11
00
1316 0 ▶ if (ref $banner eq 'CODE') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $banner eq 'CODE') { } 0 0 0
elsif (keys %{$Conveyed;} or $picks_from_parent) { } 0 0 0
1317 0 my $banner_code=$banner;
1318 0 ▶ if ($Term::Menus::data_dump_streamer) {
Branch: 1 branch
BranchTrueFalseTotal
if ($data_dump_streamer) 0 0 0
1319 0 $banner_code=
1320 &Data::Dump::Streamer::Dump($banner_code)->Out();
1321 0 $banner_code=&transform_pmsi($banner_code,
1322 $Conveyed,$SaveMMap,$picks_from_parent);
1323 }
1324 #print "WHAT IS CDNOW2=$banner_code<==\n";<STDIN>;
1325 0 $banner_code=~s/\$CODE\d*\s*=\s*//s;
1326 #print "WHAT IS CDREALLYNOW=$banner_code<==\n";<STDIN>;
1327 0 my $eval_banner_code=eval $banner_code;
1328 0 ▶ $eval_banner_code||=sub {};
Subroutine __ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
$eval_banner_code ||= sub { }
l!l&&r!l&&!r
000
MC/DC0%0/2
$eval_banner_code ||= sub { }
$eval_banner_code sub { }
Truth table0%0/3
A ||= B
A= $eval_banner_codeB= sub { }
ABresult
1X1
011
000
1329 0 my $die="\n"
1330 ." FATAL ERROR! - Error in Banner => sub{ *CONTENT* },\n"
1331 ." code block. To find error, copy the\n"
1332 ." *CONTENT* to a separate script, and\n"
1333 ." test for the error there. Use the\n"
1334 ." 'use strict;' pragma.\n\n";
1335 0 eval {
1336 0 $banner=$eval_banner_code->();
1337 };
1338 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
1339 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
1340 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) 0 0 0
1341 0 return '',$@
1342 }
1343 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1344 -1<index $log_handle,'*') {
1345 0 print $log_handle $@;
1346 0 close($log_handle);
1347 }
1348 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1349 0 &Net::FullAuto::FA_Core::handle_error($@);
1350 0 } else { die $@ }
1351 } else {
1352 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) 0 0 0
1353 0 return '',$die.' '.$@
1354 }
1355 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1356 -1<index $log_handle,'*') {
1357 0 print $log_handle $die.' '.$@;
1358 0 close($log_handle);
1359 }
1360 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1361 0 &Net::FullAuto::FA_Core::handle_error(
1362 $die.' '.$@);
1363 0 } else { die $die.' '.$@ }
1364 }
1365 }
1366 0 ▶ } elsif (keys %{$Conveyed} || $picks_from_parent) {
Condition0%0/3
keys %{$Conveyed;} or $picks_from_parent
l!l&&r!l&&!r
000
MC/DC0%0/2
keys %{$Conveyed;} or $picks_from_parent
keys %{$Conveyed;} $picks_from_parent
Truth table0%0/3
A or B
A= keys %{$Conveyed;}B= $picks_from_parent
ABresult
1X1
011
000
1367 0 $banner=&transform_pmsi($banner,
1368 $Conveyed,$SaveMMap,$picks_from_parent);
1369 } else {
1370 0 chomp($banner);
1371 }
1372 0 ▶ if ($banner && ($banner=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/
Branch: 1 branch
BranchTrueFalseTotal
if ($banner and ($banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) and defined $picks_from_parent and not ref $picks_from_parent) 0 0 0
Condition0%0/12
$banner and ($banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) and defined $picks_from_parent and not ref $picks_from_parent
!ll&&!rl&&r
000
$banner and ($banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) and defined $picks_from_parent
!ll&&!rl&&r
000
$banner and ($banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code))
!ll&&!rl&&r
000
$banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/5
$banner and ($banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) and defined $picks_from_parent and not ref $picks_from_parent
$banner $banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code) defined $picks_from_parent not ref $picks_from_parent
Truth table0%0/6
A and B and C and D and not(E)
A= $bannerB= $banner =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/C= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)D= defined $picks_from_parentE= not ref $picks_from_parent
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
1373 0 && grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) &&
1374 defined $picks_from_parent &&
1375 !ref $picks_from_parent) {
1376 0 my @banner=();
1377 0 ▶ if ($banner!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $banner =~ /::/) { } 0 0 0
1378 0 $banner=~s/^[&]//;
1379 0 eval "\@banner=main::$banner";
1380 } else {
1381 0 eval "\@banner=$banner";
1382 }
1383 0 $banner=join '',@banner;
1384 }
1385 0 return transform_mboi(transform_mbii(transform_mbir(
1386 $banner,$Conveyed,$MenuUnit_hash_ref,
1387 $log_handle),$numbor,$ikey,$input,
1388 $MenuUnit_hash_ref,$Conveyed,$log_handle),$MenuUnit_hash_ref,
1389 $Conveyed,$SaveMMap,$picks_from_parent,$log_handle);
1390
1391 }
1392
1393 sub Menu
1394 0 ▶{
Subroutine Menu: not called CC=169 SCAR=102.7
Pod documented
1395 #print "MENUCALLER=",(caller)[0]," and ",__PACKAGE__,"\n";<STDIN>;
1396 #print "MENUCALLER=",caller,"\n";
1397 0 my $MenuUnit_hash_ref=$_[0];
1398 #print "WHAT IS THIS=",&Data::Dump::Streamer::Dump($MenuUnit_hash_ref)->Out(),"\n";
1399 0 $MenuUnit_hash_ref->{Name}=&pw($MenuUnit_hash_ref);
1400 0 my $select_many=0;
1401 0 ▶ if (exists $MenuUnit_hash_ref->{Select}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Select'}) { } 0 0 0
1402 0 ▶ if (exists $MenuUnit_hash_ref->{Select} &&
Branch: 2 branches
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Select'} and $MenuUnit_hash_ref->{'Select'} and $MenuUnit_hash_ref->{'Select'} =~ /many/i) { } 0 0 0
elsif (exists $MenuUnit_hash_ref->{'Select'} and $MenuUnit_hash_ref->{'Select'} and $MenuUnit_hash_ref->{'Select'} =~ /one/i) { } 0 0 0
Condition0%0/6
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} =~ /many/i
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"}
!ll&&!rl&&r
000
MC/DC0%0/3
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} =~ /many/i
exists $MenuUnit_hash_ref->{"Select"} $MenuUnit_hash_ref->{"Select"} $MenuUnit_hash_ref->{"Select"} =~ /many/i
Truth table0%0/4
A and B and C
A= exists $MenuUnit_hash_ref->{"Select"}B= $MenuUnit_hash_ref->{"Select"}C= $MenuUnit_hash_ref->{"Select"} =~ /many/i
ABCresult
0XX0
10X0
1100
1111
1403 $MenuUnit_hash_ref->{Select} &&
1404 $MenuUnit_hash_ref->{Select}=~/many/i) {
1405 0 $select_many='Many';
1406 0 $MenuUnit_hash_ref->{Select}={};
1407 ▶ } elsif (exists $MenuUnit_hash_ref->{Select} &&
Condition0%0/6
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} =~ /one/i
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"}
!ll&&!rl&&r
000
MC/DC0%0/3
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"} =~ /one/i
exists $MenuUnit_hash_ref->{"Select"} $MenuUnit_hash_ref->{"Select"} $MenuUnit_hash_ref->{"Select"} =~ /one/i
Truth table0%0/4
A and B and C
A= exists $MenuUnit_hash_ref->{"Select"}B= $MenuUnit_hash_ref->{"Select"}C= $MenuUnit_hash_ref->{"Select"} =~ /one/i
ABCresult
0XX0
10X0
1100
1111
1408 $MenuUnit_hash_ref->{Select} &&
1409 $MenuUnit_hash_ref->{Select}=~/one/i) {
1410 0 $MenuUnit_hash_ref->{Select}={};
1411 }
1412 } else {
1413 0 $MenuUnit_hash_ref->{Select}={};
1414 }
1415 0 ▶ my $picks_from_parent=$_[1]||'';
Condition0%0/2
$_[1] || ''
l!l
00
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
1416 0 my $log_handle='';
1417 0 ▶ if ($picks_from_parent && -1<index $picks_from_parent,'*') {
Branch: 1 branch
BranchTrueFalseTotal
if ($picks_from_parent and index($picks_from_parent, "*") != -1) 0 0 0
Condition0%0/3
$picks_from_parent and index($picks_from_parent, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
$picks_from_parent and index($picks_from_parent, "*") != -1
$picks_from_parent index($picks_from_parent, "*") != -1
Truth table0%0/3
A and B
A= $picks_from_parentB= index($picks_from_parent, "*") != -1
ABresult
0X0
100
111
1418 0 $log_handle=$picks_from_parent;
1419 0 $picks_from_parent='';
1420 }
1421 0 my $unattended=0;
1422 0 ▶ if ($picks_from_parent=~/\](Cron|Batch|Unattended|FullAuto)\[/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($picks_from_parent =~ /\](Cron|Batch|Unattended|FullAuto)\[/i) 0 0 0
1423 0 $unattended=1;
1424 0 undef $picks_from_parent;
1425 }
1426 0 ▶ my $recurse = (defined $_[2]) ? $_[2] : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[2] ? : 0 0 0
1427 0 ▶ my $FullMenu= (defined $_[3]) ? $_[3] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[3] ? : 0 0 0
1428 0 ▶ my $Selected= (defined $_[4]) ? $_[4] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
1429 0 ▶ my $Conveyed= (defined $_[5]) ? $_[5] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[5] ? : 0 0 0
1430 0 ▶ my $SavePick= (defined $_[6]) ? $_[6] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[6] ? : 0 0 0
1431 0 ▶ my $SaveMMap= (defined $_[7]) ? $_[7] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[7] ? : 0 0 0
1432 0 ▶ my $SaveNext= (defined $_[8]) ? $_[8] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[8] ? : 0 0 0
1433 0 ▶ my $Persists= (defined $_[9]) ? $_[9] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[9] ? : 0 0 0
1434 0 ▶ my $parent_menu= (defined $_[10]) ? $_[10] : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[10] ? : 0 0 0
1435 0 my $no_wantarray=0;
1436
1437 0 ▶ if ((defined $_[11] && $_[11]) ||
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[11] and $_[11] or (caller)[0] ne __PACKAGE__ and not wantarray) 0 0 0
Condition0%0/9
defined $_[11] and $_[11] or (caller)[0] ne __PACKAGE__ and not wantarray
l!l&&r!l&&!r
000
defined $_[11] and $_[11]
!ll&&!rl&&r
000
(caller)[0] ne __PACKAGE__ and not wantarray
!ll&&!rl&&r
000
MC/DC0%0/4
defined $_[11] and $_[11] or (caller)[0] ne __PACKAGE__ and not wantarray
defined $_[11] $_[11] (caller)[0] ne __PACKAGE__ not wantarray
Truth table0%0/7
A and B or C and not(D)
A= defined $_[11]B= $_[11]C= (caller)[0] ne __PACKAGE__D= not wantarray
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
1438 ((caller)[0] ne __PACKAGE__ && !wantarray)) {
1439 0 $no_wantarray=1;
1440 }
1441 0 ▶ if (defined $_[12] && $_[12]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[12] and $_[12]) 0 0 0
Condition0%0/3
defined $_[12] and $_[12]
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_[12] and $_[12]
defined $_[12] $_[12]
Truth table0%0/3
A and B
A= defined $_[12]B= $_[12]
ABresult
0X0
100
111
1442 0 return '','','','','','','','','','','',$_[12];
1443 }
1444 0 ▶ if (defined $_[13] && $_[13]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[13] and $_[13]) 0 0 0
Condition0%0/3
defined $_[13] and $_[13]
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_[13] and $_[13]
defined $_[13] $_[13]
Truth table0%0/3
A and B
A= defined $_[13]B= $_[13]
ABresult
0X0
100
111
1445 0 $log_handle=$_[13];
1446 }
1447 0 my %Items=();my %negate=();my %result=();my %convey=();
1448 0 my %chosen=();my %default=();my %select=();my %mark=();
1449 0 my $pick='';my $picks=[];my %num__=();
1450 0 my $display_this_many_items=10;my $die_err='';
1451 0 my $master_substituted='';my $convey='';$mark{BLANK}=1;
1452 0 my $show_banner_only=0;
1453 0 my $num=0;my @convey=();my $filtered=0;my $sorted='';
1454 0 foreach my $key (keys %{$MenuUnit_hash_ref}) {
1455 0 ▶ if (4<length $key && substr($key,0,4) eq 'Item') {
Branch: 1 branch
BranchTrueFalseTotal
if (4 < length $key and substr($key, 0, 4) eq "Item") 0 0 0
Condition0%0/3
4 < length $key and substr($key, 0, 4) eq "Item"
!ll&&!rl&&r
000
MC/DC0%0/2
4 < length $key and substr($key, 0, 4) eq "Item"
4 < length $key substr($key, 0, 4) eq "Item"
Truth table0%0/3
A and B
A= 4 < length $keyB= substr($key, 0, 4) eq "Item"
ABresult
0X0
100
111
1456 0 $Items{substr($key,5)}=$MenuUnit_hash_ref->{$key};
1457 }
1458 }
1459 0 ▶ $Persists->{unattended}=$unattended if $unattended;
Branch: 1 branch
BranchTrueFalseTotal
if $unattended 0 0 0
1460 my $start=($FullMenu->{$MenuUnit_hash_ref}[11])?
1461 0 ▶ $FullMenu->{$MenuUnit_hash_ref}[11]:0;
Branch: 1 branch
BranchTrueFalseTotal
$FullMenu->{$MenuUnit_hash_ref}[11] ? : 0 0 0
1462
1463 ############################################
1464 # Breakdown the MenuUnit into its Components
1465 ############################################
1466
1467 # Breakdown Each Item into its Components
1468 #########################################
1469
1470 0 my $got_item_flag=0;
1471 0 ▶ while (++$num) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$num) 0 0 0
1472 0 ▶ $start=$FullMenu->{$MenuUnit_hash_ref}[11]||0;
Condition0%0/2
$FullMenu->{$MenuUnit_hash_ref}[11] || 0
l!l
00
MC/DC0%0/1
$FullMenu->{$MenuUnit_hash_ref}[11] || 0
$FullMenu->{$MenuUnit_hash_ref}[11]
Truth table0%0/2
A
A= $FullMenu->{$MenuUnit_hash_ref}[11]
Aresult
11
00
1473 0 @convey=();
1474 0 ▶ unless (exists $Items{$num}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Items{$num}) { } 0 0 0
1475 0 ▶ if (exists $MenuUnit_hash_ref->{Banner} && !$got_item_flag) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Banner'} and not $got_item_flag) { } 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Banner"} and not $got_item_flag
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Banner"} and not $got_item_flag
exists $MenuUnit_hash_ref->{"Banner"} not $got_item_flag
Truth table0%0/3
A and not(B)
A= exists $MenuUnit_hash_ref->{"Banner"}B= not $got_item_flag
ABresult
0X0
100
111
1476 0 $show_banner_only=1;
1477 0 } else { last }
1478 } else {
1479 0 $got_item_flag=1;
1480 }
1481 0 ▶ if (exists $Items{$num}->{Negate} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Items{$num}{"Negate"} and not keys %{$$MenuUnit_hash_ref{"Select"};}) 0 0 0
Condition0%0/3
exists $Items{$num}{"Negate"} and not keys %{$$MenuUnit_hash_ref{"Select"};}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Negate"} and not keys %{$$MenuUnit_hash_ref{"Select"};}
exists $Items{$num}{"Negate"} not keys %{$$MenuUnit_hash_ref{"Select"};}
Truth table0%0/3
A and not(B)
A= exists $Items{$num}{"Negate"}B= not keys %{$$MenuUnit_hash_ref{"Select"};}
ABresult
0X0
100
111
1482 0 !(keys %{$MenuUnit_hash_ref->{Select}})) {
1483 0 my $die="Can Only Use \"Negate =>\""
1484 ."\n\t\tElement in ".__PACKAGE__.".pm when the"
1485 ."\n\t\t\"Select =>\" Element is set to \'Many\'\n\n";
1486 0 ▶ &Net::FullAuto::FA_Core::handle_error($die)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fullauto 0 0 0
1487 if $Term::Menus::fullauto;
1488 0 die $die;
1489 }
1490 0 my $con_regex=qr/\]c(o+nvey)*\[/i;
1491 0 ▶ if (exists $Items{$num}->{Convey}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $Items{$num}{'Convey'}) { } 0 0 0
elsif ($show_banner_only) { } 0 0 0
1492 0 my $convey_test=$Items{$num}->{Convey};
1493 0 ▶ if (ref $Items{$num}->{Convey} eq 'ARRAY') {
Branch: 3 branches
BranchTrueFalseTotal
if (ref $Items{$num}{'Convey'} eq 'ARRAY') { } 0 0 0
elsif (ref $Items{$num}{'Convey'} eq 'CODE') { } 0 0 0
elsif ($convey_test =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module('main', $Term::Menus::fa_code)) { } 0 0 0
1494 0 foreach my $line (@{$Items{$num}->{Convey}}) {
1495 0 push @convey, $line;
1496 }
1497 } elsif (ref $Items{$num}->{Convey} eq 'CODE') {
1498 0 my $convey_code=$Items{$num}->{Convey};
1499 0 ▶ if ($Term::Menus::data_dump_streamer) {
Branch: 1 branch
BranchTrueFalseTotal
if ($data_dump_streamer) 0 0 0
1500 0 $convey_code=
1501 &Data::Dump::Streamer::Dump($convey_code)->Out();
1502 #print "PICKSFROMPARENTXX=$picks_from_parent AND CONVEY_CODE=$convey_code\n";
1503 0 $convey_code=&transform_pmsi($convey_code,
1504 $Conveyed,$SaveMMap,$picks_from_parent);
1505 }
1506 #print "WHAT IS CDNOW1=$convey_code<==\n";
1507 0 $convey_code=~s/\$CODE\d*\s*=\s*//s;
1508 #print "WHAT IS CDREALLYNOW=$convey_code<==\n";<STDIN>;
1509 0 my $eval_convey_code=eval $convey_code;
1510 0 ▶ $eval_convey_code||=sub {};
Subroutine __ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
$eval_convey_code ||= sub { }
l!l&&r!l&&!r
000
MC/DC0%0/2
$eval_convey_code ||= sub { }
$eval_convey_code sub { }
Truth table0%0/3
A ||= B
A= $eval_convey_codeB= sub { }
ABresult
1X1
011
000
1511 0 @convey=$eval_convey_code->();
1512 0 ▶ @convey=@{$convey[0]} if ref $convey[0] eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $convey[0] eq "ARRAY" 0 0 0
1513 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
1514 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
1515 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
1516 0 return '',$FullMenu,$Selected,$Conveyed,
1517 $SavePick,$SaveMMap,$SaveNext,
1518 $Persists,$parent_menu,$@;
1519 }
1520 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1521 -1<index $log_handle,'*') {
1522 0 print $log_handle $@;
1523 0 close($log_handle);
1524 }
1525 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1526 0 &Net::FullAuto::FA_Core::handle_error($@);
1527 0 } else { die $@ }
1528 } else {
1529 0 my $die="\n FATAL ERROR! - The Local "
1530 ."System $Term::Menus::local_hostname "
1531 ."Conveyed\n"
1532 ." the Following "
1533 ."Unrecoverable Error Condition :\n\n"
1534 ." $@\n line ".__LINE__;
1535 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
1536 0 return '',$FullMenu,$Selected,$Conveyed,
1537 $SavePick,$SaveMMap,$SaveNext,
1538 $Persists,$parent_menu,$die;
1539 }
1540 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
1541 -1<index $log_handle,'*') {
1542 0 print $log_handle $die;
1543 0 close($log_handle);
1544 }
1545 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
1546 0 &Net::FullAuto::FA_Core::handle_error($die);
1547 0 } else { die $die }
1548 }
1549 }
1550 0 ▶ if (0==$#convey && $convey[0]=~/^(?:[{](.*)[}])?[<]$/) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 == $#convey and $convey[0] =~ /^(?:[{](.*)[}])?[<]$/) 0 0 0
Condition0%0/3
0 == $#convey and $convey[0] =~ /^(?:[{](.*)[}])?[<]$/
!ll&&!rl&&r
000
MC/DC0%0/2
0 == $#convey and $convey[0] =~ /^(?:[{](.*)[}])?[<]$/
0 == $#convey $convey[0] =~ /^(?:[{](.*)[}])?[<]$/
Truth table0%0/3
A and B
A= 0 == $#conveyB= $convey[0] =~ /^(?:[{](.*)[}])?[<]$/
ABresult
0X0
100
111
1551 0 return \@convey;
1552 }
1553 ▶ } elsif ($convey_test=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Condition0%0/3
$convey_test =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$convey_test =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$convey_test =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $convey_test =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
1554 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
1555 0 ▶ if (defined $picks_from_parent &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $picks_from_parent and not ref $picks_from_parent) 0 0 0
Condition0%0/3
defined $picks_from_parent and not ref $picks_from_parent
!ll&&!rl&&r
000
MC/DC0%0/2
defined $picks_from_parent and not ref $picks_from_parent
defined $picks_from_parent not ref $picks_from_parent
Truth table0%0/3
A and not(B)
A= defined $picks_from_parentB= not ref $picks_from_parent
ABresult
0X0
100
111
1556 !ref $picks_from_parent) {
1557 my $transformed_convey=
1558 &transform_pmsi($Items{$num}->{Convey},
1559 0 $Conveyed,$SaveMMap,
1560 $picks_from_parent);
1561 0 ▶ if ($transformed_convey!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $transformed_convey =~ /::/) { } 0 0 0
1562 0 $transformed_convey=~s/^[&]//;
1563 0 eval "\@convey=main::$transformed_convey";
1564 } else {
1565 0 eval "\@convey=$transformed_convey";
1566 }
1567 }
1568 } else {
1569 0 push @convey, $Items{$num}->{Convey};
1570 }
1571 0 foreach my $item (@convey) {
1572 0 ▶ next if $item=~/^\s*$/s;
Branch: 1 branch
BranchTrueFalseTotal
if $item =~ /^\s*$/s 0 0 0
1573 0 my $text=$Items{$num}->{Text};
1574 0 $text=~s/$con_regex/$item/g;
1575 0 $text=&transform_pmsi($text,
1576 $Conveyed,$SaveMMap,
1577 $picks_from_parent);
1578 0 ▶ if (-1<index $text,"__Master_${$}__") {
Branch: 1 branch
BranchTrueFalseTotal
if (index($text, "__Master_${$}__") != -1) 0 0 0
1579 0 $text=~
1580 s/__Master_${$}__/Local-Host: $Term::Menus::local_hostname/sg;
1581 0 $master_substituted="Local-Host: $Term::Menus::local_hostname";
1582 }
1583 0 ▶ if (exists $Items{$num}->{Include}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $Items{$num}{'Include'}) { } 0 0 0
elsif (exists $Items{$num}{'Exclude'} and $text =~ /$Items{$num}{'Exclude'}/) { } 0 0 0
1584 0 ▶ if ($text=~/$Items{$num}->{Include}/s) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /$Items{$num}{'Include'}/s) { } 0 0 0
1585 next if exists $Items{$num}->{Exclude} &&
1586 0 ▶ $text=~/$Items{$num}->{Exclude}/;
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Exclude"} and $text =~ /$Items{$num}{"Exclude"}/ 0 0 0
Condition0%0/3
exists $Items{$num}{"Exclude"} and $text =~ /$Items{$num}{"Exclude"}/
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Exclude"} and $text =~ /$Items{$num}{"Exclude"}/
exists $Items{$num}{"Exclude"} $text =~ /$Items{$num}{"Exclude"}/
Truth table0%0/3
A and B
A= exists $Items{$num}{"Exclude"}B= $text =~ /$Items{$num}{"Exclude"}/
ABresult
0X0
100
111
1587 0 push @{$picks}, $text;
1588 } else {
1589 0 next;
1590 }
1591 ▶ } elsif (exists $Items{$num}->{Exclude} &&
Condition0%0/3
exists $Items{$num}{"Exclude"} and $text =~ /$Items{$num}{"Exclude"}/
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Exclude"} and $text =~ /$Items{$num}{"Exclude"}/
exists $Items{$num}{"Exclude"} $text =~ /$Items{$num}{"Exclude"}/
Truth table0%0/3
A and B
A= exists $Items{$num}{"Exclude"}B= $text =~ /$Items{$num}{"Exclude"}/
ABresult
0X0
100
111
1592 $text=~/$Items{$num}->{Exclude}/) {
1593 0 next;
1594 } else {
1595 0 push @{$picks}, $text;
1596 }
1597 0 ▶ if (exists $Items{$num}->{Convey} &&
Branch: 2 branches
BranchTrueFalseTotal
if (exists $Items{$num}{'Convey'} and $Items{$num}{'Convey'} ne '') { } 0 0 0
elsif (not exists $Items{$num}{'Convey'}) { } 0 0 0
Condition0%0/3
exists $Items{$num}{"Convey"} and $Items{$num}{"Convey"} ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Convey"} and $Items{$num}{"Convey"} ne ""
exists $Items{$num}{"Convey"} $Items{$num}{"Convey"} ne ""
Truth table0%0/3
A and B
A= exists $Items{$num}{"Convey"}B= $Items{$num}{"Convey"} ne ""
ABresult
0X0
100
111
1598 $Items{$num}->{Convey} ne '') {
1599 0 $convey{$text}=[$item,$Items{$num}->{Convey}];
1600 } elsif (!exists $Items{$num}->{Convey}) {
1601 0 $convey{$text}=[$item,''];
1602 }
1603 $default{$text}=$Items{$num}->{Default}
1604 0 ▶ if exists $Items{$num}->{Default};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Default"} 0 0 0
1605 #print "WHAT IS THIS=$text and NEGATE=",$Items{$num}->{Negate}," and KEYS=",keys %{$Items{$num}},"\n";
1606 $negate{$text}=$Items{$num}->{Negate}
1607 0 ▶ if exists $Items{$num}->{Negate};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Negate"} 0 0 0
1608 0 ▶ if (exists $FullMenu->{$MenuUnit_hash_ref}[2]{$text}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $FullMenu->{$MenuUnit_hash_ref}[2]{$text}) { } 0 0 0
elsif (exists $Items{$num}{'Result'}) { } 0 0 0
1609 $result{$text}=
1610 0 $FullMenu->{$MenuUnit_hash_ref}[2]{$text};
1611 } elsif (exists $Items{$num}->{Result}) {
1612 $result{$text}=$Items{$num}->{Result}
1613 0 }
1614 0 my $tsttt=$Items{$num}->{Select};
1615 $select{$text}=$Items{$num}->{Select}
1616 if exists $Items{$num}->{Select}
1617 0 ▶ && $tsttt=~/many/i;
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Select"} and $tsttt =~ /many/i 0 0 0
Condition0%0/3
exists $Items{$num}{"Select"} and $tsttt =~ /many/i
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Select"} and $tsttt =~ /many/i
exists $Items{$num}{"Select"} $tsttt =~ /many/i
Truth table0%0/3
A and B
A= exists $Items{$num}{"Select"}B= $tsttt =~ /many/i
ABresult
0X0
100
111
1618 0 ▶ if (exists $Items{$num}->{Mark}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Items{$num}{"Mark"}) 0 0 0
1619 0 $mark{$text}=$Items{$num}->{Mark};
1620 0 my $lmt=length $mark{$text};
1621 0 ▶ $mark{BLANK}=$lmt if $mark{BLANK}<$lmt;
Branch: 1 branch
BranchTrueFalseTotal
if $mark{"BLANK"} < $lmt 0 0 0
1622 }
1623 0 ▶ $filtered=1 if exists $Items{$num}->{Filter};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Filter"} 0 0 0
1624 $sorted=$Items{$num}->{Sort}
1625 0 ▶ if exists $Items{$num}->{Sort};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Sort"} 0 0 0
1626 0 $chosen{$text}="Item_$num";
1627 }
1628 } elsif ($show_banner_only) {
1629 0 ▶ if (exists $MenuUnit_hash_ref->{Result}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{"Result"}) 0 0 0
1630 0 $result{'__FA_Banner__'}=$MenuUnit_hash_ref->{Result};
1631 0 } last;
1632 } else {
1633 my $text=&transform_pmsi($Items{$num}->{Text},
1634 0 $Conveyed,$SaveMMap,
1635 $picks_from_parent);
1636 0 ▶ if (-1<index $Items{$num}->{Text},"__Master_${$}__") {
Branch: 1 branch
BranchTrueFalseTotal
if (index($Items{$num}{"Text"}, "__Master_${$}__") != -1) 0 0 0
1637 0 $text=~
1638 s/__Master_${$}__/Local-Host: $Term::Menus::local_hostname/sg;
1639 0 $master_substituted=
1640 "Local-Host: $Term::Menus::local_hostname";
1641 }
1642 0 ▶ if (exists $Items{$num}->{Include}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $Items{$num}{'Include'}) { } 0 0 0
elsif (exists $Items{$num}{'Exclude'} and $Items{$num}{'Text'} =~ /$Items{$num}{'Exclude'}/) { } 0 0 0
1643 0 ▶ if ($Items{$num}->{Text}=~/$Items{$num}->{Include}/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Items{$num}{'Text'} =~ /$Items{$num}{'Include'}/) { } 0 0 0
1644 next if exists $Items{$num}->{Exclude} &&
1645 0 ▶ $Items{$num}->{Text}=~/$Items{$num}->{Exclude}/;
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Exclude"} and $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/ 0 0 0
Condition0%0/3
exists $Items{$num}{"Exclude"} and $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Exclude"} and $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
exists $Items{$num}{"Exclude"} $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
Truth table0%0/3
A and B
A= exists $Items{$num}{"Exclude"}B= $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
ABresult
0X0
100
111
1646 0 push @{$picks}, $text;
1647 0 } else { next }
1648 ▶ } elsif (exists $Items{$num}->{Exclude} &&
Condition0%0/3
exists $Items{$num}{"Exclude"} and $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Exclude"} and $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
exists $Items{$num}{"Exclude"} $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
Truth table0%0/3
A and B
A= exists $Items{$num}{"Exclude"}B= $Items{$num}{"Text"} =~ /$Items{$num}{"Exclude"}/
ABresult
0X0
100
111
1649 $Items{$num}->{Text}=~/$Items{$num}->{Exclude}/) {
1650 0 next;
1651 0 } else { push @{$picks}, $text }
1652 $convey{$Items{$num}->{Text}}=['',$Items{$num}->{Convey}]
1653 0 ▶ if exists $Items{$num}->{Convey};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Convey"} 0 0 0
1654 $default{$text}=$Items{$num}->{Default}
1655 0 ▶ if exists $Items{$num}->{Default};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Default"} 0 0 0
1656 $negate{$text}=$Items{$num}->{Negate}
1657 0 ▶ if exists $Items{$num}->{Negate};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Negate"} 0 0 0
1658 0 ▶ if (exists $FullMenu->{$MenuUnit_hash_ref}[2]{$text}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $FullMenu->{$MenuUnit_hash_ref}[2]{$text}) { } 0 0 0
elsif (exists $Items{$num}{'Result'}) { } 0 0 0
1659 $result{$text}=
1660 0 $FullMenu->{$MenuUnit_hash_ref}[2]{$text};
1661 } elsif (exists $Items{$num}->{Result}) {
1662 $result{$text}=$Items{$num}->{Result}
1663 0 }
1664 0 ▶ my $tsttt=$Items{$num}->{Select}||'';
Condition0%0/2
$Items{$num}{'Select'} || ''
l!l
00
MC/DC0%0/1
$Items{$num}{'Select'} || ''
$Items{$num}{'Select'}
Truth table0%0/2
A
A= $Items{$num}{'Select'}
Aresult
11
00
1665 $select{$text}=$Items{$num}->{Select}
1666 if exists $Items{$num}->{Select}
1667 0 ▶ && $tsttt=~/many/i;
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Select"} and $tsttt =~ /many/i 0 0 0
Condition0%0/3
exists $Items{$num}{"Select"} and $tsttt =~ /many/i
!ll&&!rl&&r
000
MC/DC0%0/2
exists $Items{$num}{"Select"} and $tsttt =~ /many/i
exists $Items{$num}{"Select"} $tsttt =~ /many/i
Truth table0%0/3
A and B
A= exists $Items{$num}{"Select"}B= $tsttt =~ /many/i
ABresult
0X0
100
111
1668 0 ▶ if (exists $Items{$num}->{Mark}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Items{$num}{"Mark"}) 0 0 0
1669 0 $mark{$text}=$Items{$num}->{Mark};
1670 0 my $lmt=length $mark{$text};
1671 0 ▶ $mark{BLANK}=$lmt if $mark{BLANK}<$lmt;
Branch: 1 branch
BranchTrueFalseTotal
if $mark{"BLANK"} < $lmt 0 0 0
1672 }
1673 0 ▶ $filtered=1 if exists $Items{$num}->{Filter};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Filter"} 0 0 0
1674 $sorted=$Items{$num}->{Sort}
1675 0 ▶ if exists $Items{$num}->{Sort};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"Sort"} 0 0 0
1676 0 $chosen{$text}="Item_$num";
1677 $num__{$text}=$Items{$num}->{__NUM__}
1678 0 ▶ if exists $Items{$num}->{__NUM__};
Branch: 1 branch
BranchTrueFalseTotal
if exists $Items{$num}{"__NUM__"} 0 0 0
1679 }
1680 }
1681
1682
1683 #########################################
1684 # End Items Breakdown
1685
1686 $display_this_many_items=$_[0]->{Display}
1687 0 ▶ if exists $_[0]->{Display};
Branch: 1 branch
BranchTrueFalseTotal
if exists $_[0]{"Display"} 0 0 0
1688
1689 0 ▶ if (exists $MenuUnit_hash_ref->{Scroll} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{"Scroll"} and ref $MenuUnit_hash_ref->{"Scroll"} ne "ARRAY") 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Scroll"} and ref $MenuUnit_hash_ref->{"Scroll"} ne "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Scroll"} and ref $MenuUnit_hash_ref->{"Scroll"} ne "ARRAY"
exists $MenuUnit_hash_ref->{"Scroll"} ref $MenuUnit_hash_ref->{"Scroll"} ne "ARRAY"
Truth table0%0/3
A and B
A= exists $MenuUnit_hash_ref->{"Scroll"}B= ref $MenuUnit_hash_ref->{"Scroll"} ne "ARRAY"
ABresult
0X0
100
111
1690 ref $MenuUnit_hash_ref->{Scroll} ne 'ARRAY') {
1691 $MenuUnit_hash_ref->{Scroll}=
1692 0 [ $MenuUnit_hash_ref->{Scroll},1 ];
1693 }
1694
1695 ############################################
1696 # End MenuUnit Breakdown
1697 ############################################
1698
1699 0 ▶ %default=() if defined $FullMenu->{$MenuUnit_hash_ref}[5];
Branch: 1 branch
BranchTrueFalseTotal
if defined $FullMenu->{$MenuUnit_hash_ref}[5] 0 0 0
1700 0 ▶ my $nm_=(keys %num__)?\%num__:{};
Branch: 1 branch
BranchTrueFalseTotal
keys %num__ ? : 0 0 0
1701 #print "MENU=",$MenuUnit_hash_ref->{Name}," and CONVEY=",keys %convey,"\n";<STDIN>;
1702 0 $FullMenu->{$MenuUnit_hash_ref}=[ $MenuUnit_hash_ref,
1703 \%negate,\%result,\%convey,\%chosen,\%default,
1704 \%select,\%mark,$nm_,$filtered,$picks,$start ];
1705 0 ▶ if ($select_many || keys %{$MenuUnit_hash_ref->{Select}}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($select_many or keys %{$$MenuUnit_hash_ref{'Select'};}) { } 0 0 0
Condition0%0/3
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
$select_many keys %{$$MenuUnit_hash_ref{"Select"};}
Truth table0%0/3
A or B
A= $select_manyB= keys %{$$MenuUnit_hash_ref{"Select"};}
ABresult
1X1
011
000
1706 0 my @filtered_menu_return=();
1707 0 my $error='';
1708 ($pick,$FullMenu,$Selected,$Conveyed,$SavePick,
1709 $SaveMMap,$SaveNext,$Persists,$parent_menu,
1710 @filtered_menu_return,$error)=&pick(
1711 0 ▶ $picks,$MenuUnit_hash_ref->{Banner}||'',
Condition0%0/2
$MenuUnit_hash_ref->{'Banner'} || ''
l!l
00
MC/DC0%0/1
$MenuUnit_hash_ref->{'Banner'} || ''
$MenuUnit_hash_ref->{'Banner'}
Truth table0%0/2
A
A= $MenuUnit_hash_ref->{'Banner'}
Aresult
11
00
1712 $display_this_many_items,'','',
1713 $MenuUnit_hash_ref,++$recurse,
1714 $picks_from_parent,$parent_menu,
1715 $FullMenu,$Selected,$Conveyed,$SavePick,
1716 $SaveMMap,$SaveNext,$Persists,
1717 $no_wantarray,$sorted,
1718 $select_many);
1719 0 ▶ if (-1<$#filtered_menu_return) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#filtered_menu_return) 0 0 0
1720 0 return $pick,$FullMenu,$Selected,$Conveyed,$SavePick,
1721 $SaveMMap,$SaveNext,$Persists,$parent_menu,
1722 $filtered_menu_return[0],$filtered_menu_return[1],
1723 $filtered_menu_return[2];
1724 }
1725 0 ▶ if ($Term::Menus::fullauto && $master_substituted) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and $master_substituted) 0 0 0
Condition0%0/3
$Term::Menus::fullauto and $master_substituted
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fullauto and $master_substituted
$Term::Menus::fullauto $master_substituted
Truth table0%0/3
A and B
A= $Term::Menus::fullautoB= $master_substituted
ABresult
0X0
100
111
1726 0 $pick=~s/$master_substituted/__Master_${$}__/sg;
1727 }
1728 0 ▶ if ($pick eq ']quit[') {
Branch: 5 branches
BranchTrueFalseTotal
if ($pick eq ']quit[') { } 0 0 0
elsif ($pick eq '-' or $pick eq '+') { } 0 0 0
elsif ($pick =~ /DONE/) { } 0 0 0
elsif (ref $pick eq 'ARRAY' and wantarray and not $no_wantarray and 1 == $recurse) { } 0 0 0
elsif ($pick) { } 0 0 0
1729 0 return ']quit['
1730 ▶ } elsif ($pick eq '-' || $pick eq '+') {
Condition0%0/3
$pick eq "-" or $pick eq "+"
l!l&&r!l&&!r
000
MC/DC0%0/2
$pick eq "-" or $pick eq "+"
$pick eq "-" $pick eq "+"
Truth table0%0/3
A or B
A= $pick eq "-"B= $pick eq "+"
ABresult
1X1
011
000
1731 0 return $pick,$FullMenu,$Selected,$Conveyed,
1732 $SavePick,$SaveMMap,$SaveNext,$Persists;
1733 } elsif ($pick=~/DONE/) {
1734 0 return $pick,$FullMenu,$Selected,$Conveyed,
1735 $SavePick,$SaveMMap,$SaveNext,$Persists;
1736 ▶ } elsif (ref $pick eq 'ARRAY' && wantarray
Condition0%0/9
ref $pick eq "ARRAY" and wantarray and not $no_wantarray and 1 == $recurse
!ll&&!rl&&r
000
ref $pick eq "ARRAY" and wantarray and not $no_wantarray
!ll&&!rl&&r
000
ref $pick eq "ARRAY" and wantarray
!ll&&!rl&&r
000
MC/DC0%0/4
ref $pick eq "ARRAY" and wantarray and not $no_wantarray and 1 == $recurse
ref $pick eq "ARRAY" wantarray not $no_wantarray 1 == $recurse
Truth table0%0/5
A and B and not(C) and D
A= ref $pick eq "ARRAY"B= wantarrayC= not $no_wantarrayD= 1 == $recurse
ABCDresult
0XXX0
10XX0
110X0
11100
11111
1737 && !$no_wantarray && 1==$recurse) {
1738 0 ▶ if (ref $pick->[$#{$pick}] eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $$pick[$#{$pick;}] eq "HASH") 0 0 0
1739 0 my @choyce=@{$pick};undef @{$pick};undef $pick;
1740 0 pop @choyce;
1741 0 pop @choyce;
1742 return @choyce
1743 0 }
1744 0 my @choyce=@{$pick};undef @{$pick};undef $pick;
1745 return @choyce
1746 0 } elsif ($pick) { return $pick }
1747 } else {
1748 0 my @filtered_menu_return=();
1749 0 my $error='';
1750 ($pick,$FullMenu,$Selected,$Conveyed,$SavePick,
1751 $SaveMMap,$SaveNext,$Persists,$parent_menu,
1752 @filtered_menu_return,$error)
1753 0 ▶ =&pick($picks,$MenuUnit_hash_ref->{Banner}||'',
Condition0%0/2
$MenuUnit_hash_ref->{'Banner'} || ''
l!l
00
MC/DC0%0/1
$MenuUnit_hash_ref->{'Banner'} || ''
$MenuUnit_hash_ref->{'Banner'}
Truth table0%0/2
A
A= $MenuUnit_hash_ref->{'Banner'}
Aresult
11
00
1754 $display_this_many_items,
1755 '','',$MenuUnit_hash_ref,++$recurse,
1756 $picks_from_parent,$parent_menu,
1757 $FullMenu,$Selected,$Conveyed,$SavePick,
1758 $SaveMMap,$SaveNext,$Persists,
1759 $no_wantarray,$sorted,
1760 $select_many);
1761 0 ▶ if (-1<$#filtered_menu_return) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#filtered_menu_return) 0 0 0
1762 0 return $pick,$FullMenu,$Selected,$Conveyed,$SavePick,
1763 $SaveMMap,$SaveNext,$Persists,$parent_menu,
1764 $filtered_menu_return[0],$filtered_menu_return[1],
1765 $filtered_menu_return[2];
1766 }
1767 #print "WAHT IS ALL=",keys %{$pick->[0]}," and FULL=$FullMenu and SEL=$Selected and CON=$Conveyed and SAVE=$SavePick and LAST=$SaveMMap and NEXT=$SaveNext and PERSISTS=$Persists and PARENT=$parent_menu<==\n";
1768 0 ▶ if ($Term::Menus::fullauto && $master_substituted) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and $master_substituted) 0 0 0
Condition0%0/3
$Term::Menus::fullauto and $master_substituted
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fullauto and $master_substituted
$Term::Menus::fullauto $master_substituted
Truth table0%0/3
A and B
A= $Term::Menus::fullautoB= $master_substituted
ABresult
0X0
100
111
1769 0 $pick=~s/$master_substituted/__Master_${$}__/sg;
1770 }
1771 0 ▶ if ($pick eq ']quit[') {
Branch: 5 branches
BranchTrueFalseTotal
if ($pick eq ']quit[') { } 0 0 0
elsif ($pick eq '-' or $pick eq '+') { } 0 0 0
elsif ($pick =~ /DONE/) { } 0 0 0
elsif (ref $pick eq 'ARRAY') { } 0 0 0
elsif ($pick) { } 0 0 0
1772 0 return ']quit['
1773 ▶ } elsif ($pick eq '-' || $pick eq '+') {
Condition0%0/3
$pick eq "-" or $pick eq "+"
l!l&&r!l&&!r
000
MC/DC0%0/2
$pick eq "-" or $pick eq "+"
$pick eq "-" $pick eq "+"
Truth table0%0/3
A or B
A= $pick eq "-"B= $pick eq "+"
ABresult
1X1
011
000
1774 0 ▶ unless (keys %{$SavePick->{$MenuUnit_hash_ref}}) {
Branch: 2 branches
BranchTrueFalseTotal
if (keys %{$$SavePick{$MenuUnit_hash_ref};}) { } 0 0 0
if (do { $select_many or keys %{$$Selected{$MenuUnit_hash_ref};} }) { } 0 0 0
1775 0 return $pick,$FullMenu,$Selected,$Conveyed,
1776 $SavePick,$SaveMMap,$SaveNext,$Persists;
1777 0 ▶ } elsif ($select_many || keys %{$Selected->{$MenuUnit_hash_ref}}) {
Condition0%0/3
$select_many or keys %{$$Selected{$MenuUnit_hash_ref};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or keys %{$$Selected{$MenuUnit_hash_ref};}
$select_many keys %{$$Selected{$MenuUnit_hash_ref};}
Truth table0%0/3
A or B
A= $select_manyB= keys %{$$Selected{$MenuUnit_hash_ref};}
ABresult
1X1
011
000
1778 0 return '+',$FullMenu,$Selected,$Conveyed,
1779 $SavePick,$SaveMMap,$SaveNext,$Persists;
1780 } else {
1781 0 return $pick,$FullMenu,$Selected,$Conveyed,
1782 $SavePick,$SaveMMap,$SaveNext,$Persists;
1783 }
1784 } elsif ($pick=~/DONE/) {
1785 0 return $pick,$FullMenu,$Selected,$Conveyed,
1786 $SavePick,$SaveMMap,$SaveNext,$Persists;
1787 } elsif (ref $pick eq 'ARRAY') {
1788 0 my $topmenu='';
1789 0 my $savpick='';
1790 0 ▶ if (1==$recurse && ref $pick->[$#{$pick}] eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse and ref $$pick[$#{$pick;}] eq "HASH") 0 0 0
Condition0%0/3
1 == $recurse and ref $$pick[$#{$pick;}] eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
1 == $recurse and ref $$pick[$#{$pick;}] eq "HASH"
1 == $recurse ref $$pick[$#{$pick;}] eq "HASH"
Truth table0%0/3
A and B
A= 1 == $recurseB= ref $$pick[$#{$pick;}] eq "HASH"
ABresult
0X0
100
111
1791 0 $topmenu=pop @{$pick};
1792 0 $savpick=pop @{$pick};
1793 }
1794 0 ▶ if (wantarray && 1==$recurse) {
Branch: 3 branches
BranchTrueFalseTotal
if (wantarray and 1 == $recurse) { } 0 0 0
elsif (ref $pick eq 'ARRAY' and -1 < $#{$pick;} and $pick->[0] =~ /^[{](.*)[}][<]$/) { } 0 0 0
elsif (not $picks_from_parent || keys %{$$MenuUnit_hash_ref{'Select'};}) { } 0 0 0
Condition0%0/3
wantarray and 1 == $recurse
!ll&&!rl&&r
000
MC/DC0%0/2
wantarray and 1 == $recurse
wantarray 1 == $recurse
Truth table0%0/3
A and B
A= wantarrayB= 1 == $recurse
ABresult
0X0
100
111
1795 0 my @choyce=@{$pick};undef @{$pick};undef $pick;
1796 return @choyce
1797 0 ▶ } elsif (ref $pick eq 'ARRAY' && -1<$#{$pick} &&
Condition0%0/6
ref $pick eq "ARRAY" and -1 < $#{$pick;} and $pick->[0] =~ /^[{](.*)[}][<]$/
!ll&&!rl&&r
000
ref $pick eq "ARRAY" and -1 < $#{$pick;}
!ll&&!rl&&r
000
MC/DC0%0/3
ref $pick eq "ARRAY" and -1 < $#{$pick;} and $pick->[0] =~ /^[{](.*)[}][<]$/
ref $pick eq "ARRAY" -1 < $#{$pick;} $pick->[0] =~ /^[{](.*)[}][<]$/
Truth table0%0/4
A and B and C
A= ref $pick eq "ARRAY"B= -1 < $#{$pick;}C= $pick->[0] =~ /^[{](.*)[}][<]$/
ABCresult
0XX0
10X0
1100
1111
1798 $pick->[0]=~/^[{](.*)[}][<]$/) {
1799 0 return $pick,$FullMenu,$Selected,$Conveyed,
1800 $SavePick,$SaveMMap,$SaveNext,$Persists;
1801 ▶ } elsif (!$picks_from_parent &&
Condition0%0/3
$picks_from_parent || keys %{$$MenuUnit_hash_ref{'Select'};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$picks_from_parent || keys %{$$MenuUnit_hash_ref{'Select'};}
$picks_from_parent keys %{$$MenuUnit_hash_ref{'Select'};}
Truth table0%0/3
A || B
A= $picks_from_parentB= keys %{$$MenuUnit_hash_ref{'Select'};}
ABresult
1X1
011
000
1802 0 !(keys %{$MenuUnit_hash_ref->{Select}})) {
1803 0 ▶ if (ref $topmenu eq 'HASH' && (keys %{$topmenu->{Select}} &&
Branch: 3 branches
BranchTrueFalseTotal
if (ref $topmenu eq 'HASH' and (keys %{$$topmenu{'Select'};} and $topmenu->{'Select'} eq 'Many') or ref $savpick eq 'HASH' and exists $topmenu->{'Select'}{(keys %{$savpick;})[0]}) { } 0 0 0
elsif (-1 == $#{$pick;} and ref $topmenu eq 'HASH' and grep {/Item_/;} keys %{$topmenu;}) { } 0 0 0
elsif (0 == $#{$pick;}) { } 0 0 0
Condition0%0/12
ref $topmenu eq "HASH" and (keys %{$$topmenu{"Select"};} and $topmenu->{"Select"} eq "Many") or ref $savpick eq "HASH" and exists $topmenu->{"Select"}{(keys %{$savpick;})[0]}
l!l&&r!l&&!r
000
ref $topmenu eq "HASH" and (keys %{$$topmenu{"Select"};} and $topmenu->{"Select"} eq "Many")
!ll&&!rl&&r
000
keys %{$$topmenu{"Select"};} and $topmenu->{"Select"} eq "Many"
!ll&&!rl&&r
000
ref $savpick eq "HASH" and exists $topmenu->{"Select"}{(keys %{$savpick;})[0]}
!ll&&!rl&&r
000
MC/DC0%0/5
ref $topmenu eq "HASH" and (keys %{$$topmenu{"Select"};} and $topmenu->{"Select"} eq "Many") or ref $savpick eq "HASH" and exists $topmenu->{"Select"}{(keys %{$savpick;})[0]}
ref $topmenu eq "HASH" keys %{$$topmenu{"Select"};} $topmenu->{"Select"} eq "Many" ref $savpick eq "HASH" exists $topmenu->{"Select"}{(keys %{$savpick;})[0]}
Truth table0%0/10
A and B and C or D and E
A= ref $topmenu eq "HASH"B= keys %{$$topmenu{"Select"};}C= $topmenu->{"Select"} eq "Many"D= ref $savpick eq "HASH"E= exists $topmenu->{"Select"}{(keys %{$savpick;})[0]}
ABCDEresult
111XX1
0XX111
10X111
110111
0XX0X0
0XX100
10X0X0
10X100
1100X0
110100
1804 $topmenu->{Select} eq 'Many') || (ref $savpick eq 'HASH' &&
1805 0 exists $topmenu->{Select}->{(keys %{$savpick})[0]})) {
1806 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
1807 0 return @{$pick}
1808 } else {
1809 0 return $pick;
1810 }
1811 0 ▶ } elsif (-1==$#{$pick} &&
Condition0%0/6
-1 == $#{$pick;} and ref $topmenu eq "HASH" and grep {/Item_/;} keys %{$topmenu;}
!ll&&!rl&&r
000
-1 == $#{$pick;} and ref $topmenu eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/3
-1 == $#{$pick;} and ref $topmenu eq "HASH" and grep {/Item_/;} keys %{$topmenu;}
-1 == $#{$pick;} ref $topmenu eq "HASH" grep {/Item_/;} keys %{$topmenu;}
Truth table0%0/4
A and B and C
A= -1 == $#{$pick;}B= ref $topmenu eq "HASH"C= grep {/Item_/;} keys %{$topmenu;}
ABCresult
0XX0
10X0
1100
1111
1812 (ref $topmenu eq 'HASH') &&
1813 0 (grep { /Item_/ } keys %{$topmenu})) {
1814 0 return [ $topmenu ];
1815 0 } elsif (0==$#{$pick}) {
1816 0 return $pick->[0];
1817 } else {
1818 0 return $pick;
1819 }
1820 } else {
1821 0 ▶ if ($picks_from_parent) {
Branch: 1 branch
BranchTrueFalseTotal
if ($picks_from_parent) 0 0 0
1822 0 $pick->[0]=&transform_pmsi($pick->[0],
1823 $Conveyed,$SaveMMap,$picks_from_parent);
1824 }
1825 0 return $pick
1826 }
1827 0 } elsif ($pick) { return $pick }
1828 }
1829
1830 }
1831
1832 0 ▶sub pw {
Subroutine pw: not called CC=48 SCAR=77.6
Pod undocumented
1833
1834 ## pw [p]ad [w]alker
1835 #print "PWCALLER=",caller,"\n";
1836 return $_[0]->{Name} if ref $_[0] eq 'HASH'
1837 0 ▶ && exists $_[0]->{Name};
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[0] eq "HASH" and exists $_[0]{"Name"} 0 0 0
Condition0%0/3
ref $_[0] eq "HASH" and exists $_[0]{"Name"}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $_[0] eq "HASH" and exists $_[0]{"Name"}
ref $_[0] eq "HASH" exists $_[0]{"Name"}
Truth table0%0/3
A and B
A= ref $_[0] eq "HASH"B= exists $_[0]{"Name"}
ABresult
0X0
100
111
1838 0 my @packages=();
1839 0 ▶ @packages=@{$_[1]} if defined $_[1] && $_[1];
Branch: 1 branch
BranchTrueFalseTotal
if defined $_[1] and $_[1] 0 0 0
Condition0%0/3
defined $_[1] and $_[1]
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_[1] and $_[1]
defined $_[1] $_[1]
Truth table0%0/3
A and B
A= defined $_[1]B= $_[1]
ABresult
0X0
100
111
1840 0 my $name='';
1841 0 ▶ unless (ref $_[0] eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[0] eq 'HASH') { } 0 0 0
1842 0 return '';
1843 } else {
1844 0 my $flag=1;
1845 0 my $n=0;
1846 0 WH: while (1) {
1847 {
1848 0 local $SIG{__DIE__}; # No sigdie handler
1849 0 eval {
1850 0 $name=PadWalker::var_name($n++,$_[0]);
1851 };
1852 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
1853 0 undef $@;
1854 0 my $o=0;
1855 0 while (1) {
1856 0 eval {
1857 0 my $vars=PadWalker::peek_our($o++);
1858 0 foreach my $key (keys %{$vars}) {
1859 0 ▶ if (ref $vars->{$key} eq 'HASH' &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref $vars->{$key} eq "HASH" and %{$_[0];} eq %{$vars->{$key};}) 0 0 0
Condition0%0/3
ref $vars->{$key} eq "HASH" and %{$_[0];} eq %{$vars->{$key};}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $vars->{$key} eq "HASH" and %{$_[0];} eq %{$vars->{$key};}
ref $vars->{$key} eq "HASH" %{$_[0];} eq %{$vars->{$key};}
Truth table0%0/3
A and B
A= ref $vars->{$key} eq "HASH"B= %{$_[0];} eq %{$vars->{$key};}
ABresult
0X0
100
111
1860 0 %{$_[0]} eq %{$vars->{$key}}) {
1861 0 $name=$key;
1862 0 last;
1863 }
1864 }
1865 };
1866 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
1867 0 undef $@;
1868 0 my $s=0;
1869 0 unshift @packages, 'main';
1870 0 PK: foreach my $package (@packages) {
1871 0 my $obj=Devel::Symdump->rnew($package);
1872 0 foreach my $hash ($obj->hashes) {
1873 0 ▶ next if $hash=~/^_</;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^_</ 0 0 0
1874 0 ▶ next if $hash=~/^Term::Menus::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Term::Menus::/ 0 0 0
1875 0 ▶ next if $hash=~/^Config::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Config::/ 0 0 0
1876 0 ▶ next if $hash=~/^DynaLoader::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^DynaLoader::/ 0 0 0
1877 0 ▶ next if $hash=~/^warnings::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^warnings::/ 0 0 0
1878 0 ▶ next if $hash=~/^utf8::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^utf8::/ 0 0 0
1879 0 ▶ next if $hash=~/^Carp::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Carp::/ 0 0 0
1880 0 ▶ next if $hash=~/^fields::attr/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^fields::attr/ 0 0 0
1881 0 ▶ next if $hash=~/^Text::Balanced::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Text::Balanced::/ 0 0 0
1882 0 ▶ next if $hash=~/^Data::Dump::Streamer/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Data::Dump::Streamer/ 0 0 0
1883 0 ▶ next if $hash=~/^re::EXPORT_OK/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^re::EXPORT_OK/ 0 0 0
1884 0 ▶ next if $hash=~/^fa_code::email_addresses/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^fa_code::email_addresses/ 0 0 0
1885 0 ▶ next if $hash=~/^fa_code::email_defaults/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^fa_code::email_defaults/ 0 0 0
1886 0 ▶ next if $hash=~/^PadWalker::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^PadWalker::/ 0 0 0
1887 0 ▶ next if $hash=~/^Fcntl::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Fcntl::/ 0 0 0
1888 0 ▶ next if $hash=~/^B::Utils::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^B::Utils::/ 0 0 0
1889 0 ▶ next if $hash=~/^ExtUtils::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^ExtUtils::/ 0 0 0
1890 0 ▶ next if $hash=~/^Exporter::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Exporter::/ 0 0 0
1891 0 ▶ next if $hash=~/^Moo::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Moo::/ 0 0 0
1892 0 ▶ next if $hash=~/^overload::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^overload::/ 0 0 0
1893 0 ▶ next if $hash=~/^Term::ReadKey::/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Term::ReadKey::/ 0 0 0
1894 0 ▶ next if $hash=~/^main::INC/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^main::INC/ 0 0 0
1895 0 ▶ next if $hash=~/^main::SIG/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^main::SIG/ 0 0 0
1896 0 ▶ next if $hash=~/^main::ENV/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^main::ENV/ 0 0 0
1897 0 ▶ next if $hash=~/^main[:][^\w]*$/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^main[:][^\w]*$/ 0 0 0
1898 0 ▶ next if $hash=~/^main::[@]$/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^main::[\@]$/ 0 0 0
1899 0 ▶ next if $hash=~/^Net::FullAuto::FA_Core::makeplan/;
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Net::FullAuto::FA_Core::makeplan/ 0 0 0
1900 0 ▶ next if $hash=~
Branch: 1 branch
BranchTrueFalseTotal
if $hash =~ /^Net::FullAuto::FA_Core::admin_menus/ 0 0 0
1901 /^Net::FullAuto::FA_Core::admin_menus/;
1902 0 my %test=eval "%$hash";
1903 0 ▶ $name=$hash if %test eq %{$_[0]};
Branch: 1 branch
BranchTrueFalseTotal
if %test eq %{$_[0];} 0 0 0
1904 0 ▶ last PK if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
1905 }
1906 }
1907 0 ▶ $name||='';
Condition0%0/2
$name ||= ""
l!l
00
MC/DC0%0/1
$name ||= ""
$name
Truth table0%0/2
A
A= $name
Aresult
11
00
1908 0 $name=~s/^.*::(.*)$/$1/;
1909 0 last WH;
1910 }
1911 0 ▶ last WH if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
1912 }
1913 }
1914 0 ▶ last if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
1915 };
1916 }
1917 0 ▶ $name||='';
Condition0%0/2
$name ||= ""
l!l
00
MC/DC0%0/1
$name ||= ""
$name
Truth table0%0/2
A
A= $name
Aresult
11
00
1918 0 $name=~s/^%//;
1919 0 ▶ return $name if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
1920 }
1921 }
1922
1923 0 ▶sub list_module {
Subroutine list_module: not called CC=2 SCAR=13.0
Pod undocumented
1924 0 my @modules = @_;
1925 0 my @result=();
1926 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
1927 0 foreach my $module (@modules) {
1928 0 $module=~s/\.pm$//;
1929 0 push @result,grep { defined &{"$module\::$_"} } keys %{"$module\::"};
1930 }
1931 0 return @result;
1932 }
1933
1934 0 ▶sub test_hashref {
Subroutine test_hashref: not called CC=7 SCAR=40.3
Pod undocumented
1935
1936 0 my $hashref_to_test=$_[0];
1937 0 ▶ if (ref $hashref_to_test eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $hashref_to_test eq 'HASH') { } 0 0 0
1938 0 ▶ if (grep { /Item_/ } keys %{$hashref_to_test}) {
Branch: 3 branches
BranchTrueFalseTotal
if (grep {/Item_/;} keys %{$hashref_to_test;}) { } 0 0 0
elsif (exists $hashref_to_test->{'Input'} and $hashref_to_test->{'Input'}) { } 0 0 0
elsif (not grep({/Item_/;} keys %{$hashref_to_test;} && grep({/Banner/;} keys %{$hashref_to_test;}))) { } 0 0 0
1939 0 return 1;
1940 ▶ } elsif (exists $hashref_to_test->{Input} &&
Condition0%0/3
exists $hashref_to_test->{"Input"} and $hashref_to_test->{"Input"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $hashref_to_test->{"Input"} and $hashref_to_test->{"Input"}
exists $hashref_to_test->{"Input"} $hashref_to_test->{"Input"}
Truth table0%0/3
A and B
A= exists $hashref_to_test->{"Input"}B= $hashref_to_test->{"Input"}
ABresult
0X0
100
111
1941 $hashref_to_test->{Input}) {
1942 0 return 1;
1943 0 ▶ } elsif (!grep { /Item_/ } keys %{$hashref_to_test}
Condition0%0/3
keys %{$hashref_to_test;} && grep({/Banner/;} keys %{$hashref_to_test;})
!ll&&!rl&&r
000
MC/DC0%0/2
keys %{$hashref_to_test;} && grep({/Banner/;} keys %{$hashref_to_test;})
keys %{$hashref_to_test;} grep({/Banner/;} keys %{$hashref_to_test;})
Truth table0%0/3
A && B
A= keys %{$hashref_to_test;}B= grep({/Banner/;} keys %{$hashref_to_test;})
ABresult
0X0
100
111
1944 0 && grep { /Banner/ } keys %{$hashref_to_test}) {
1945 0 return 1;
1946 } else {
1947 0 my $die="\n FATAL ERROR! - Unable to verify Menu\n"
1948 ."\n This Error is usually the result of a Menu"
1949 ."\n block that does not contain properly"
1950 ."\n coded Item blocks or was not coded"
1951 ."\n ABOVE the parent Menu hash block"
1952 ."\n (Example: 1), or not coded with"
1953 ."\n GLOBAL scope (Example: 2).\n"
1954 ."\n Example 1:"
1955 ."\n my %Example_Menu=( \# ABOVE parent"
1956 ."\n \# Best Practice"
1957 ."\n Item_1 => {"
1958 ."\n Text => 'Item Text',"
1959 ."\n },"
1960 ."\n );"
1961 ."\n my %Parent_Menu=(\n"
1962 ."\n Item_1 => {"
1963 ."\n Text => 'Item Text',"
1964 ."\n Result => \%Example_Menu,"
1965 ."\n },"
1966 ."\n );\n"
1967 ."\n"
1968 ."\n Example 2:"
1969 ."\n my %Parent_Menu=(\n"
1970 ."\n Item_1 => {"
1971 ."\n Text => 'Item Text',"
1972 ."\n Result => \%Example_Menu,"
1973 ."\n },"
1974 ."\n );"
1975 ."\n our %Example_Menu=( \# GLOBAL scope"
1976 ."\n \# Note: 'our' pragma"
1977 ."\n Item_1 => {"
1978 ."\n Text => 'Item Text',"
1979 ."\n },"
1980 ."\n );\n"
1981 ."\n";
1982 0 die $die;
1983 }
1984 0 } else { return 0 }
1985
1986 }
1987
1988 sub transform_sicm
1989 0 ▶{
Subroutine transform_sicm: not called CC=32 SCAR=69.6
Pod undocumented
1990
1991 #print "TRANSFORM_SICM_CALLER=",caller,"\n";
1992 ## sicm - [s]elected [i]tems [c]urrent [m]enu
1993 0 ▶ my $text=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
1994 0 ▶ my $numbor=$_[1]||-1;
Condition0%0/2
$_[1] || -1
l!l
00
MC/DC0%0/1
$_[1] || -1
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
1995 0 ▶ my $all_menu_items_array=$_[2]||'';
Condition0%0/2
$_[2] || ''
l!l
00
MC/DC0%0/1
$_[2] || ''
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
1996 0 ▶ my $picks=$_[3]||'';
Condition0%0/2
$_[3] || ''
l!l
00
MC/DC0%0/1
$_[3] || ''
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
1997 0 ▶ my $pn=$_[4]||'';
Condition0%0/2
$_[4] || ''
l!l
00
MC/DC0%0/1
$_[4] || ''
$_[4]
Truth table0%0/2
A
A= $_[4]
Aresult
11
00
1998 0 ▶ my $return_from_child_menu=$_[5]||'';
Condition0%0/2
$_[5] || ''
l!l
00
MC/DC0%0/1
$_[5] || ''
$_[5]
Truth table0%0/2
A
A= $_[5]
Aresult
11
00
1999 0 ▶ my $log_handle=$_[6]||'';
Condition0%0/2
$_[6] || ''
l!l
00
MC/DC0%0/1
$_[6] || ''
$_[6]
Truth table0%0/2
A
A= $_[6]
Aresult
11
00
2000 0 ▶ my $current_menu_name=$_[7]||'';
Condition0%0/2
$_[7] || ''
l!l
00
MC/DC0%0/1
$_[7] || ''
$_[7]
Truth table0%0/2
A
A= $_[7]
Aresult
11
00
2001 0 my $selected=[];my $replace='';
2002 0 my $expand_array_flag=0;
2003 0 my $sicm_regex=
2004 qr/\](!)?s(?:e+lected[-_]*)*i*(?:t+ems[-_]*)
2005 *c*(?:u+rrent[-_]*)*m*(?:e+nu[-_]*)*\[/xi;
2006 0 my $tsmi_regex=qr/\](!)?t(?:e+st[-_]*)*s*(?:e+lected[-_]*)
2007 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2008 0 ▶ if ((-1<index $text,'][[') && (-1<index $text,']][')) {
Branch: 1 branch
BranchTrueFalseTotal
if ((index($text, "][[") != -1) and (index($text, "]][") != -1)) 0 0 0
Condition0%0/3
(index($text, "][[") != -1) and (index($text, "]][") != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($text, "][[") != -1) and (index($text, "]][") != -1)
(index($text, "][[") != -1) (index($text, "]][") != -1)
Truth table0%0/3
A and B
A= (index($text, "][[") != -1)B= (index($text, "]][") != -1)
ABresult
0X0
100
111
2009 0 ▶ unless ($text=~/^\s*\]\[\[\s*/s && $text=~/\s*\]\]\[\s*$/s) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s) 0 0 0
Condition0%0/3
$text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s
!ll&&!rl&&r
000
MC/DC0%0/2
$text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s
$text =~ /^\s*\]\[\[\s*/s $text =~ /\s*\]\]\[\s*$/s
Truth table0%0/3
A and B
A= $text =~ /^\s*\]\[\[\s*/sB= $text =~ /\s*\]\]\[\s*$/s
ABresult
0X0
100
111
2010 0 my $die="\n FATAL ERROR! - The --RETURN-ARRAY-- Macro"
2011 ."\n Boundary indicators: '][[' and ']]['"
2012 ."\n are only supported at the beginning"
2013 ."\n and end of the return instructions."
2014 ."\n Nothing but white space should precede"
2015 ."\n the left indicator, nor extend beyond"
2016 ."\n the right indicator.\n"
2017 ."\n Your String:\n"
2018 ."\n $text\n"
2019 ."\n Remedy: Recreate your return instructions"
2020 ."\n to conform to this convention. Also"
2021 ."\n be sure to use the Macro delimiter"
2022 ."\n indicator ']|[' to denote return array"
2023 ."\n element separation boundaries."
2024 ."\n Example:\n"
2025 ."\n '][[ ]S[ ]|[ ]P[{Menu_One} ]|[ SomeString ]]['"
2026 ."\n";
2027 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
2028 -1<index $log_handle,'*') {
2029 0 print $log_handle $die;
2030 0 close($log_handle);
2031 }
2032 }
2033 0 $expand_array_flag=1;
2034 }
2035 0 my @pks=keys %{$picks};
2036 0 ▶ if (0<$#pks && !$return_from_child_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#pks and not $return_from_child_menu) { } 0 0 0
Condition0%0/3
0 < $#pks and not $return_from_child_menu
!ll&&!rl&&r
000
MC/DC0%0/2
0 < $#pks and not $return_from_child_menu
0 < $#pks not $return_from_child_menu
Truth table0%0/3
A and not(B)
A= 0 < $#pksB= not $return_from_child_menu
ABresult
0X0
100
111
2037 0 foreach my $key (sort numerically keys %{$picks}) {
2038 0 push @{$selected},$all_menu_items_array->[$key-1];
2039 }
2040 0 $replace=&Data::Dump::Streamer::Dump($selected)->Out();
2041 0 $replace=~s/\$ARRAY\d*\s*=\s*//s;
2042 0 $replace=~s/\;\s*$//s;
2043 0 ▶ if ($expand_array_flag) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expand_array_flag) 0 0 0
2044 0 $replace='eval '.$replace;
2045 }
2046 0 $replace=~s/\'/\\\'/sg;
2047 } else {
2048 0 ▶ if (ref $pn eq 'HASH') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $pn eq 'HASH') { } 0 0 0
elsif ($pn) { } 0 0 0
2049 0 ▶ $pn->{$numbor}->[1]||=1; #COMEHERE
Condition0%0/2
$pn->{$numbor}[1] ||= 1
l!l
00
MC/DC0%0/1
$pn->{$numbor}[1] ||= 1
$pn->{$numbor}[1]
Truth table0%0/2
A
A= $pn->{$numbor}[1]
Aresult
11
00
2050 0 $replace=$all_menu_items_array->[$pn->{$numbor}->[1]-1];
2051 } elsif ($pn) {
2052 0 $replace=$all_menu_items_array->[$pn];
2053 } else {
2054 0 ▶ $replace=$all_menu_items_array->[$numbor-1]||'';
Condition0%0/2
$$all_menu_items_array[$numbor - 1] || ''
l!l
00
MC/DC0%0/1
$$all_menu_items_array[$numbor - 1] || ''
$$all_menu_items_array[$numbor - 1]
Truth table0%0/2
A
A= $$all_menu_items_array[$numbor - 1]
Aresult
11
00
2055 }
2056 0 $replace=~s/\'/\\\'/g;
2057 0 $replace=~s/\"/\\\"/g;
2058 0 ▶ $replace='"'.$replace.'"' unless
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ 0 0 0
2059 $text=~/^&?(\w+)\s*[(]["'].*["'][)]\s*$/;
2060 }
2061 0 my $test_regx_flag=0;
2062 0 FE: foreach my $regx ($tsmi_regex,$sicm_regex) {
2063 0 ▶ last if $test_regx_flag;
Branch: 1 branch
BranchTrueFalseTotal
if $test_regx_flag 0 0 0
2064 0 ▶ while ($text=~m/($regx(?:\\\{([^}]+)\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($regx(?:\\\{([^}]+)\})*)/gs) 0 0 0
2065 0 ▶ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
Branch: 1 branch
BranchTrueFalseTotal
if index($regx, "(!)?t(?:") != -1 0 0 0
2066 0 my $esc_one=$1;
2067 0 my $bang=$2;
2068 0 my $menu=$3;
2069 0 ▶ $menu||='';
Condition0%0/2
$menu ||= ""
l!l
00
MC/DC0%0/1
$menu ||= ""
$menu
Truth table0%0/2
A
A= $menu
Aresult
11
00
2070 0 $esc_one=~s/\[/\\\[/;$esc_one=~s/\]/\\\]/;
2071 0 ▶ $replace=~s/\s*//s if $text=~/[)]\s*$/s;
Branch: 1 branch
BranchTrueFalseTotal
if $text =~ /[)]\s*$/s 0 0 0
2072 0 ▶ if ($menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($menu) 0 0 0
2073 0 ▶ if (-1<index $menu, $current_menu_name) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($menu, $current_menu_name) != -1) { } 0 0 0
2074 0 $text=~s/$esc_one/$replace/sg;
2075 } else {
2076 0 $test_regx_flag=0;
2077 }
2078 0 next;
2079 }
2080 0 $text=~s/$esc_one(?![{])/$replace/g;
2081 }
2082 }
2083 0 return $text;
2084
2085 }
2086
2087 sub transform_mboi
2088 0 ▶{
Subroutine transform_mboi: not called CC=17 SCAR=57.2
Pod undocumented
2089
2090 ## mboi - [m]enu [b]anner [o]output [i]tems
2091 0 ▶ my $text=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
2092 0 ▶ my $input=$_[1]||{};
Condition0%0/2
$_[1] || {}
l!l
00
MC/DC0%0/1
$_[1] || {}
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
2093 0 ▶ my $MenuUnit_hash_ref=$_[2]||{};
Condition0%0/2
$_[2] || {}
l!l
00
MC/DC0%0/1
$_[2] || {}
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
2094 0 ▶ my $Conveyed=$_[3]||'';
Condition0%0/2
$_[3] || ''
l!l
00
MC/DC0%0/1
$_[3] || ''
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
2095 0 ▶ my $SaveMMap=$_[4]||'';
Condition0%0/2
$_[4] || ''
l!l
00
MC/DC0%0/1
$_[4] || ''
$_[4]
Truth table0%0/2
A
A= $_[4]
Aresult
11
00
2096 0 ▶ my $picks_from_parent=$_[5]||'';
Condition0%0/2
$_[5] || ''
l!l
00
MC/DC0%0/1
$_[5] || ''
$_[5]
Truth table0%0/2
A
A= $_[5]
Aresult
11
00
2097 0 ▶ my $log_handle=$_[6]||'';
Condition0%0/2
$_[6] || ''
l!l
00
MC/DC0%0/1
$_[6] || ''
$_[6]
Truth table0%0/2
A
A= $_[6]
Aresult
11
00
2098 0 my $mboi_regex=qr/\](!)?o(?:u+tput[-_]*)*b*(?:a+nner[-_]*)
2099 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2100 0 my $test_regx_flag=0;
2101 0 FE: foreach my $regx ($mboi_regex) {
2102 0 ▶ last if $test_regx_flag;
Branch: 1 branch
BranchTrueFalseTotal
if $test_regx_flag 0 0 0
2103 0 ▶ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($regx(?:\{[^}]+\})*)/gs) 0 0 0
2104 0 ▶ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
Branch: 1 branch
BranchTrueFalseTotal
if index($regx, "(!)?t(?:") != -1 0 0 0
2105 0 my $esc_one=$1;my $bang=$2;
2106 0 my $length_of_macro=length $esc_one;
2107 0 $esc_one=~s/["]\s*[.]\s*["]//s;
2108 0 my $esc_two=$esc_one;
2109 0 $esc_two=~s/\]/\\\]/;$esc_two=~s/\[/\\\[/;
2110 0 $esc_one=~s/^\]/\[\]\]/;$esc_one=~s/^(.*?)\[\{/$1\[\[\]{/;
2111 0 $esc_one=~s/^(.*?[]])[{](.*)[}]$/$1\[\{\]$2\[\}\]/;
2112 0 $esc_one=~s/\\/\\\\/g;
2113 0 $esc_one=~s/[+]/\[+\]/g;$esc_one=~s/[*]/\[*\]/g;
2114 0 if (NEW_PERL) {
2115 0 $esc_one=~s/(?:(?:\d\s*,\s*"|"\s*,\s*\d)(*SKIP)(*FAIL)|")/\\\"/g;
2116 0 $esc_two=~s/(?:(?:\d\s*,\s*"|"\s*,\s*\d)(*SKIP)(*FAIL)|")/\\\"/g;
2117 } else {
2118 $esc_one=~s/(?<!\d,)"/\\\"/g;
2119 $esc_one=~s/"(?!,\d)/\\\"/g;
2120 $esc_one=~s/\\"/"/g;
2121 $esc_two=~s/(?<!\d,)"/\\\"/g;
2122 $esc_two=~s/"(?!,\d)/\\\"/g;
2123 $esc_two=~s/\\"/"/g;
2124 }
2125 0 $esc_one=~s/\$/\\\$/g;$esc_two=~s/\$/\\\$/g;
2126 0 if (NEW_PERL) {
2127 0 $esc_two=~s/(?:(?:\\[]]|\\[[]|\\["]|\\[\$])(*SKIP)(*FAIL)|\\)/\\\\/g;
2128 } else {
2129 $esc_two=~s/\\(?![[]|[]]|["]|[\$])/\\\\/g;
2130 }
2131 0 my $instructions=$esc_two;
2132 0 $instructions=~s/^\\[]][^[]+\\[[]\s*[{](.*?)[}]$/$1/;
2133 0 $instructions=~/^(.*?),(.*?)$/;
2134 0 my $input_macro=$1;my $code=$2;
2135 0 $code=~s/["']//g;
2136 0 $code="\$main::$code";
2137 0 my $input_text=$input->{$input_macro};
2138 0 $code=eval $code;
2139 0 my $cd=&Data::Dump::Streamer::Dump($code)->Out();
2140 0 $cd=&transform_pmsi($cd,
2141 $Conveyed,$SaveMMap,
2142 $picks_from_parent);
2143 0 $cd=~s/\$CODE\d*\s*=\s*//s;
2144 0 $code=eval $cd;
2145 0 my $output='';
2146 0 ▶ $output=$code->($input_text) if $input_text!~/^\s*$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $input_text =~ /^\s*$/ 0 0 0
2147 0 my $out_height=$output=~tr/\n//;
2148 0 my @output=split /\n/,$output;
2149 0 my @newtext=();
2150 0 foreach my $line (split "\n",$text) {
2151 0 ▶ if ($line=~/^(.*)$esc_one(.*)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ /^(.*)$esc_one(.*)$/) { } 0 0 0
2152 0 my $front_of_line=$1;my $back_of_line=$2;
2153 0 my $frlen=length $front_of_line;
2154 0 ▶ my $bottomline=pop @output||'';
Condition0%0/2
pop @output || ''
l!l
00
MC/DC0%0/1
pop @output || ''
pop @output
Truth table0%0/2
A
A= pop @output
Aresult
11
00
2155 0 $bottomline=$front_of_line.$bottomline.$back_of_line;
2156 0 foreach my $ln (@output) {
2157 0 my $pad=sprintf "%-${frlen}s",'';
2158 0 push @newtext,$pad.$ln;
2159 }
2160 0 push @newtext,$bottomline;
2161 } else {
2162 0 push @newtext,$line;
2163 }
2164 0 } $text=join "\n",@newtext;
2165 }
2166 }
2167 0 return $text,$input;
2168
2169 }
2170
2171 sub transform_mbir
2172 0 ▶{
Subroutine transform_mbir: not called CC=12 SCAR=50.5
Pod undocumented
2173
2174 ## mbir - [m]enu [b]anner [i]nput [r]esults
2175 0 ▶ my $text=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
2176 0 ▶ my $Conveyed=$_[1]||{};
Condition0%0/2
$_[1] || {}
l!l
00
MC/DC0%0/1
$_[1] || {}
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
2177 0 ▶ my $MenuUnit_hash_ref=$_[2]||'';
Condition0%0/2
$_[2] || ''
l!l
00
MC/DC0%0/1
$_[2] || ''
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
2178 0 ▶ my $log_handle=$_[3]||'';
Condition0%0/2
$_[3] || ''
l!l
00
MC/DC0%0/1
$_[3] || ''
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
2179 0 my $tbii_regex=qr/\](!)?i(?:n+put[-_]*)*b*(?:a+nner[-_]*)
2180 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2181 0 my $test_regx_flag=0;
2182 0 FE: foreach my $regx ($tbii_regex) {
2183 0 ▶ last if $test_regx_flag;
Branch: 1 branch
BranchTrueFalseTotal
if $test_regx_flag 0 0 0
2184 0 ▶ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($regx(?:\{[^}]+\})*)/gs) 0 0 0
2185 0 ▶ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
Branch: 1 branch
BranchTrueFalseTotal
if index($regx, "(!)?t(?:") != -1 0 0 0
2186 0 my $esc_one=$1;my $bang=$2;
2187 0 my $length_of_macro=length $esc_one;
2188 0 $esc_one=~s/["]\s*[.]\s*["]//s;
2189 0 $esc_one=~s/\]/\\\]/;$esc_one=~s/\[/\\\[/;
2190 0 if (NEW_PERL) {
2191 0 $esc_one=~s/(?:(?:\d\s*,\s*"|"\s*,\s*\d)(*SKIP)(*FAIL)|")/\\\"/g;
2192 } else {
2193 print "WHAT IS ESC_ONE=$esc_one<==\n";
2194 $esc_one=~s/(?<!\d,)"/\\\"/g;
2195 $esc_one=~s/"(?!,\d)/\\\"/g;
2196 $esc_one=~s/\\"/"/g;
2197 }
2198 0 my $instructions=$esc_one;
2199 0 $instructions=~s/^\\[]][^[]+\\[[]\s*[{](.*?)[}]$/$1/;
2200 0 $instructions='('.$instructions.')';
2201 0 my @instructions=eval $instructions;
2202 0 ▶ next if $#instructions==2;
Branch: 1 branch
BranchTrueFalseTotal
if $#instructions == 2 0 0 0
2203 0 ▶ if ($#instructions==1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#instructions == 1) 0 0 0
2204 0 ▶ if (exists $Conveyed->{$instructions[0].'_mbir'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $$Conveyed{$instructions[0] . '_mbir'}) 0 0 0
2205 0 my $item=$instructions[0].'_mbir';
2206 0 my $replace=$Conveyed->{$item}->{$instructions[1]};
2207 0 $esc_one=~s/[{]/\\{/g;
2208 0 $text=~s/$esc_one/$replace/s;
2209 }
2210 }
2211 }
2212 0 } return $text;
2213 }
2214
2215 sub transform_mbii
2216 0 ▶{
Subroutine transform_mbii: not called CC=45 SCAR=76.4
Pod undocumented
2217
2218 ## mbii - [m]enu [b]anner [i]nput [i]tems
2219 0 ▶ my $text=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
2220 0 ▶ my $numbor=(defined $_[1])?$_[1]:'';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[1] ? : 0 0 0
2221 0 ▶ my $ikey=$_[2]||'';
Condition0%0/2
$_[2] || ''
l!l
00
MC/DC0%0/1
$_[2] || ''
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
2222 0 ▶ my $input=$_[3]||{};
Condition0%0/2
$_[3] || {}
l!l
00
MC/DC0%0/1
$_[3] || {}
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
2223 0 ▶ my $MenuUnit_hash_ref=$_[4]||{};
Condition0%0/2
$_[4] || {}
l!l
00
MC/DC0%0/1
$_[4] || {}
$_[4]
Truth table0%0/2
A
A= $_[4]
Aresult
11
00
2224 0 ▶ my $Conveyed=$_[5]||'';
Condition0%0/2
$_[5] || ''
l!l
00
MC/DC0%0/1
$_[5] || ''
$_[5]
Truth table0%0/2
A
A= $_[5]
Aresult
11
00
2225 0 ▶ my $log_handle=$_[6]||'';
Condition0%0/2
$_[6] || ''
l!l
00
MC/DC0%0/1
$_[6] || ''
$_[6]
Truth table0%0/2
A
A= $_[6]
Aresult
11
00
2226 0 my $tbii_regex=qr/\](!)?i(?:n+put[-_]*)*b*(?:a+nner[-_]*)
2227 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2228 0 my $test_regx_flag=0;
2229 0 ▶ if ($ikey eq 'TAB' && exists $input->{focus}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ikey eq "TAB" and exists $input->{"focus"}) 0 0 0
Condition0%0/3
$ikey eq "TAB" and exists $input->{"focus"}
!ll&&!rl&&r
000
MC/DC0%0/2
$ikey eq "TAB" and exists $input->{"focus"}
$ikey eq "TAB" exists $input->{"focus"}
Truth table0%0/3
A and B
A= $ikey eq "TAB"B= exists $input->{"focus"}
ABresult
0X0
100
111
2230 0 $input->{focus}->[0]=$input->{focus}->[2]->{$input->{focus}->[0]};
2231 0 $ikey='';$numbor='';
2232 }
2233
2234 0 FE: foreach my $regx ($tbii_regex) {
2235 0 ▶ last if $test_regx_flag;
Branch: 1 branch
BranchTrueFalseTotal
if $test_regx_flag 0 0 0
2236 0 my $fill_focus=0;
2237 0 ▶ $fill_focus=1 unless exists $input->{focus};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $input->{"focus"} 0 0 0
2238 0 ▶ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($regx(?:\{[^}]+\})*)/gs) 0 0 0
2239 0 ▶ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
Branch: 1 branch
BranchTrueFalseTotal
if index($regx, "(!)?t(?:") != -1 0 0 0
2240 0 my $esc_one=$1;my $bang=$2;
2241 0 my $length_of_macro=length $esc_one;
2242
2243 0 $esc_one=~s/["]\s*[.]\s*["]//s;
2244 0 my $esc_two=$esc_one;
2245 0 $esc_two=~s/\]/\\\]/;$esc_two=~s/\[/\\\[/;
2246 0 $esc_one=~s/^\]/\[\]\]/;$esc_one=~s/^(.*?)\[\{/$1\[\[\]{/;
2247 0 $esc_one=~s/^(.*?[]])[{](.*)[}]$/$1\[\{\]$2\[\}\]/;
2248 0 $esc_one=~s/\\/\\\\/g;
2249 0 $esc_one=~s/[+]/\[+\]/g;$esc_one=~s/[*]/\[*\]/g;
2250 0 if (NEW_PERL) {
2251 0 $esc_one=~s/(?:(?:\d\s*,\s*"|"\s*,\s*\d)(*SKIP)(*FAIL)|")/\\\"/g;
2252 0 $esc_two=~s/(?:(?:\d\s*,\s*"|"\s*,\s*\d)(*SKIP)(*FAIL)|")/\\\"/g;
2253 } else {
2254 $esc_one=~s/(?<!\d,)"/\\\"/g;
2255 $esc_one=~s/"(?!,\d)/\\\"/g;
2256 $esc_one=~s/\\"/"/g;
2257 $esc_two=~s/(?<!\d,)"/\\\"/g;
2258 $esc_two=~s/"(?!,\d)/\\\"/g;
2259 $esc_two=~s/\\"/"/g;
2260 }
2261 0 $esc_one=~s/\$/\\\$/g;$esc_two=~s/\$/\\\$/g;
2262 0 if (NEW_PERL) {
2263 0 $esc_two=~s/(?:(?:\\[]]|\\[[]|\\["]|\\[\$])(*SKIP)(*FAIL)|\\)/\\\\/g;
2264 } else {
2265 $esc_two=~s/\\(?![[]|[]]|["]|[\$])/\\\\/g;
2266 }
2267 0 my $instructions=$esc_two;
2268 0 $instructions=~s/^\\[]][^[]+\\[[]\s*[{](.*?)[}]$/$1/;
2269 0 $instructions='('.$instructions.')';
2270 0 my @instructions=eval $instructions;
2271 0 ▶ unless (exists $input->{$instructions[0]}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $$input{$instructions[0]}) 0 0 0
2272 0 $input->{$instructions[0]}=$instructions[1];
2273 0 $numbor='';
2274 }
2275 $input->{$instructions[0]}='' unless defined
2276 0 ▶ $input->{$instructions[0]};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $$input{$instructions[0]} 0 0 0
2277 0 ▶ if ($fill_focus) {
Branch: 1 branch
BranchTrueFalseTotal
if ($fill_focus) 0 0 0
2278 0 ▶ unless (exists $input->{focus}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $input->{'focus'}) { } 0 0 0
2279 0 my $default_focus=$instructions[0];
2280 0 ▶ if (exists $MenuUnit_hash_ref->{Focus} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{"Focus"} and $MenuUnit_hash_ref->{"Focus"}) 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Focus"} and $MenuUnit_hash_ref->{"Focus"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Focus"} and $MenuUnit_hash_ref->{"Focus"}
exists $MenuUnit_hash_ref->{"Focus"} $MenuUnit_hash_ref->{"Focus"}
Truth table0%0/3
A and B
A= exists $MenuUnit_hash_ref->{"Focus"}B= $MenuUnit_hash_ref->{"Focus"}
ABresult
0X0
100
111
2281 $MenuUnit_hash_ref->{Focus}) {
2282 0 $default_focus=$MenuUnit_hash_ref->{Focus};
2283 }
2284 0 $input->{focus}=[$default_focus,[$instructions[0]],{}];
2285 } else {
2286 $input->{focus}->[2]->{
2287 0 $input->{focus}->[1][$#{$input->{focus}->[1]}]}
2288 =$instructions[0];
2289 0 push @{$input->{focus}->[1]},$instructions[0];
2290 $input->{focus}->[2]->{$instructions[0]}=
2291 0 $input->{focus}->[1]->[0];
2292 }
2293 }
2294 0 my @newtext=();
2295 0 foreach my $line (split "\n",$text) {
2296 0 ▶ if ($line=~/^(.*)$esc_one(.*)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ /^(.*)$esc_one(.*)$/) { } 0 0 0
2297 0 my $front_of_line=$1;my $back_of_line=$2;
2298 0 my $box_top_bottom='';my @sides=('| ',' |');
2299 0 ▶ if ($#instructions==2 and $instructions[2]>0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#instructions == 2 and $instructions[2] > 0) 0 0 0
Condition0%0/3
$#instructions == 2 and $instructions[2] > 0
!ll&&!rl&&r
000
MC/DC0%0/2
$#instructions == 2 and $instructions[2] > 0
$#instructions == 2 $instructions[2] > 0
Truth table0%0/3
A and B
A= $#instructions == 2B= $instructions[2] > 0
ABresult
0X0
100
111
2300 0 ▶ if ($input->{focus}->[0] eq $instructions[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($input->{'focus'}[0] eq $instructions[0]) { } 0 0 0
2301 0 for (1..$instructions[2]) {
2302 0 $box_top_bottom.='=';
2303 }
2304 0 @sides=('[ ',' ]');
2305 } else {
2306 0 for (1..$instructions[2]) {
2307 0 $box_top_bottom.='-';
2308 }
2309 }
2310 }
2311 0 ▶ if ($input->{focus}->[0] eq $instructions[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($input->{"focus"}[0] eq $instructions[0]) 0 0 0
2312 0 ▶ if ($ikey eq 'BACKSPACE') {
Branch: 3 branches
BranchTrueFalseTotal
if ($ikey eq 'BACKSPACE') { } 0 0 0
elsif ($ikey eq 'DELETE') { } 0 0 0
elsif ($ikey ne 'TAB' and defined $numbor) { } 0 0 0
2313 0 chop $input->{$instructions[0]};
2314 } elsif ($ikey eq 'DELETE') {
2315 0 $input->{$instructions[0]}='';
2316 ▶ } elsif ($ikey ne 'TAB' && defined $numbor) {
Condition0%0/3
$ikey ne "TAB" and defined $numbor
!ll&&!rl&&r
000
MC/DC0%0/2
$ikey ne "TAB" and defined $numbor
$ikey ne "TAB" defined $numbor
Truth table0%0/3
A and B
A= $ikey ne "TAB"B= defined $numbor
ABresult
0X0
100
111
2317 0 my $length_input=length $input->{$instructions[0]};
2318 0 my $length_box=$instructions[2];
2319 0 ▶ if ($length_input>$length_box) {
Branch: 1 branch
BranchTrueFalseTotal
if ($length_input > $length_box) 0 0 0
2320 0 print "\n\n WARNING! - input exceeds box size!";
2321 0 print "\n\n You may have forgotten to [TAB] to the".
2322 "\n next box, or the input for the next box".
2323 "\n box has a TAB in it - usually at the".
2324 "\n front of the string. Use a text editor".
2325 "\n to see and remove it before pasting".
2326 "\n input.";
2327 0 print "\n\n Press to continue ...\n\n";
2328 0 sleep 1;
2329 0 <STDIN>;
2330 }
2331 0 $input->{$instructions[0]}.=$numbor;
2332 }
2333 }
2334 0 my $insert=$sides[0];
2335 0 $insert.=$input->{$instructions[0]};
2336 $Conveyed->{&pw($MenuUnit_hash_ref).'_mbir'}->
2337 0 {$instructions[0]}=$input->{$instructions[0]};
2338 0 my $insert_num_of_spaces=$instructions[2]-2;
2339 0 $insert=sprintf "%-${insert_num_of_spaces}s",$insert;
2340 0 $insert.=$sides[1];
2341 0 my $frlen=length $front_of_line;
2342 0 my $box_top_line='';
2343 0 my $box_mid_line='';
2344 0 my $box_bot_line='';
2345 0 my $length_of_front_and_macro=$frlen+$instructions[2]+2;
2346 0 ▶ if ($#newtext==-1 || $#newtext==0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#newtext == -1 or $#newtext == 0) { } 0 0 0
Condition0%0/3
$#newtext == -1 or $#newtext == 0
l!l&&r!l&&!r
000
MC/DC0%0/2
$#newtext == -1 or $#newtext == 0
$#newtext == -1 $#newtext == 0
Truth table0%0/3
A or B
A= $#newtext == -1B= $#newtext == 0
ABresult
1X1
011
000
2347 0 $box_top_line=sprintf "%-${frlen}s",'';
2348 0 $box_top_line=~s/^.(.*).$/.$1./;
2349 0 $box_top_line.=$box_top_bottom;
2350 } else {
2351 0 my $front_of_box_top=unpack("a$frlen",$newtext[$#newtext-1]);
2352 0 ▶ $front_of_box_top=sprintf "%-${frlen}s",$front_of_box_top
Branch: 1 branch
BranchTrueFalseTotal
if length $front_of_box_top < $frlen 0 0 0
2353 if length $front_of_box_top<$frlen;
2354 0 my $back_of_box_top='';
2355 0 ▶ if ($length_of_front_and_macro<=length
Branch: 1 branch
BranchTrueFalseTotal
if ($length_of_front_and_macro <= length $newtext[$#newtext - 1]) 0 0 0
2356 $newtext[$#newtext-1]) {
2357 0 $back_of_box_top=unpack("x$length_of_front_and_macro a*",
2358 $newtext[$#newtext-1]);
2359 }
2360 0 $box_top_bottom=~s/^.(.*).$/.$1./;
2361 0 $box_top_line=$front_of_box_top.
2362 $box_top_bottom.$back_of_box_top;
2363 }
2364 0 ▶ if ($#newtext==-1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#newtext == -1) { } 0 0 0
2365 0 $box_mid_line=sprintf "%-${frlen}s",'';
2366 0 $box_mid_line.=$insert;
2367 } else {
2368 0 ▶ my $elem=($#newtext==0)?0:$#newtext;
Branch: 1 branch
BranchTrueFalseTotal
$#newtext == 0 ? : 0 0 0
2369 0 my $front_of_box_mid=sprintf "%-${frlen}s",'';
2370 0 ▶ if ($newtext[$elem]!~/^\s*$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($newtext[$elem] =~ /^\s*$/) 0 0 0
2371 0 $front_of_box_mid=unpack("a$frlen",$newtext[$elem]);
2372 0 ▶ $front_of_box_mid=sprintf "%-${frlen}s",$front_of_box_mid
Branch: 1 branch
BranchTrueFalseTotal
if length $front_of_box_mid < $frlen 0 0 0
2373 if length $front_of_box_mid<$frlen;
2374 }
2375 0 my $back_of_box_mid='';
2376 0 ▶ if ($length_of_front_and_macro<=length $newtext[$elem]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($length_of_front_and_macro <= length $newtext[$elem]) 0 0 0
2377 0 $back_of_box_mid=unpack("x$length_of_front_and_macro a*",
2378 $newtext[$elem]);
2379 }
2380 0 $box_mid_line=$front_of_box_mid.
2381 $insert.$back_of_box_mid;
2382 }
2383 0 $box_top_bottom=~s/^.(.*).$/'$1'/;
2384 0 $box_bot_line=$front_of_line.$box_top_bottom.$back_of_line;
2385 0 ▶ if ($#newtext==-1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($#newtext == -1) { } 0 0 0
elsif ($#newtext == 0) { } 0 0 0
2386 0 push @newtext,$box_top_line;
2387 0 push @newtext,$box_mid_line;
2388 } elsif ($#newtext==0) {
2389 0 unshift @newtext,$box_top_line;
2390 0 $newtext[1]=$box_mid_line;
2391 } else {
2392 0 $newtext[$#newtext-1]=$box_top_line;
2393 0 $newtext[$#newtext]=$box_mid_line;
2394 0 } push @newtext, $box_bot_line;
2395 } else {
2396 0 push @newtext,$line;
2397 }
2398 0 } $text=join "\n",@newtext;
2399 }
2400 0 } return $text, $input;
2401 }
2402
2403 sub transform_pmsi
2404 0 ▶{
Subroutine transform_pmsi: not called CC=50 SCAR=78.4
Pod undocumented
2405
2406 #print "TRANSFORM_PMSI CALLER=",caller,"\n";
2407 ## pmsi - [p]revious [m]enu [s]elected [i]tems
2408 0 ▶ my $text=$_[0]||'';
Condition0%0/2
$_[0] || ''
l!l
00
MC/DC0%0/1
$_[0] || ''
$_[0]
Truth table0%0/2
A
A= $_[0]
Aresult
11
00
2409 0 ▶ my $Conveyed=$_[1]||'';
Condition0%0/2
$_[1] || ''
l!l
00
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
2410 0 ▶ my $SaveMMap=$_[2]||'';
Condition0%0/2
$_[2] || ''
l!l
00
MC/DC0%0/1
$_[2] || ''
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
2411 0 ▶ my $picks_from_parent=$_[3]||'';
Condition0%0/2
$_[3] || ''
l!l
00
MC/DC0%0/1
$_[3] || ''
$_[3]
Truth table0%0/2
A
A= $_[3]
Aresult
11
00
2412 0 ▶ my $log_handle=$_[4]||'';
Condition0%0/2
$_[4] || ''
l!l
00
MC/DC0%0/1
$_[4] || ''
$_[4]
Truth table0%0/2
A
A= $_[4]
Aresult
11
00
2413 0 my $expand_array_flag=0;
2414 0 my $tpmi_regex=qr/\](!)?t(?:e+st[-_]*)*p*(?:r+vious[-_]*)
2415 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2416 0 my $pmsi_regex=qr/\](!)?p(?:r+evious[-_]*)*m*(?:e+nu[-_]*)
2417 *s*(?:e+lected[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2418 0 my $amlm_regex=qr/\]a(n+cestor[-_]*)*m*(e+nu[-_]*)
2419 *l*(a+bel[-_]*)*m*(a+p[-_]*)*\[/xi;
2420 0 $text=~s/\s?$//s;
2421 0 ▶ if ((-1<index $text,'][[') && (-1<index $text,']][')) {
Branch: 1 branch
BranchTrueFalseTotal
if ((index($text, "][[") != -1) and (index($text, "]][") != -1)) 0 0 0
Condition0%0/3
(index($text, "][[") != -1) and (index($text, "]][") != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($text, "][[") != -1) and (index($text, "]][") != -1)
(index($text, "][[") != -1) (index($text, "]][") != -1)
Truth table0%0/3
A and B
A= (index($text, "][[") != -1)B= (index($text, "]][") != -1)
ABresult
0X0
100
111
2422 0 ▶ unless ($text=~/^\s*\]\[\[\s*/s && $text=~/\s*\]\]\[\s*$/s) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s) 0 0 0
Condition0%0/3
$text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s
!ll&&!rl&&r
000
MC/DC0%0/2
$text =~ /^\s*\]\[\[\s*/s and $text =~ /\s*\]\]\[\s*$/s
$text =~ /^\s*\]\[\[\s*/s $text =~ /\s*\]\]\[\s*$/s
Truth table0%0/3
A and B
A= $text =~ /^\s*\]\[\[\s*/sB= $text =~ /\s*\]\]\[\s*$/s
ABresult
0X0
100
111
2423 0 my $die=<<DIE;
2424
2425 FATAL ERROR! - The --RETURN-ARRAY-- Macro
2426 Boundary indicators: '][[' and ']]['
2427 are only supported at the beginning
2428 and end of the return instructions.
2429 Nothing but white space should precede
2430 the left indicator, nor extend beyond
2431 the right indicator.
2432 Your String:
2433 $text
2434 Remedy: Recreate your return instructions
2435 to conform to this convention. Also
2436 be sure to use the Macro delimiter
2437 indicator ']|[' to denote return array
2438 element separation boundaries.
2439 Example:
2440 '][[ ]S[ ]|[ ]P[{Menu_One} ]|[ SomeString ]]['
2441 DIE
2442 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
2443 -1<index $log_handle,'*') {
2444 0 print $log_handle $die;
2445 0 close($log_handle);
2446 }
2447 }
2448 0 $expand_array_flag=1;
2449 }
2450 0 my $test_regx_flag=0;
2451 0 FE: foreach my $regx ($tpmi_regex,$pmsi_regex) {
2452 0 ▶ last if $test_regx_flag;
Branch: 1 branch
BranchTrueFalseTotal
if $test_regx_flag 0 0 0
2453 0 ▶ while ($text=~m/($regx(?:\{[^}]+\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($regx(?:\{[^}]+\})*)/gs) 0 0 0
2454 0 ▶ $test_regx_flag=1 if -1<index $regx,'(!)?t(?:';
Branch: 1 branch
BranchTrueFalseTotal
if index($regx, "(!)?t(?:") != -1 0 0 0
2455 0 my $esc_one=$1;my $bang=$2;
2456 0 $esc_one=~s/["]\s*[.]\s*["]//s;
2457 0 $esc_one=~s/\]/\\\]/;$esc_one=~s/\[/\\\[/;
2458 0 $esc_one=~s/[{]/\\\{\(/;$esc_one=~s/\}/\)\}/;
2459 0 ▶ while ($esc_one=~/[{]/ && $text=~m/$esc_one/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($esc_one =~ /[{]/ and $text =~ /$esc_one/) 0 0 0
Condition0%0/3
$esc_one =~ /[{]/ and $text =~ /$esc_one/
!ll&&!rl&&r
000
MC/DC0%0/2
$esc_one =~ /[{]/ and $text =~ /$esc_one/
$esc_one =~ /[{]/ $text =~ /$esc_one/
Truth table0%0/3
A and B
A= $esc_one =~ /[{]/B= $text =~ /$esc_one/
ABresult
0X0
100
111
2460 0 ▶ unless (exists $Conveyed->{$1} || $bang || $test_regx_flag) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $Conveyed->{$1} or $bang or $test_regx_flag) 0 0 0
Condition0%0/6
exists $Conveyed->{$1} or $bang or $test_regx_flag
l!l&&r!l&&!r
000
exists $Conveyed->{$1} or $bang
l!l&&r!l&&!r
000
MC/DC0%0/3
exists $Conveyed->{$1} or $bang or $test_regx_flag
exists $Conveyed->{$1} $bang $test_regx_flag
Truth table0%0/4
A or B or C
A= exists $Conveyed->{$1}B= $bangC= $test_regx_flag
ABCresult
1XX1
01X1
0011
0000
2461 0 my $die="\n\n FATAL ERROR! - The Menu Name: \"$1\""
2462 ."\n describes a Menu that is *NOT* in the"
2463 ."\n invocation history of this process.\n"
2464 ."\n This Error is *usually* the result of a missing,"
2465 ."\n Menu, a Menu block that was not global or"
2466 ."\n was not coded ABOVE the parent Menu hash"
2467 ."\n block. (See Example)\n"
2468 ."\n Also be sure to use a UNIQUE name for every"
2469 ."\n Menu.\n"
2470 ."\n Example: my %Example_Menu=(\n"
2471 ."\n Item_1 => {"
2472 ."\n ... # ]P[ is a Macro 'Previous'"
2473 ."\n Result => sub { return ']P[{Parent_Menu}' },"
2474 ."\n );"
2475 ."\n my %Parent_Menu=(\n"
2476 ."\n Item_1 => {"
2477 ."\n ..."
2478 ."\n Result => \\%Example_Menu,"
2479 ."\n ..."
2480 ."\n );\n"
2481 ."\n *HOWEVER*: Read the Documentation on \"stepchild\""
2482 ."\n and other deeply nested menus. There are"
2483 ."\n scenarios with dynamically generated menus"
2484 ."\n where Term::Menus simply cannot test for"
2485 ."\n menu stack integrity when it encounters"
2486 ."\n unexpanded macros in defined but ungenerated"
2487 ."\n menus. In these situations this error"
2488 ."\n message should be turned off by using the"
2489 ."\n \"test\" macro ( ]T[ ) or using an"
2490 ."\n exclamation point character with either"
2491 ."\n or both the ]S[ (becomes ]!S[) and ]P["
2492 ."\n (becomes ]!P[) macros.\n\n";
2493 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
2494 -1<index $log_handle,'*') {
2495 0 print $log_handle $die;
2496 0 close($log_handle);
2497 }
2498 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
2499 0 &Net::FullAuto::FA_Core::handle_error($die);
2500 0 } else { die $die }
2501 }
2502 0 ▶ unless ($Conveyed->{$1}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Conveyed->{$1}) 0 0 0
2503 0 $test_regx_flag=0;
2504 next FE
2505 0 }
2506 0 my $replace=$Conveyed->{$1};
2507 0 ▶ if (ref $replace) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $replace) 0 0 0
2508 0 $replace=&Data::Dump::Streamer::Dump($Conveyed->{$1})->Out();
2509 0 my $type=ref $Conveyed->{$1};
2510 0 $replace=~s/\$$type\d*\s*=\s*//s;
2511 0 $replace=~s/\'/\\\'/sg;
2512 0 ▶ if ($expand_array_flag) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expand_array_flag) 0 0 0
2513 0 $replace='eval '.$replace;
2514 }
2515 }
2516 0 ▶ if ($text=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) 0 0 0
Condition0%0/3
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2517 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
2518 0 $replace=~s/\'/\\\'/g;
2519 0 $replace=~s/\"/\\\"/g;
2520 0 ▶ $replace='"'.$replace.'"' unless
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ 0 0 0
2521 $text=~/^&?(\w+)\s*[(]["'].*["'][)]\s*$/;
2522 }
2523 0 ▶ if ($replace=~/^.(?<!["']).*(?!["']).?$/s && $replace=~/\s/s) {
Branch: 1 branch
BranchTrueFalseTotal
if ($replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s) 0 0 0
Condition0%0/3
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
!ll&&!rl&&r
000
MC/DC0%0/2
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
$replace =~ /^.(?<!["']).*(?!["']).?$/s $replace =~ /\s/s
Truth table0%0/3
A and B
A= $replace =~ /^.(?<!["']).*(?!["']).?$/sB= $replace =~ /\s/s
ABresult
0X0
100
111
2524 0 ▶ $replace='"'.$replace.'"' if
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval / 0 0 0
Condition0%0/3
$text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval /
l!l&&r!l&&!r
000
MC/DC0%0/2
$text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval /
$text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ $replace =~ /^eval /
Truth table0%0/3
A or B
A= $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/B= $replace =~ /^eval /
ABresult
1X1
011
000
2525 $text!~/^&?(\w+)\s*[(]["'].*["'][)]\s*$/ &&
2526 $replace!~/^eval /;
2527 }
2528 0 $text=~s/$esc_one/$replace/se;
2529 }
2530 0 my $replace='';
2531 0 ▶ if (ref $picks_from_parent eq 'ARRAY') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $picks_from_parent eq 'ARRAY') { } 0 0 0
2532 0 $replace=&Data::Dump::Streamer::Dump($picks_from_parent)->Out();
2533 0 my $type=ref $picks_from_parent;
2534 0 $replace=~s/\$$type\d*\s*=\s*//s;
2535 0 $replace=~s/\'/\\\'/sg;
2536 0 ▶ if ($expand_array_flag) {
Branch: 2 branches
BranchTrueFalseTotal
if ($expand_array_flag) { } 0 0 0
elsif ($replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s) { } 0 0 0
2537 0 $replace='eval '.$replace;
2538 ▶ } elsif ($replace=~/^.(?<!["']).*(?!["']).?$/s && $replace=~/\s/s) {
Condition0%0/3
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
!ll&&!rl&&r
000
MC/DC0%0/2
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
$replace =~ /^.(?<!["']).*(?!["']).?$/s $replace =~ /\s/s
Truth table0%0/3
A and B
A= $replace =~ /^.(?<!["']).*(?!["']).?$/sB= $replace =~ /\s/s
ABresult
0X0
100
111
2539 0 ▶ $replace='"'.$replace.'"' unless
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ 0 0 0
2540 $text=~/^&?(\w+)\s*[(]["'].*["'][)]\s*$/;
2541 }
2542 } else {
2543 0 $replace=$picks_from_parent;
2544 0 ▶ if ($replace=~/^.(?<!["']).*(?!["']).?$/s && $replace=~/\s/s) {
Branch: 1 branch
BranchTrueFalseTotal
if ($replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s) 0 0 0
Condition0%0/3
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
!ll&&!rl&&r
000
MC/DC0%0/2
$replace =~ /^.(?<!["']).*(?!["']).?$/s and $replace =~ /\s/s
$replace =~ /^.(?<!["']).*(?!["']).?$/s $replace =~ /\s/s
Truth table0%0/3
A and B
A= $replace =~ /^.(?<!["']).*(?!["']).?$/sB= $replace =~ /\s/s
ABresult
0X0
100
111
2545 0 ▶ $replace='"'.$replace.'"' unless
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(\w+)\s*[(]["'].*["'][)]\s*$/ 0 0 0
2546 $text=~/^&?(\w+)\s*[(]["'].*["'][)]\s*$/;
2547 }
2548
2549 }
2550 0 ▶ if ($text=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) 0 0 0
Condition0%0/3
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $text =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2551 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
2552 0 $replace=~s/\'/\\\'/g;
2553 0 $replace=~s/\"/\\\"/g;
2554 0 ▶ $replace='"'.$replace.'"' if
Branch: 1 branch
BranchTrueFalseTotal
unless $text =~ /^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval / 0 0 0
Condition0%0/3
$text =~ /^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval /
l!l&&r!l&&!r
000
MC/DC0%0/2
$text =~ /^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/ or $replace =~ /^eval /
$text =~ /^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/ $replace =~ /^eval /
Truth table0%0/3
A or B
A= $text =~ /^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/B= $replace =~ /^eval /
ABresult
1X1
011
000
2555 $text!~/^&?(?:.*::)*(\w+)\s*[(]["'].*["'][)]\s*$/ &&
2556 $replace!~/^eval /;
2557 }
2558 0 $text=~s/$esc_one/$replace/s;
2559 }
2560 }
2561 0 ▶ while ($text=~m/($amlm_regex(?:\{[^}]+\})*)/sg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ /($amlm_regex(?:\{[^}]+\})*)/gs) 0 0 0
2562 0 my $esc_one=$1;
2563 0 ▶ last unless $esc_one;
Branch: 1 branch
BranchTrueFalseTotal
unless $esc_one 0 0 0
2564 0 $esc_one=~s/\]/\\\]/;$esc_one=~s/\[/\\\[/;
2565 0 $esc_one=~s/\{/\{\(/;$esc_one=~s/\}/\)\}/;
2566 0 my $replace=$Conveyed->{$1};
2567 0 ▶ if (ref $replace) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $replace) 0 0 0
2568 0 $replace=&Data::Dump::Streamer::Dump($Conveyed->{$1})->Out();
2569 0 my $type=ref $Conveyed->{$1};
2570 0 $replace=~s/\$$type\d*\s*=\s*//s;
2571 0 $replace=~s/\'/\\\'/sg;
2572 0 ▶ if ($expand_array_flag) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expand_array_flag) 0 0 0
2573 0 $replace='eval '.$replace;
2574 }
2575 }
2576 0 $text=~s/$esc_one/$replace/se;
2577 0 } return $text;
2578
2579 }
2580
2581 sub pick # USAGE: &pick( ref_to_choices_array,
2582 # (Optional) banner_string,
2583 # (Optional) display_this_many_items,
2584 # (Optional) return_index_only_flag,
2585 # (Optional) log_file_handle,
2586 # ----------
2587 # For Use With Sub-Menus
2588 # ----------
2589 # (Optional) MenuUnit_hash_ref,
2590 # (Optional) recurse_level,
2591 # (Optional) picks_from_parent,
2592 # (Optional) parent_menu,
2593 # (Optional) menus_cfg_file,
2594 # (Optional) Full_Menu_data_structure,
2595 # (Optional) Selected_data_structure,
2596 # (Optional) Conveyed_data_structure,
2597 # (Optional) SavePick_data_structure,
2598 # (Optional) SaveMMap_data_structure,
2599 # (Optional) SaveNext_data_structure,
2600 # (Optional) Persists_data_structure,
2601 # (Optional) no_wantarray_flag,
2602 # (Optional) sorted
2603 # (Optional) select_many )
2604 0 ▶{
Subroutine pick: not called CC=1239 SCAR=142.4
Pod documented
2605
2606 #print "PICKCALLER=",caller," and Argument 7 =>$_[6]<=\n";<STDIN>;
2607
2608 # "pick" --> This function presents the user with
2609 # with a list of items from which to choose.
2610
2611 0 my @all_menu_items_array=@{$_[0]};
2612 0 ▶ my $banner=defined $_[1] ? $_[1] : "\n Please Pick an Item :";
Branch: 1 branch
BranchTrueFalseTotal
defined $_[1] ? : 0 0 0
2613 0 ▶ my $display_this_many_items=defined $_[2] ? $_[2] : 10;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[2] ? : 0 0 0
2614 0 ▶ my $return_index_only_flag=(defined $_[3]) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[3] ? : 0 0 0
2615 0 ▶ my $log_handle= (defined $_[4]) ? $_[4] : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
2616
2617 # Used Only With Cascasding Menus (Optional)
2618 0 ▶ my $MenuUnit_hash_ref= (defined $_[5]) ? $_[5] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[5] ? : 0 0 0
2619 0 my $show_banner_only=0;
2620 0 ▶ unless (grep { /Item_/ } keys %{$MenuUnit_hash_ref}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep {/Item_/;} keys %{$MenuUnit_hash_ref;}) 0 0 0
2621 0 ▶ if (grep { /Banner/ } keys %{$MenuUnit_hash_ref}) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {/Banner/;} keys %{$MenuUnit_hash_ref;}) 0 0 0
2622 0 $show_banner_only=1;
2623 }
2624 }
2625 0 ▶ $MenuUnit_hash_ref->{Select}||={};
Condition0%0/2
$MenuUnit_hash_ref->{"Select"} ||= {}
l!l
00
MC/DC0%0/1
$MenuUnit_hash_ref->{"Select"} ||= {}
$MenuUnit_hash_ref->{"Select"}
Truth table0%0/2
A
A= $MenuUnit_hash_ref->{"Select"}
Aresult
11
00
2626 0 ▶ my $recurse_level= (defined $_[6]) ? $_[6] : 1;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[6] ? : 0 0 0
2627 0 ▶ my $picks_from_parent= (defined $_[7]) ? $_[7] : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[7] ? : 0 0 0
2628 0 ▶ my $parent_menu= (defined $_[8]) ? $_[8] : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $_[8] ? : 0 0 0
2629 0 ▶ my $FullMenu= (defined $_[9]) ? $_[9] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[9] ? : 0 0 0
2630 0 ▶ my $Selected= (defined $_[10]) ? $_[10] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[10] ? : 0 0 0
2631 0 ▶ my $Conveyed= (defined $_[11]) ? $_[11] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[11] ? : 0 0 0
2632 0 ▶ my $SavePick= (defined $_[12]) ? $_[12] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[12] ? : 0 0 0
2633 0 ▶ my $SaveMMap= (defined $_[13]) ? $_[13] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[13] ? : 0 0 0
2634 0 ▶ my $SaveNext= (defined $_[14]) ? $_[14] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[14] ? : 0 0 0
2635 0 ▶ my $Persists= (defined $_[15]) ? $_[15] : {};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[15] ? : 0 0 0
2636 0 ▶ my $no_wantarray= (defined $_[16]) ? $_[16] : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[16] ? : 0 0 0
2637 0 ▶ my $sorted= (defined $_[17]) ? $_[17] : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[17] ? : 0 0 0
2638 0 ▶ my $select_many= (defined $_[18]) ? $_[18] : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[18] ? : 0 0 0
2639
2640 0 my %items=();my %picks=();my %negate=();
2641 0 my %exclude=();my %include=();my %default=();
2642 0 my %labels=();
2643 0 foreach my $menuhash (keys %{$FullMenu}) {
2644 0 my $name=&pw($FullMenu->{$menuhash}[0]);
2645 0 ▶ if ($name) {
Branch: 1 branch
BranchTrueFalseTotal
if ($name) { } 0 0 0
2646 0 $FullMenu->{$menuhash}[0]->{Name}=$name;
2647 0 } else { next }
2648 0 $labels{$name}=$FullMenu->{$menuhash}[0];
2649 }
2650 0 ▶ if ($SavePick && exists $SavePick->{$MenuUnit_hash_ref}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($SavePick and exists $SavePick->{$MenuUnit_hash_ref}) 0 0 0
Condition0%0/3
$SavePick and exists $SavePick->{$MenuUnit_hash_ref}
!ll&&!rl&&r
000
MC/DC0%0/2
$SavePick and exists $SavePick->{$MenuUnit_hash_ref}
$SavePick exists $SavePick->{$MenuUnit_hash_ref}
Truth table0%0/3
A and B
A= $SavePickB= exists $SavePick->{$MenuUnit_hash_ref}
ABresult
0X0
100
111
2651 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
2652 }
2653 0 my $num_pick=$#all_menu_items_array+1;
2654 0 ▶ my $caller=(caller(1))[3]||'';
Condition0%0/2
(caller 1)[3] || ''
l!l
00
MC/DC0%0/1
(caller 1)[3] || ''
(caller 1)[3]
Truth table0%0/2
A
A= (caller 1)[3]
Aresult
11
00
2655 0 my $numbor=0; # Number of Item Selected
2656 0 my $ikey=''; # rawInput Key - key used
2657 # to end menu. Can be
2658 # any non-alphanumeric
2659 # key like Enter or
2660 # Right Arrow.
2661 0 my $return_from_child_menu=0;
2662
2663 0 my $choose_num='';
2664 0 my $convey='';
2665 0 my $menu_output='';
2666 0 my $hidedefaults=0;
2667 my $start=($FullMenu->{$MenuUnit_hash_ref}[11])?
2668 0 ▶ $FullMenu->{$MenuUnit_hash_ref}[11]:0;
Branch: 1 branch
BranchTrueFalseTotal
$FullMenu->{$MenuUnit_hash_ref}[11] ? : 0 0 0
2669 0 my $got_default=0;
2670
2671 sub delete_Selected
2672 0 ▶ {
Subroutine delete_Selected: not called CC=6 SCAR=37.4
Pod undocumented
2673
2674 0 my $Selected=$_[2];
2675 0 my $SavePick=$_[3];
2676 0 my $SaveNext=$_[4];
2677 0 my $Persists=$_[5];
2678 0 ▶ if ($_[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 0 0 0
2679 0 my $result=$Selected->{$_[0]}{$_[1]};
2680 0 delete $Selected->{$_[0]}{$_[1]};
2681 0 delete $SavePick->{$_[0]}{$_[1]};
2682 0 ▶ if ($result) {
Branch: 1 branch
BranchTrueFalseTotal
if ($result) 0 0 0
2683 0 &delete_Selected($result,'',
2684 $Selected,$SavePick,$SaveNext);
2685 0 } delete $SaveNext->{$_[0]};
2686 } else {
2687 0 ▶ if (keys %{$Selected->{$_[0]}}) {
Branch: 1 branch
BranchTrueFalseTotal
if (keys %{$$Selected{$_[0]};}) { } 0 0 0
2688 0 foreach my $key (keys %{$Selected->{$_[0]}}) {
2689 0 delete $Selected->{$_[0]}{$key};
2690 0 delete $SavePick->{$_[0]}{$key};
2691 0 delete $SaveNext->{$_[0]};
2692 }
2693 } else {
2694 0 foreach my $key (keys %{$SavePick->{$_[0]}}) {
2695 0 delete $SavePick->{$_[0]}{$key};
2696 0 delete $SaveNext->{$_[0]};
2697 }
2698 }
2699 0 } delete $SaveNext->{$_[0]};
2700 0 return $SaveNext;
2701
2702 }
2703
2704 sub find_Selected
2705 0 ▶ {
Subroutine find_Selected: not called CC=9 SCAR=45.0
Pod undocumented
2706 0 my $Selected=$_[2];
2707 0 ▶ if ($_[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 0 0 0
2708 0 my $result=$Selected->{$_[0]}{$_[1]};
2709 0 ▶ if ($result=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Branch: 1 branch
BranchTrueFalseTotal
if ($result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module('main', $Term::Menus::fa_code)) { } 0 0 0
Condition0%0/3
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2710 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
2711 0 return 0;
2712 } else {
2713 0 return &find_Selected($result,'',$Selected);
2714 }
2715 } else {
2716 0 ▶ if (keys %{$Selected->{$_[0]}}) {
Branch: 1 branch
BranchTrueFalseTotal
if (keys %{$$Selected{$_[0]};}) 0 0 0
2717 0 foreach my $key (keys %{$Selected->{$_[0]}}) {
2718 0 my $result=$Selected->{$_[0]}{$key};
2719 #return '+' if substr($result,0,1) eq '&';
2720 0 ▶ if ($result=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Branch: 1 branch
BranchTrueFalseTotal
if ($result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)) 0 0 0
Condition0%0/3
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2721 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
2722 0 return '+';
2723 }
2724 0 my $output=&find_Selected($result,'',$Selected);
2725 0 ▶ return '+' if $output eq '+';
Branch: 1 branch
BranchTrueFalseTotal
if $output eq "+" 0 0 0
2726 }
2727 }
2728 }
2729 }
2730
2731 sub get_subs_from_menu
2732 0 ▶ {
Subroutine get_subs_from_menu: not called CC=6 SCAR=37.4
Pod undocumented
2733 0 my $Selected=$_[0];
2734 0 my @subs=();
2735 0 foreach my $key (keys %{$Selected}) {
2736 0 foreach my $item (keys %{$Selected->{$key}}) {
2737 0 my $seltext=$Selected->{$key}{$item};
2738 0 ▶ if ($seltext=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ &&
Branch: 2 branches
BranchTrueFalseTotal
if ($seltext =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module('main', $Term::Menus::fa_code)) { } 0 0 0
elsif (ref $seltext eq 'CODE') { } 0 0 0
Condition0%0/3
$seltext =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$seltext =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$seltext =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $seltext =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2739 0 grep { $1 eq $_ } list_module('main',$Term::Menus::fa_code)) {
2740 0 push @subs, escape_quotes($seltext);
2741 } elsif (ref $seltext eq 'CODE') {
2742 0 push @subs, $seltext;
2743 }
2744 }
2745 }
2746 0 return @subs;
2747 }
2748
2749 0 ▶ my $get_result = sub {
Subroutine __ANON__: not called CC=57 SCAR=81.0
2750
2751 # $_[0] => $MenuUnit_hash_ref
2752 # $_[1] => \@all_menu_items_array
2753 # $_[2] => $picks
2754 # $_[3] => $picks_from_parent
2755
2756 0 my $convey=[];
2757 0 my $FullMenu=$_[4];
2758 0 my $Conveyed=$_[5];
2759 0 my $Selected=$_[6];
2760 0 my $SaveNext=$_[7];
2761 0 my $Persists=$_[8];
2762 0 my $parent_menu=$_[9];
2763 0 ▶ my $pick=(keys %{$_[2]})[0] || 1;
Condition0%0/2
(keys %{$_[2];})[0] || 1
l!l
00
MC/DC0%0/1
(keys %{$_[2];})[0] || 1
(keys %{$_[2];})[0]
Truth table0%0/2
A
A= (keys %{$_[2];})[0]
Aresult
11
00
2764 0 ▶ $_[1]->[$pick-1]||='';
Condition0%0/2
$_[1][$pick - 1] ||= ""
l!l
00
MC/DC0%0/1
$_[1][$pick - 1] ||= ""
$_[1][$pick - 1]
Truth table0%0/2
A
A= $_[1][$pick - 1]
Aresult
11
00
2765 my $gotmany=(exists $MenuUnit_hash_ref->{Select} &&
2766 0 ▶ $MenuUnit_hash_ref->{Select}) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
exists $MenuUnit_hash_ref->{'Select'} && $MenuUnit_hash_ref->{'Select'} ? : 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Select"} and $MenuUnit_hash_ref->{"Select"}
exists $MenuUnit_hash_ref->{"Select"} $MenuUnit_hash_ref->{"Select"}
Truth table0%0/3
A and B
A= exists $MenuUnit_hash_ref->{"Select"}B= $MenuUnit_hash_ref->{"Select"}
ABresult
0X0
100
111
2767 0 ▶ $FullMenu->{$_[0]}[3]={} unless $gotmany;
Branch: 1 branch
BranchTrueFalseTotal
unless $gotmany 0 0 0
2768 0 ▶ if ($pick && exists $FullMenu->{$_[0]}[3]{$_[1]->[$pick-1]}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($pick and exists $$FullMenu{$_[0]}[3]{$_[1][$pick - 1]}) { } 0 0 0
elsif ($pick) { } 0 0 0
elsif ($_[3]) { } 0 0 0
Condition0%0/3
$pick and exists $$FullMenu{$_[0]}[3]{$_[1][$pick - 1]}
!ll&&!rl&&r
000
MC/DC0%0/2
$pick and exists $$FullMenu{$_[0]}[3]{$_[1][$pick - 1]}
$pick exists $$FullMenu{$_[0]}[3]{$_[1][$pick - 1]}
Truth table0%0/3
A and B
A= $pickB= exists $$FullMenu{$_[0]}[3]{$_[1][$pick - 1]}
ABresult
0X0
100
111
2769 0 ▶ if ($pick && exists $_[0]->{$FullMenu->{$_[0]}
Branch: 1 branch
BranchTrueFalseTotal
if ($pick and exists $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Convey"}) 0 0 0
Condition0%0/3
$pick and exists $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Convey"}
!ll&&!rl&&r
000
MC/DC0%0/2
$pick and exists $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Convey"}
$pick exists $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Convey"}
Truth table0%0/3
A and B
A= $pickB= exists $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Convey"}
ABresult
0X0
100
111
2770 [4]{$_[1]->[$pick-1]}}{Convey}) {
2771 0 my $contmp='';
2772 0 ▶ if (0<$#{[keys %{$_[2]}]}) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#{[keys %{$_[2];}];}) { } 0 0 0
2773 0 foreach my $numb (sort numerically keys %{$_[2]}) {
2774 0 $contmp=${${$FullMenu}{$_[0]}[3]}
2775 0 {${$_[1]}[$numb-1]}[0];
2776 0 $contmp=~s/\s?$//s;
2777 0 push @{$convey}, $contmp;
2778 }
2779 } else {
2780 0 $convey=${${${$FullMenu}{$_[0]}[3]}{${$_[1]}[$pick-1]}}[0];
2781 #$convey=$FullMenu->{$_[0]}[3]->{$_[1]->[$pick-1]}->[0];
2782 0 $convey=~s/\s?$//s;
2783 }
2784 0 ▶ $convey='SKIP' if $convey eq '';
Branch: 1 branch
BranchTrueFalseTotal
if $convey eq "" 0 0 0
2785 0 ▶ if (ref $convey eq 'ARRAY' && $#{$convey}==0) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $convey eq "ARRAY" and $#{$convey;} == 0) 0 0 0
Condition0%0/3
ref $convey eq "ARRAY" and $#{$convey;} == 0
!ll&&!rl&&r
000
MC/DC0%0/2
ref $convey eq "ARRAY" and $#{$convey;} == 0
ref $convey eq "ARRAY" $#{$convey;} == 0
Truth table0%0/3
A and B
A= ref $convey eq "ARRAY"B= $#{$convey;} == 0
ABresult
0X0
100
111
2786 0 $convey=$convey->[0];
2787 }
2788 }
2789 0 $Conveyed->{&pw($_[0])}=$convey;
2790 } elsif ($pick) {
2791 0 $convey=${$_[1]}[$pick-1];
2792 0 $Conveyed->{&pw($_[0])}=$convey;
2793 } elsif ($_[3]) {
2794 0 $convey=$_[3];
2795 0 $Conveyed->{&pw($_[0])}=$convey;
2796 }
2797 $convey='' if !$convey ||
2798 0 ▶ (ref $convey eq 'ARRAY' && $#{$convey}==-1);
Branch: 1 branch
BranchTrueFalseTotal
if not $convey or ref $convey eq "ARRAY" and $#{$convey;} == -1 0 0 0
Condition0%0/6
not $convey or ref $convey eq "ARRAY" and $#{$convey;} == -1
l!l&&r!l&&!r
000
ref $convey eq "ARRAY" and $#{$convey;} == -1
!ll&&!rl&&r
000
MC/DC0%0/3
not $convey or ref $convey eq "ARRAY" and $#{$convey;} == -1
not $convey ref $convey eq "ARRAY" $#{$convey;} == -1
Truth table0%0/4
not(A) or B and C
A= not $conveyB= ref $convey eq "ARRAY"C= $#{$convey;} == -1
ABCresult
1XX1
0111
00X0
0100
2799 0 my $test_item='';my $show_banner_only=0;
2800 0 ▶ if (exists $FullMenu->{$_[0]}[2]{'__FA_Banner__'}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $$FullMenu{$_[0]}[2]{'__FA_Banner__'}) { } 0 0 0
elsif ($pick) { } 0 0 0
2801 0 $test_item=$FullMenu->{$_[0]}[2]{'__FA_Banner__'};
2802 0 $show_banner_only=1;$pick=0;
2803 } elsif ($pick) {
2804 0 $test_item=$FullMenu->{$_[0]}[2]{$_[1]->[$pick-1]};
2805 }
2806 0 ▶ $test_item||='';
Condition0%0/2
$test_item ||= ""
l!l
00
MC/DC0%0/1
$test_item ||= ""
$test_item
Truth table0%0/2
A
A= $test_item
Aresult
11
00
2807 0 ▶ if (($pick &&
Branch: 1 branch
BranchTrueFalseTotal
if ($pick and exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]} and (ref $test_item eq "HASH" and (values %{$test_item;})[0] ne "recurse") or ref $test_item eq "CODE") 0 0 0
Condition0%0/12
$pick and exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]} and (ref $test_item eq "HASH" and (values %{$test_item;})[0] ne "recurse") or ref $test_item eq "CODE"
l!l&&r!l&&!r
000
$pick and exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]} and (ref $test_item eq "HASH" and (values %{$test_item;})[0] ne "recurse")
!ll&&!rl&&r
000
$pick and exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]}
!ll&&!rl&&r
000
ref $test_item eq "HASH" and (values %{$test_item;})[0] ne "recurse"
!ll&&!rl&&r
000
MC/DC0%0/5
$pick and exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]} and (ref $test_item eq "HASH" and (values %{$test_item;})[0] ne "recurse") or ref $test_item eq "CODE"
$pick exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]} ref $test_item eq "HASH" (values %{$test_item;})[0] ne "recurse" ref $test_item eq "CODE"
Truth table0%0/9
A and B and C and D or E
A= $pickB= exists $$FullMenu{$_[0]}[2]{$_[1][$pick - 1]}C= ref $test_item eq "HASH"D= (values %{$test_item;})[0] ne "recurse"E= ref $test_item eq "CODE"
ABCDEresult
1111X1
0XXX11
10XX11
110X11
111011
0XXX00
10XX00
110X00
111000
2808 exists $FullMenu->{$_[0]}[2]{$_[1]->[$pick-1]} &&
2809 (ref $test_item eq 'HASH' &&
2810 0 (values %{$test_item})[0] ne 'recurse')) ||
2811 ref $test_item eq 'CODE') {
2812 0 ▶ if ((ref $test_item eq 'HASH' &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref $test_item eq 'HASH' and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;}) or $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module('main', $Term::Menus::fa_code) or ref $test_item eq 'CODE' or &test_hashref($test_item)) { } 0 0 0
Condition0%0/15
ref $test_item eq "HASH" and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;}) or $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code) or ref $test_item eq "CODE" or &test_hashref($test_item)
l!l&&r!l&&!r
000
ref $test_item eq "HASH" and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;}) or $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code) or ref $test_item eq "CODE"
l!l&&r!l&&!r
000
ref $test_item eq "HASH" and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;}) or $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
l!l&&r!l&&!r
000
ref $test_item eq "HASH" and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;})
!ll&&!rl&&r
000
grep {/Item_/;} keys %{$test_item;} or $show_banner_only and grep {/Banner/;} keys %{$test_item;}
l!l&&r!l&&!r
000
MC/DC0%0/6
ref $test_item eq "HASH" and grep({/Item_/;} keys %{$test_item;}) || $show_banner_only && grep({/Banner/;} keys %{$test_item;}) or $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code) or ref $test_item eq "CODE" or &test_hashref($test_item)
ref $test_item eq "HASH" grep {/Item_/;} keys %{$test_item;} $show_banner_only and grep {/Banner/;} keys %{$test_item;} $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code) ref $test_item eq "CODE" &test_hashref($test_item)
Truth table0%0/10
A and B or C or D or E or F
A= ref $test_item eq "HASH"B= grep {/Item_/;} keys %{$test_item;}C= $show_banner_only and grep {/Banner/;} keys %{$test_item;}D= $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)E= ref $test_item eq "CODE"F= &test_hashref($test_item)
ABCDEFresult
11XXXX1
101XXX1
0XX1XX1
1001XX1
0XX01X1
10001X1
0XX0011
1000011
0XX0000
1000000
2813 0 ▶ ((grep { /Item_/ } keys %{$test_item}) ||
Condition0%0/3
$show_banner_only and grep {/Banner/;} keys %{$test_item;}
!ll&&!rl&&r
000
MC/DC0%0/2
$show_banner_only and grep {/Banner/;} keys %{$test_item;}
$show_banner_only grep {/Banner/;} keys %{$test_item;}
Truth table0%0/3
A and B
A= $show_banner_onlyB= grep {/Banner/;} keys %{$test_item;}
ABresult
0X0
100
111
2814 0 ($show_banner_only && (grep { /Banner/ }
2815 0 ▶ keys %{$test_item}))))
Condition0%0/3
$test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
!ll&&!rl&&r
000
MC/DC0%0/2
$test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ and grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
$test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
Truth table0%0/3
A and B
A= $test_item =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep {$1 eq $_;} list_module("main", $Term::Menus::fa_code)
ABresult
0X0
100
111
2816 || ($test_item=~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/
2817 0 && grep { $1 eq $_ } list_module(
2818 'main',$Term::Menus::fa_code))
2819 || ref $test_item eq 'CODE' ||
2820 &test_hashref($test_item)) {
2821 0 my $con_regex=qr/\]c(o+nvey)*\[/i;
2822 0 my $tpmi_regex=qr/\](!)?t(?:e+st[-_]*)*p*(?:r+vious[-_]*)
2823 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2824 0 my $sicm_regex=
2825 qr/\]s(e+lected[-_]*)*i*(t+ems[-_]*)
2826 *c*(u+rrent[-_]*)*m*(e+nu[-_]*)*\[/xi;
2827 0 my $pmsi_regex=qr/\](!)?p(?:r+evious[-_]*)*m*(?:e+nu[-_]*)
2828 *s*(?:e+lected[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2829 0 my $amlm_regex=qr/\]a(n+cestor[-_]*)*m*(e+nu[-_]*)
2830 *l*(a+bel[-_]*)*m*(a+p[-_]*)*\[/xi;
2831 0 my $tbii_regex=qr/\](!)?i(?:n+put[-_]*)*b*(?:a+nner[-_]*)
2832 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
2833 0 ▶ if ($test_item=~/$con_regex|$pmsi_regex|
Branch: 2 branches
BranchTrueFalseTotal
if ($test_item =~ /$con_regex|$pmsi_regex| $amlm_regex|$sicm_regex|$tpmi_regex|$tbii_regex/x) { } 0 0 0
elsif (ref $test_item eq 'CODE') { } 0 0 0
2834 $amlm_regex|$sicm_regex|$tpmi_regex|$tbii_regex/x) {
2835 0 $test_item=&transform_mbii($test_item,
2836 $Conveyed,$SaveMMap,
2837 $picks_from_parent,$log_handle);
2838 $test_item=&transform_sicm($test_item,$numbor,
2839 \@all_menu_items_array,$_[2],'',
2840 $return_from_child_menu,$log_handle,
2841 0 $_[0]->{Name});
2842 0 $test_item=&transform_pmsi($test_item,
2843 $Conveyed,$SaveMMap,
2844 $picks_from_parent,$log_handle);
2845 0 $test_item=&transform_mbir($test_item,
2846 $Conveyed,$MenuUnit_hash_ref,$log_handle);
2847 } elsif (ref $test_item eq 'CODE') {
2848 0 my $cd='';
2849 #if ($Term::Menus::data_dump_streamer && (!$show_banner_only
2850 # || (exists $MenuUnit_hash_ref->{Input}
2851 # && $MenuUnit_hash_ref->{Input}==1))) {
2852 0 $cd=&Data::Dump::Streamer::Dump($test_item)->Out();
2853 $cd=&transform_sicm($cd,$numbor,
2854 \@all_menu_items_array,$_[2],'',
2855 $return_from_child_menu,$log_handle,
2856 0 $_[0]->{Name});
2857 0 $cd=&transform_pmsi($cd,
2858 $Conveyed,$SaveMMap,
2859 $picks_from_parent);
2860 0 $cd=&transform_mbir($cd,$Conveyed,$MenuUnit_hash_ref,
2861 $log_handle);
2862 #}
2863 0 $cd=~s/\$CODE\d*\s*=\s*//s;
2864 #print "CD2=$cd<==\n";<STDIN>;
2865 0 eval { $test_item=eval $cd };
2866 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
2867 0 ▶ if (unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
2868 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
2869 -1<index $log_handle,'*') {
2870 0 print $log_handle $@;
2871 0 close($log_handle);
2872 }
2873 0 die $@;
2874 } else {
2875 0 my $die="\n FATAL ERROR! - The Local "
2876 ."System $Term::Menus::local_hostname Conveyed\n"
2877 ." the Following "
2878 ."Unrecoverable Error Condition :\n\n"
2879 ." $@\n line ".__LINE__;
2880 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
2881 -1<index $log_handle,'*') {
2882 0 print $log_handle $die;
2883 0 close($log_handle);
2884 }
2885 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 2 branches
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) { } 0 0 0
elsif ($Term::Menus::fullauto) { } 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
2886 0 return $FullMenu,$Conveyed,
2887 $SaveNext,$Persists,$Selected,
2888 $convey,$parent_menu;
2889 } elsif ($Term::Menus::fullauto) {
2890 0 &Net::FullAuto::FA_Core::handle_error($die);
2891 0 } else { die $die }
2892 }
2893 }
2894 0 ▶ my $item=($show_banner_only)?'__FA_Banner__':$pick;
Branch: 1 branch
BranchTrueFalseTotal
$show_banner_only ? : 0 0 0
2895 0 $Selected->{$_[0]}->{$item}=$test_item;
2896 0 return $FullMenu,$Conveyed,$SaveNext,
2897 $Persists,$Selected,$convey,$parent_menu;
2898 }
2899 0 ▶ if ($test_item=~/Convey\s*=\>/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($test_item =~ /Convey\s*=\>/) 0 0 0
2900 0 ▶ if ($convey ne 'SKIP') {
Branch: 1 branch
BranchTrueFalseTotal
if ($convey ne 'SKIP') { } 0 0 0
2901 0 $test_item=~s/Convey\s*=\>/$convey/g;
2902 } else {
2903 0 $test_item=~s/Convey\s*=\>/${$_[1]}[$pick-1]/g;
2904 }
2905 }
2906 0 ▶ if ($test_item=~/Text\s*=\>/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($test_item =~ /Text\s*=\>/) 0 0 0
2907 0 $test_item=~s/Text\s*=\>/${$_[1]}[$pick-1]/g;
2908 }
2909 } else {
2910 my $die="The \"Result3 =>\" Setting\n -> "
2911 0 .$FullMenu->{$_[0]}[2]{$_[1]->[$_[2]-1]}
2912 ."\n Found in the Menu Unit -> "
2913 .$MenuUnit_hash_ref
2914 ."\n is not a Menu Unit\,"
2915 ." and Because it Does Not Have"
2916 ."\n an \"&\" as"
2917 ." the Lead Character, $0"
2918 ."\n Cannot Determine "
2919 ."if it is a Valid SubRoutine.\n\n";
2920 0 die $die;
2921 }
2922 }
2923 0 ▶ if ($show_banner_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($show_banner_only) { } 0 0 0
2924 0 $Selected->{$_[0]}{'__FA_Banner__'}=$test_item;
2925 0 $SaveNext->{$_[0]}=$FullMenu->{$_[0]}[2]{'__FA_Banner__'};
2926 } else {
2927 0 ▶ chomp($pick) if $pick;
Branch: 1 branch
BranchTrueFalseTotal
if $pick 0 0 0
2928 0 ▶ $Selected->{$_[0]}{$pick}=$test_item if $pick;
Branch: 1 branch
BranchTrueFalseTotal
if $pick 0 0 0
2929 0 ▶ if ($pick && ref $_[0]->{$FullMenu->{$_[0]}
Branch: 1 branch
BranchTrueFalseTotal
if ($pick and ref $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Result"} eq "HASH") 0 0 0
Condition0%0/3
$pick and ref $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Result"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
$pick and ref $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Result"} eq "HASH"
$pick ref $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Result"} eq "HASH"
Truth table0%0/3
A and B
A= $pickB= ref $_[0]{$$FullMenu{$_[0]}[4]{$_[1][$pick - 1]}}{"Result"} eq "HASH"
ABresult
0X0
100
111
2930 [4]{$_[1]->[$pick-1]}}{'Result'} eq 'HASH') {
2931 $SaveNext->{$_[0]}=$FullMenu->{$_[0]}[2]
2932 0 {$_[1]->[$pick-1]};
2933 }
2934 }
2935 0 return $FullMenu,$Conveyed,$SaveNext,
2936 $Persists,$Selected,$convey,$parent_menu;
2937 0 };
2938
2939 0 my $filtered_menu=0;my $defaults_exist=0;my $input='';
2940 0 while (1) {
2941 0 ▶ if ($num_pick-$start<=$display_this_many_items) {
Branch: 1 branch
BranchTrueFalseTotal
if ($num_pick - $start <= $display_this_many_items) { } 0 0 0
2942 0 $choose_num=$num_pick-$start;
2943 0 } else { $choose_num=$display_this_many_items }
2944 0 $numbor=$start+$choose_num+1;my $done=0;my $savechk=0;my %pn=();
2945 0 my $sorted_flag=0;
2946 $Persists->{$MenuUnit_hash_ref}={} unless exists
2947 0 ▶ $Persists->{$MenuUnit_hash_ref};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $Persists->{$MenuUnit_hash_ref} 0 0 0
2948 0 ▶ if (!exists $Persists->{$MenuUnit_hash_ref}{defaults} &&
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $Persists->{$MenuUnit_hash_ref}{"defaults"} and defined do { [keys %{$$FullMenu{$MenuUnit_hash_ref}[5];}] }->[0]) 0 0 0
Condition0%0/3
not exists $Persists->{$MenuUnit_hash_ref}{"defaults"} and defined do { [keys %{$$FullMenu{$MenuUnit_hash_ref}[5];}] }->[0]
!ll&&!rl&&r
000
MC/DC0%0/2
not exists $Persists->{$MenuUnit_hash_ref}{"defaults"} and defined do { [keys %{$$FullMenu{$MenuUnit_hash_ref}[5];}] }->[0]
not exists $Persists->{$MenuUnit_hash_ref}{"defaults"} defined do { [keys %{$$FullMenu{$MenuUnit_hash_ref}[5];}] }->[0]
Truth table0%0/3
not(A) and B
A= not exists $Persists->{$MenuUnit_hash_ref}{"defaults"}B= defined do { [keys %{$$FullMenu{$MenuUnit_hash_ref}[5];}] }->[0]
ABresult
0X0
100
111
2949 0 defined ${[keys %{$FullMenu->{$MenuUnit_hash_ref}[5]}]}[0]) {
2950 0 my $it=${[keys %{$FullMenu->{$MenuUnit_hash_ref}[5]}]}[0];
2951 0 my $def=$FullMenu->{$MenuUnit_hash_ref}[5]{$it};
2952 0 ▶ if ($def) {
Branch: 1 branch
BranchTrueFalseTotal
if ($def) 0 0 0
2953 0 ▶ $def='.*' if $def eq '*';
Branch: 1 branch
BranchTrueFalseTotal
if $def eq "*" 0 0 0
2954 0 foreach my $item (
2955 0 @{[keys %{$FullMenu->{$MenuUnit_hash_ref}[5]}]}) {
2956 0 ▶ if ($item=~/$def/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($item =~ /$def/) 0 0 0
2957 0 $Persists->{$MenuUnit_hash_ref}{defaults}=1;
2958 }
2959 }
2960 }
2961 }
2962 $Persists->{$MenuUnit_hash_ref}{defaults}=0 unless exists
2963 0 ▶ $Persists->{$MenuUnit_hash_ref}{defaults};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $Persists->{$MenuUnit_hash_ref}{"defaults"} 0 0 0
2964 0 my $plann='';my $plannn='';
2965 0 ▶ if (ref $Net::FullAuto::FA_Core::plan eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $Net::FullAuto::FA_Core::plan eq "HASH") 0 0 0
2966 0 my $plann=shift @{$Net::FullAuto::FA_Core::plan};
2967 0 $plannn=$plann->{Item};
2968 0 my $plan_='';
2969 0 ▶ if (substr($plannn,2,5) eq 'ARRAY') {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($plannn, 2, 5) eq 'ARRAY') { } 0 0 0
2970 0 my $eval_plan=substr($plannn,1,-1);
2971 0 $plan_=eval $eval_plan;
2972 0 ▶ &eval_error($@,$log_handle) if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
2973 } else {
2974 0 $plan_=$plannn;
2975 }
2976 0 return $plan_;
2977 }
2978 0 ▶ while ($numbor=~/\d+/ &&
Branch: 1 branch
BranchTrueFalseTotal
if ($numbor =~ /\d+/ and $numbor <= $start || $start + $choose_num < $numbor || $numbor eq "admin" or $input) 0 0 0
Condition0%0/12
$numbor =~ /\d+/ and $numbor <= $start || $start + $choose_num < $numbor || $numbor eq "admin" or $input
l!l&&r!l&&!r
000
$numbor =~ /\d+/ and $numbor <= $start || $start + $choose_num < $numbor || $numbor eq "admin"
!ll&&!rl&&r
000
$numbor <= $start or $start + $choose_num < $numbor or $numbor eq "admin"
l!l&&r!l&&!r
000
$numbor <= $start or $start + $choose_num < $numbor
l!l&&r!l&&!r
000
MC/DC0%0/5
$numbor =~ /\d+/ and $numbor <= $start || $start + $choose_num < $numbor || $numbor eq "admin" or $input
$numbor =~ /\d+/ $numbor <= $start $start + $choose_num < $numbor $numbor eq "admin" $input
Truth table0%0/7
A and B or C or D or E
A= $numbor =~ /\d+/B= $numbor <= $startC= $start + $choose_num < $numborD= $numbor eq "admin"E= $input
ABCDEresult
11XXX1
101XX1
1001X1
0XXX11
100011
0XXX00
100000
2979 ($numbor<=$start || $start+$choose_num < $numbor ||
2980 $numbor eq 'admin') || $input) {
2981 0 my $menu_text='';my $picknum_for_display='';
2982 0 my $bout='';
2983 0 ▶ ($bout,$input)=&banner($MenuUnit_hash_ref->{Banner}||$banner,
Condition0%0/3
$MenuUnit_hash_ref->{'Banner'} || $banner
l!l&&r!l&&!r
000
MC/DC0%0/2
$MenuUnit_hash_ref->{'Banner'} || $banner
$MenuUnit_hash_ref->{'Banner'} $banner
Truth table0%0/3
A || B
A= $MenuUnit_hash_ref->{'Banner'}B= $banner
ABresult
1X1
011
000
2984 $Conveyed,$SaveMMap,$picks_from_parent,
2985 $numbor,$ikey,$input,$MenuUnit_hash_ref,$log_handle);
2986 0 $menu_text.=$bout."\n";
2987 0 my $picknum=$start+1;
2988 0 my $numlist=$choose_num;
2989 0 my $mark='';
2990 0 my $mark_len=$FullMenu->{$MenuUnit_hash_ref}[7]{BLANK};
2991 0 ▶ while ($mark_len--) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mark_len--) 0 0 0
2992 0 $mark.=' ';
2993 }
2994 0 my $mark_blank=$mark;
2995 0 my $mark_flg=0;my $prev_menu=0;
2996 0 ▶ $numlist=1 if $numbor eq 'admin';
Branch: 1 branch
BranchTrueFalseTotal
if $numbor eq "admin" 0 0 0
2997 0 ▶ while (0 < $numlist) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $numlist) 0 0 0
2998 0 ▶ if (exists $picks{$picknum}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$picknum}) { } 0 0 0
2999 0 $mark_flg=1;
3000 0 ▶ if ($return_from_child_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($return_from_child_menu) { } 0 0 0
3001 0 $mark=$mark_blank;
3002 0 substr($mark,-1)=$picks{$picknum}=$return_from_child_menu;
3003 0 %{$SavePick->{$MenuUnit_hash_ref}}=%picks;
3004 0 $prev_menu=$picknum;
3005 #print "DO WE GET HERE3 and SEL=$MenuUnit_hash_ref->{Select}! and $return_from_child_menu\n";
3006 } else {
3007 0 $mark=$mark_blank;
3008 0 substr($mark,-1)=$picks{$picknum};
3009 }
3010 #print "DO WE GET HERE4 and SEL=$MenuUnit_hash_ref->{Select}!\n";
3011 my $gotmany=($select_many ||
3012 0 ▶ (keys %{$MenuUnit_hash_ref->{Select}})) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$select_many || keys %{$$MenuUnit_hash_ref{'Select'};} ? : 0 0 0
Condition0%0/3
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
$select_many keys %{$$MenuUnit_hash_ref{"Select"};}
Truth table0%0/3
A or B
A= $select_manyB= keys %{$$MenuUnit_hash_ref{"Select"};}
ABresult
1X1
011
000
3013 0 ▶ if (($gotmany
Branch: 1 branch
BranchTrueFalseTotal
if ($gotmany and $numbor =~ /^[Ff]$/ or $picks{$picknum} ne "+" and $picks{$picknum} ne "-" and not $gotmany) 0 0 0
Condition0%0/12
$gotmany and $numbor =~ /^[Ff]$/ or $picks{$picknum} ne "+" and $picks{$picknum} ne "-" and not $gotmany
l!l&&r!l&&!r
000
$gotmany and $numbor =~ /^[Ff]$/
!ll&&!rl&&r
000
$picks{$picknum} ne "+" and $picks{$picknum} ne "-" and not $gotmany
!ll&&!rl&&r
000
$picks{$picknum} ne "+" and $picks{$picknum} ne "-"
!ll&&!rl&&r
000
MC/DC0%0/5
$gotmany and $numbor =~ /^[Ff]$/ or $picks{$picknum} ne "+" and $picks{$picknum} ne "-" and not $gotmany
$gotmany $numbor =~ /^[Ff]$/ $picks{$picknum} ne "+" $picks{$picknum} ne "-" not $gotmany
Truth table0%0/9
A and B or C and D and not(E)
A= $gotmanyB= $numbor =~ /^[Ff]$/C= $picks{$picknum} ne "+"D= $picks{$picknum} ne "-"E= not $gotmany
ABCDEresult
11XXX1
0X1111
101111
0X0XX0
0X10X0
0X1100
100XX0
1010X0
101100
3014 && $numbor=~/^[Ff]$/) || ($picks{$picknum} ne
3015 '+' && $picks{$picknum} ne '-' &&
3016 !$gotmany)) {
3017 #print "DO WE GET HERE5! and $MenuUnit_hash_ref->{Select}\n";
3018 0 $mark_flg=1;
3019 0 $mark=$mark_blank;
3020 0 substr($mark,-1)='*';
3021 0 ▶ if ((exists $FullMenu->{$MenuUnit_hash_ref}[2]
Branch: 1 branch
BranchTrueFalseTotal
if (exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH" and grep {/Item_/;} keys %{$$FullMenu{$MenuUnit_hash_ref}[3];}) 0 0 0
Condition0%0/6
exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH" and grep {/Item_/;} keys %{$$FullMenu{$MenuUnit_hash_ref}[3];}
!ll&&!rl&&r
000
exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/3
exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH" and grep {/Item_/;} keys %{$$FullMenu{$MenuUnit_hash_ref}[3];}
exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH" grep {/Item_/;} keys %{$$FullMenu{$MenuUnit_hash_ref}[3];}
Truth table0%0/4
A and B and C
A= exists $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]}B= ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$picknum - 1]} eq "HASH"C= grep {/Item_/;} keys %{$$FullMenu{$MenuUnit_hash_ref}[3];}
ABCresult
0XX0
10X0
1100
1111
3022 {$all_menu_items_array[$picknum-1]}) && ref
3023 $FullMenu->{$MenuUnit_hash_ref}[2]
3024 {$all_menu_items_array[$picknum-1]} eq 'HASH' &&
3025 0 (grep { /Item_/ } keys %{$FullMenu->
3026 0 {$MenuUnit_hash_ref}[3]})) {
3027 0 ▶ if (exists $FullMenu->{$MenuUnit_hash_ref}[3]
Branch: 1 branch
BranchTrueFalseTotal
if (exists $FullMenu->{$MenuUnit_hash_ref}[3]{$all_menu_items_array[$picknum - 1]}) { } 0 0 0
3028 {$all_menu_items_array[$picknum-1]}) {
3029 $convey=$FullMenu->{$MenuUnit_hash_ref}[3]
3030 0 {$all_menu_items_array[$picknum-1]}->[0];
3031 0 } else { $convey=$all_menu_items_array[$picknum-1] }
3032 0 eval {
3033 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
3034 $SaveMMap,$SaveNext,$Persists)=&Menu($FullMenu->
3035 {$MenuUnit_hash_ref}[2]
3036 0 {$all_menu_items_array[$picknum-1]},$convey,
3037 $recurse_level,$FullMenu,
3038 $Selected,$Conveyed,$SavePick,
3039 $SaveMMap,$SaveNext,$Persists,
3040 $MenuUnit_hash_ref,$no_wantarray);
3041 }; # MENU RETURN MENURETURN 1
3042 0 ▶ print "MENU RETURN 1\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
3043 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
3044 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
3045 0 ▶ if ($menu_output eq '-') {
Branch: 5 branches
BranchTrueFalseTotal
if ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE') { } 0 0 0
elsif ($menu_output) { } 0 0 0
3046 0 $picks{$picknum}='-';
3047 0 $mark=$mark_blank;
3048 0 substr($mark,-1)='-';
3049 0 $start=${$FullMenu}{$MenuUnit_hash_ref}[11];
3050 } elsif ($menu_output eq '+') {
3051 0 $picks{$picknum}='+';
3052 0 $mark=$mark_blank;
3053 0 substr($mark,-1)='+';
3054 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
3055 } elsif ($menu_output eq 'DONE_SUB') {
3056 0 return 'DONE_SUB';
3057 } elsif ($menu_output eq 'DONE') {
3058 0 ▶ if (1==$recurse_level) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse_level) { } 0 0 0
3059 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3).'::'
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
3060 if $Term::Menus::fa_code;
3061 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
3062 0 foreach my $sub (&get_subs_from_menu($Selected)) {
3063 0 my @resu=();
3064 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
3065 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
3066 $MenuUnit_hash_ref->{'NoPlan'} ||
3067 !$MenuUnit_hash_ref->{'NoPlan'})
3068 && defined
3069 $Net::FullAuto::FA_Core::makeplan) {
3070 #print "IN MAKEPLAN1\n";
3071 0 ▶ if (-1==
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3072 $#{$Net::FullAuto::FA_Core::makeplan{
3073 0 'Plan'}} && !exists
3074 $Net::FullAuto::FA_Core::makeplan->{
3075 'Title'}) {
3076 $Net::FullAuto::FA_Core::makeplan->{
3077 0 'Title'}=$pn{$numbor}[0];
3078 }
3079 0 my $n='Number';
3080 my $planid=
3081 $Net::FullAuto::FA_Core::makeplan->{
3082 0 $n};
3083 0 my $s=$sub;
3084 0 my $item=
3085 &Data::Dump::Streamer::Dump(
3086 $s)->Out();
3087 0 push @{$Net::FullAuto::FA_Core::makeplan->{
3088 0 'Plan'}},
3089 { Menu => &pw($MenuUnit_hash_ref),
3090 Number => $numbor,
3091 PlanID => $planid,
3092 Item => $item
3093 }
3094 }
3095 0 eval { @resu=$sub->() };
3096 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
3097 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
3098 eq 'FATAL ERROR') {
3099 0 ▶ if ($parent_menu && wantarray
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3100 && !$no_wantarray) {
3101 0 return '',$FullMenu,$Selected,
3102 $Conveyed,$SavePick,$SaveMMap,
3103 $SaveNext,$Persists,
3104 $parent_menu,$@;
3105 }
3106 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3107 -1<index $log_handle,'*') {
3108 0 print $log_handle $@;
3109 0 close($log_handle);
3110 }
3111 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3112 0 &Net::FullAuto::FA_Core::handle_error(
3113 $@);
3114 0 } else { die $@ }
3115 } else {
3116 0 my $die=''
3117 ."\n FATAL ERROR! - The Local "
3118 ."System $Term::Menus::local_hostname"
3119 ." Conveyed\n"
3120 ." the Following "
3121 ."Unrecoverable Error Condition :\n\n"
3122 ." $@\n line ".__LINE__;
3123 0 ▶ if ($parent_menu && wantarray
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3124 && !$no_wantarray) {
3125 0 return '',$FullMenu,$Selected,
3126 $Conveyed,$SavePick,$SaveMMap,
3127 $SaveNext,$Persists,
3128 $parent_menu,$die;
3129 }
3130 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3131 -1<index $log_handle,'*') {
3132 0 print $log_handle $die;
3133 0 close($log_handle);
3134 }
3135 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3136 0 &Net::FullAuto::FA_Core::handle_error(
3137 $die);
3138 0 } else { die $die }
3139 }
3140 }
3141 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
3142 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
3143 0 ▶ if (0<$#resu && wantarray &&
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3144 !$no_wantarray) {
3145 0 return @resu;
3146 } else {
3147 0 return return_result($resu[0],
3148 $MenuUnit_hash_ref,$Conveyed);
3149 0 } return 'DONE_SUB';
3150 }
3151 }
3152 0 eval {
3153 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
3154 0 $sub=~s/^[&]//;
3155 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
3156 $MenuUnit_hash_ref->{'NoPlan'} ||
3157 !$MenuUnit_hash_ref->{'NoPlan'})
3158 && defined
3159 $Net::FullAuto::FA_Core::makeplan) {
3160 #print "IN MAKEPLAN2\n";
3161 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3162 0 'Plan'}} && !exists
3163 $Net::FullAuto::FA_Core::makeplan->{
3164 'Title'}) {
3165 $Net::FullAuto::FA_Core::makeplan->{
3166 0 'Title'}=$pn{$numbor}[0];
3167 }
3168 push @{$Net::FullAuto::FA_Core::makeplan->{
3169 0 'Plan'}},
3170 { Menu => &pw($MenuUnit_hash_ref),
3171 Number => $numbor,
3172 PlanID =>
3173 $Net::FullAuto::FA_Core::makeplan->{Number},
3174 0 Item => "&$subfile$sub" }
3175 }
3176 0 eval "\@resu=\&$subfile$sub";
3177 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
3178
3179 0 ▶ if ((-1<index $firsterr,
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
3180 'Undefined subroutine') &&
3181 (-1<index $firsterr,$sub)) {
3182 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
3183 0 eval "\@resu=main::$sub";
3184 } else {
3185 0 eval "\@resu=$sub";
3186 }
3187 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
3188 0 my $c=$Term::Menus::fa_code;
3189 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
3190 0 ▶ if ($FullMenu->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if ($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
3191 [2]{$all_menu_items_array[
3192 $numbor-1]}) {
3193 $die="The \"Result15 =>\" Setting"
3194 ."\n\t\t-> " . $FullMenu->
3195 {$MenuUnit_hash_ref}[2]
3196 {$all_menu_items_array[
3197 $numbor-1]}
3198 ."\n\t\tFound in the Menu "
3199 ."Unit -> "
3200 .$MenuUnit_hash_ref->{Name}
3201 0 ."\n\t\t"
3202 ."Specifies a Subroutine"
3203 ." that Does NOT Exist"
3204 ."\n\t\tin the User Code File "
3205 .$c.",\n\t\tnor was a routine "
3206 ."with that name\n\t\tlocated"
3207 ." in the main:: script.\n";
3208 } else {
3209 0 $die=
3210 "$firsterr\n $seconderr"
3211 }
3212 0 } else { $die=$seconderr }
3213 0 &Net::FullAuto::FA_Core::handle_error(
3214 $die);
3215 } elsif ($firsterr) {
3216 0 &Net::FullAuto::FA_Core::handle_error(
3217 $firsterr);
3218 }
3219 } else {
3220 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
3221 0 $sub=~s/^[&]//;
3222 0 eval "\@resu=main::$sub";
3223 } else {
3224 0 eval "\@resu=$sub";
3225 }
3226 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
3227 }
3228 };
3229 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
3230 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
3231 eq 'FATAL ERROR') {
3232 0 ▶ if ($parent_menu && wantarray
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3233 && !$no_wantarray) {
3234 0 return '',$FullMenu,$Selected,$Conveyed,
3235 $SavePick,$SaveMMap,$SaveNext,
3236 $Persists,$parent_menu,$@;
3237 }
3238 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3239 -1<index $log_handle,'*') {
3240 0 print $log_handle $@;
3241 0 close($log_handle);
3242 }
3243 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3244 0 &Net::FullAuto::FA_Core::handle_error($@);
3245 0 } else { die $@ }
3246 } else {
3247 0 my $die=''
3248 ."\n FATAL ERROR! - The Local "
3249 ."System $Term::Menus::local_hostname "
3250 ."Conveyed\n"
3251 ." the Following "
3252 ."Unrecoverable Error Condition :\n\n"
3253 ." $@\n line ".__LINE__;
3254 0 ▶ if ($parent_menu && wantarray
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3255 && !$no_wantarray) {
3256 0 return '',$FullMenu,$Selected,$Conveyed,
3257 $SavePick,$SaveMMap,$SaveNext,
3258 $Persists,$parent_menu,$die;
3259 }
3260 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3261 -1<index $log_handle,'*') {
3262 0 print $log_handle $die;
3263 0 close($log_handle);
3264 }
3265 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3266 0 &Net::FullAuto::FA_Core::handle_error(
3267 $die);
3268 0 } else { die $die }
3269 }
3270 }
3271 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
3272 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
3273 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3274 0 return @resu;
3275 } else {
3276 0 return return_result($resu[0],
3277 $MenuUnit_hash_ref,$Conveyed);
3278 }
3279 }
3280 }
3281 0 return 'DONE_SUB';
3282 0 } else { return 'DONE' }
3283 } elsif ($menu_output) {
3284 0 return $menu_output;
3285 } else {
3286 0 $picks{$picknum}='+';
3287 0 $mark=$mark_blank;
3288 0 substr($mark,-1)='+';
3289 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
3290 }
3291 }
3292 }
3293 } else {
3294 0 $mark='';
3295 0 my $mark_len=$FullMenu->{$MenuUnit_hash_ref}[7]{BLANK};
3296 0 ▶ while ($mark_len--) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mark_len--) 0 0 0
3297 0 $mark.=' ';
3298 }
3299 }
3300 $mark=$FullMenu->{$MenuUnit_hash_ref}[7]
3301 {$all_menu_items_array[$picknum-1]}
3302 if exists $FullMenu->{$MenuUnit_hash_ref}[7]
3303 0 ▶ {$all_menu_items_array[$picknum-1]};
Branch: 1 branch
BranchTrueFalseTotal
if exists $FullMenu->{$MenuUnit_hash_ref}[7]{$all_menu_items_array[$picknum - 1]} 0 0 0
3304 0 ▶ if (!$hidedefaults &&
Branch: 1 branch
BranchTrueFalseTotal
if (not $hidedefaults and ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH" and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*" || $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/) 0 0 0
Condition0%0/12
not $hidedefaults and ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH" and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*" || $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/
!ll&&!rl&&r
000
not $hidedefaults and ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH" and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}
!ll&&!rl&&r
000
not $hidedefaults and ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH"
!ll&&!rl&&r
000
$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*" or $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/
l!l&&r!l&&!r
000
MC/DC0%0/5
not $hidedefaults and ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH" and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*" || $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/
not $hidedefaults ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH" $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*" $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/
Truth table0%0/6
not(A) and B and C and D or E
A= not $hidedefaultsB= ref $FullMenu->{$MenuUnit_hash_ref}[5] eq "HASH"C= $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}D= $FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]} eq "*"E= $all_menu_items_array[$picknum - 1] =~ /$FullMenu->{$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum - 1]}/
ABCDEresult
0XXXX0
10XXX0
110XX0
111000
1111X1
111011
3305 ref $FullMenu->{$MenuUnit_hash_ref}[5] eq 'HASH'
3306 && $FullMenu->{$MenuUnit_hash_ref}[5]
3307 {$all_menu_items_array[$picknum-1]} && ($FullMenu->
3308 {$MenuUnit_hash_ref}[5]{$all_menu_items_array[$picknum-1]}
3309 eq '*' || $all_menu_items_array[$picknum-1]=~
3310 /$FullMenu->{$MenuUnit_hash_ref}[5]{
3311 $all_menu_items_array[$picknum-1]}/)) {
3312 0 $mark=$mark_blank;
3313 0 substr($mark,-1)='*';$mark_flg=1;
3314 0 $SavePick->{$MenuUnit_hash_ref}{$picknum}='*';
3315 }
3316 0 $picknum_for_display=$picknum;
3317 0 ▶ if (ref $FullMenu->{$MenuUnit_hash_ref}[8] eq 'HASH'
Branch: 1 branch
BranchTrueFalseTotal
if (ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" and keys %{$$FullMenu{$MenuUnit_hash_ref}[8];} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}) 0 0 0
Condition0%0/9
ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" and keys %{$$FullMenu{$MenuUnit_hash_ref}[8];} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}
!ll&&!rl&&r
000
ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" and keys %{$$FullMenu{$MenuUnit_hash_ref}[8];} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}
!ll&&!rl&&r
000
ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" and keys %{$$FullMenu{$MenuUnit_hash_ref}[8];}
!ll&&!rl&&r
000
MC/DC0%0/4
ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" and keys %{$$FullMenu{$MenuUnit_hash_ref}[8];} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}
ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH" keys %{$$FullMenu{$MenuUnit_hash_ref}[8];} exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]} $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}
Truth table0%0/5
A and B and C and D
A= ref $FullMenu->{$MenuUnit_hash_ref}[8] eq "HASH"B= keys %{$$FullMenu{$MenuUnit_hash_ref}[8];}C= exists $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}D= $FullMenu->{$MenuUnit_hash_ref}[8]{$all_menu_items_array[$picknum - 1]}
ABCDresult
0XXX0
10XX0
110X0
11100
11111
3318 0 && keys %{$FullMenu->{$MenuUnit_hash_ref}[8]} &&
3319 exists $FullMenu->{$MenuUnit_hash_ref}[8]
3320 {$all_menu_items_array[$picknum-1]}
3321 && $FullMenu->{$MenuUnit_hash_ref}[8]
3322 {$all_menu_items_array[$picknum-1]}) {
3323 $picknum_for_display=
3324 $FullMenu->{$MenuUnit_hash_ref}[8]
3325 0 {$all_menu_items_array[$picknum-1]};
3326 0 $mark=$mark_blank;
3327 0 ▶ if (exists $SavePick->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (exists $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display} and $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}) { } 0 0 0
Condition0%0/3
exists $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display} and $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display} and $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}
exists $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display} $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}
Truth table0%0/3
A and B
A= exists $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}B= $SavePick->{$MenuUnit_hash_ref}{$picknum_for_display}
ABresult
0X0
100
111
3328 {$picknum_for_display} &&
3329 $SavePick->{$MenuUnit_hash_ref}
3330 {$picknum_for_display}) {
3331 substr($mark,-1)=$SavePick->{$MenuUnit_hash_ref}
3332 0 {$picknum_for_display}
3333 0 } else { $mark=' ' }
3334 0 ▶ $mark_flg=1 unless $mark=~/^ +$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $mark =~ /^ +$/ 0 0 0
3335 $Persists->{$MenuUnit_hash_ref}{defaults}=1
3336 0 ▶ if $Persists->{$parent_menu}{defaults};
Branch: 1 branch
BranchTrueFalseTotal
if $Persists->{$parent_menu}{"defaults"} 0 0 0
3337 0 ▶ if ($FullMenu->{$MenuUnit_hash_ref}[9]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($FullMenu->{$MenuUnit_hash_ref}[9]) 0 0 0
3338 0 $filtered_menu=1;
3339 }
3340 }
3341 0 $pn{$picknum_for_display}=
3342 [ $all_menu_items_array[$picknum-1],$picknum ];
3343 0 my $scroll=' ';
3344 0 ▶ if (exists $MenuUnit_hash_ref->{Scroll}
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}[1] eq $picknum || $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum) 0 0 0
Condition0%0/6
exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}[1] eq $picknum || $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum
!ll&&!rl&&r
000
$MenuUnit_hash_ref->{"Scroll"}[1] eq $picknum or $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum
l!l&&r!l&&!r
000
MC/DC0%0/3
exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}[1] eq $picknum || $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum
exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}[1] eq $picknum $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum
Truth table0%0/4
A and B or C
A= exists $MenuUnit_hash_ref->{"Scroll"}B= $MenuUnit_hash_ref->{"Scroll"}[1] eq $picknumC= $MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum
ABCresult
0XX0
1000
11X1
1011
3345 && ($MenuUnit_hash_ref->{Scroll}->[1] eq $picknum
3346 || $MenuUnit_hash_ref->{Scroll}->[0] eq $picknum)) {
3347 0 ▶ if ($MenuUnit_hash_ref->{Scroll}->[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MenuUnit_hash_ref->{'Scroll'}[0]) { } 0 0 0
3348 0 ▶ if ($MenuUnit_hash_ref->{Scroll}->[0] eq $picknum) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MenuUnit_hash_ref->{"Scroll"}[0] eq $picknum) 0 0 0
3349 0 $MenuUnit_hash_ref->{Scroll}->[1]=$picknum;
3350 0 $MenuUnit_hash_ref->{Scroll}->[0]=0;
3351 0 $scroll='>';
3352 }
3353 } else {
3354 0 $scroll='>';
3355 }
3356 }
3357 0 my $picknum_display=sprintf "%-7s",$picknum_for_display;
3358 0 $menu_text.=" $scroll$mark $picknum_display"
3359 ."$all_menu_items_array[$picknum-1]\n";
3360 0 ▶ if (exists $FullMenu->{$MenuUnit_hash_ref}[6]
Branch: 1 branch
BranchTrueFalseTotal
if (exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$picknum - 1]}) 0 0 0
3361 {$all_menu_items_array[$picknum-1]}) {
3362 my $tstt=$FullMenu->{$MenuUnit_hash_ref}[6]
3363 0 {$all_menu_items_array[$picknum-1]};
3364 0 ▶ if ($tstt=~/many/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($tstt =~ /many/i) 0 0 0
3365 0 $MenuUnit_hash_ref->{Select}{$picknum_for_display}='many';
3366 }
3367 }
3368 0 ▶ if ($mark=~/^ +$/ || (exists $picks{$picknum} ||
Branch: 1 branch
BranchTrueFalseTotal
if ($mark =~ /^ +$/ or (exists $picks{$picknum} or exists $picks{$picknum_for_display})) 0 0 0
Condition0%0/6
$mark =~ /^ +$/ or (exists $picks{$picknum} or exists $picks{$picknum_for_display})
l!l&&r!l&&!r
000
exists $picks{$picknum} or exists $picks{$picknum_for_display}
l!l&&r!l&&!r
000
MC/DC0%0/3
$mark =~ /^ +$/ or (exists $picks{$picknum} or exists $picks{$picknum_for_display})
$mark =~ /^ +$/ exists $picks{$picknum} exists $picks{$picknum_for_display}
Truth table0%0/4
A or B or C
A= $mark =~ /^ +$/B= exists $picks{$picknum}C= exists $picks{$picknum_for_display}
ABCresult
1XX1
01X1
0011
0000
3369 exists $picks{$picknum_for_display})) {
3370 0 ${$_[0]}[$picknum_for_display-1]=
3371 $all_menu_items_array[$picknum-1];
3372 }
3373 0 $picknum++;
3374 0 $numlist--;
3375 0 } $hidedefaults=1;$picknum--;
3376 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and $Net::FullAuto::FA_Core::makeplan and $Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu) 0 0 0
Condition0%0/15
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and $Net::FullAuto::FA_Core::makeplan and $Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and $Net::FullAuto::FA_Core::makeplan and $Persists->{$MenuUnit_hash_ref}{"defaults"}
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/6
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and $Net::FullAuto::FA_Core::makeplan and $Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} $Net::FullAuto::FA_Core::makeplan $Persists->{$MenuUnit_hash_ref}{"defaults"} not $filtered_menu
Truth table0%0/10
A and not(B && C) and D and E and not(F)
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= $Net::FullAuto::FA_Core::makeplanE= $Persists->{$MenuUnit_hash_ref}{"defaults"}F= not $filtered_menu
ABCDEFresult
0XXXXX0
111XXX0
10X0XX0
1100XX0
10X10X0
11010X0
10X1100
1101100
10X1111
1101111
3377 $MenuUnit_hash_ref->{'NoPlan'} ||
3378 !$MenuUnit_hash_ref->{'NoPlan'}) &&
3379 $Net::FullAuto::FA_Core::makeplan &&
3380 $Persists->{$MenuUnit_hash_ref}{defaults} &&
3381 !$filtered_menu) {
3382 0 my %askmenu=(
3383
3384 Item_1 => {
3385
3386 Text => "Use the result saved with the \"Plan\""
3387
3388 },
3389 Item_2 => {
3390
3391 Text => "Use the \"Default\" setting to determine result"
3392
3393 },
3394 NoPlan => 1,
3395 Banner => " FullAuto has determined that the ".
3396 &pw($MenuUnit_hash_ref) .
3397 " Menu has been\n".
3398 " configured with a \"Default\" setting."
3399
3400 );
3401 0 my $answ=Menu(\%askmenu);
3402 0 ▶ if ($answ eq ']quit[') {
Branch: 1 branch
BranchTrueFalseTotal
if ($answ eq "]quit[") 0 0 0
3403 0 return ']quit['
3404 }
3405 0 ▶ if (-1==index $answ,'result saved') {
Branch: 1 branch
BranchTrueFalseTotal
if (index($answ, "result saved") == -1) 0 0 0
3406 #print "IN MAKEPLAN3\n";
3407 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}} &&
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3408 !exists $Net::FullAuto::FA_Core::makeplan->{'Title'}) {
3409 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}=$pn{$numbor}[0];
3410 }
3411 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
3412 { Menu => &pw($MenuUnit_hash_ref),
3413 Number => 'Default',
3414 PlanID =>
3415 $Net::FullAuto::FA_Core::makeplan->{Number},
3416 0 Item => '' };
3417 0 $got_default=1;
3418 }
3419 }
3420 0 ▶ unless ($Persists->{unattended}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($Persists->{'unattended'}) { } 0 0 0
if (do { $Persists->{$MenuUnit_hash_ref}{'defaults'} }) { } 0 0 0
elsif (wantarray and not $no_wantarray) { } 0 0 0
3421 0 ▶ if ($^O ne 'cygwin') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O ne 'cygwin') { } 0 0 0
3422 0 ▶ unless ($noclear) {
Branch: 1 branch
BranchTrueFalseTotal
if ($noclear) { } 0 0 0
3423 0 ▶ if ($^O eq 'MSWin32' || $^O eq 'MSWin64') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'MSWin32' or $^O eq 'MSWin64') { } 0 0 0
Condition0%0/3
$^O eq "MSWin32" or $^O eq "MSWin64"
l!l&&r!l&&!r
000
MC/DC0%0/2
$^O eq "MSWin32" or $^O eq "MSWin64"
$^O eq "MSWin32" $^O eq "MSWin64"
Truth table0%0/3
A or B
A= $^O eq "MSWin32"B= $^O eq "MSWin64"
ABresult
1X1
011
000
3424 0 system("cmd /c cls");
3425 0 print "\n";
3426 } else {
3427 0 print `${Term::Menus::clearpath}clear`."\n";
3428 0 print $blanklines
3429 }
3430 0 } else { print $blanklines }
3431 0 } else { print $blanklines }
3432 0 print $menu_text;my $ch=0;
3433 0 ▶ if ($select_many || (keys %{${$MenuUnit_hash_ref}{Select}})) {
Branch: 1 branch
BranchTrueFalseTotal
if ($select_many or keys %{${$MenuUnit_hash_ref;}{'Select'};}) { } 0 0 0
Condition0%0/3
$select_many or keys %{${$MenuUnit_hash_ref;}{"Select"};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or keys %{${$MenuUnit_hash_ref;}{"Select"};}
$select_many keys %{${$MenuUnit_hash_ref;}{"Select"};}
Truth table0%0/3
A or B
A= $select_manyB= keys %{${$MenuUnit_hash_ref;}{"Select"};}
ABresult
1X1
011
000
3434 0 print "\n";
3435 0 ▶ unless (keys %{$FullMenu->{$MenuUnit_hash_ref}[1]}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (keys %{$$FullMenu{$MenuUnit_hash_ref}[1];}) 0 0 0
3436 0 print " a. Select All";$ch=1;
3437 }
3438 0 ▶ if ($mark_flg==1 || $Persists->{$MenuUnit_hash_ref}{defaults}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mark_flg == 1 or $Persists->{$MenuUnit_hash_ref}{"defaults"}) 0 0 0
Condition0%0/3
$mark_flg == 1 or $Persists->{$MenuUnit_hash_ref}{"defaults"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$mark_flg == 1 or $Persists->{$MenuUnit_hash_ref}{"defaults"}
$mark_flg == 1 $Persists->{$MenuUnit_hash_ref}{"defaults"}
Truth table0%0/3
A or B
A= $mark_flg == 1B= $Persists->{$MenuUnit_hash_ref}{"defaults"}
ABresult
1X1
011
000
3439 0 print " c. Clear All";#print "\n" if $ch;
3440 }
3441 0 print " f. FINISH\n";
3442 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
3443 0 print "\n (Type '<' to return to previous Menu)\n";
3444 }
3445 0 ▶ if ($Persists->{$MenuUnit_hash_ref}{defaults} &&
Branch: 1 branch
BranchTrueFalseTotal
if ($Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu) 0 0 0
Condition0%0/3
$Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
!ll&&!rl&&r
000
MC/DC0%0/2
$Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
$Persists->{$MenuUnit_hash_ref}{"defaults"} not $filtered_menu
Truth table0%0/3
A and not(B)
A= $Persists->{$MenuUnit_hash_ref}{"defaults"}B= not $filtered_menu
ABresult
0X0
100
111
3446 !$filtered_menu) {
3447 0 print "\n == Default Selections Exist! == ",
3448 "(Type '*' to view them)\n";
3449 }
3450 } else {
3451 0 ▶ if ($Persists->{$MenuUnit_hash_ref}{defaults}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($Persists->{$MenuUnit_hash_ref}{'defaults'}) { } 0 0 0
elsif ($filtered_menu) { } 0 0 0
3452 0 print "\n",
3453 " c. Clear Default Selection.",
3454 " f. FINISH with Default Selection.\n";
3455 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
3456 0 print "\n (Type '<' to return to previous Menu)\n";
3457 } else {
3458 0 print "\n == Default Selection Exists! == ",
3459 "(Type '*' to view it)\n";
3460 }
3461 } elsif ($filtered_menu) {
3462 0 print "\n (Type '<' to return to previous Menu)\n";
3463 }
3464 }
3465 0 ▶ if ($display_this_many_items<$num_pick) {
Branch: 1 branch
BranchTrueFalseTotal
if ($display_this_many_items < $num_pick) { } 0 0 0
3466 0 my $len=length $num_pick;my $pad='';
3467 0 foreach my $n (1..$len) {
3468 0 $pad.=' ';
3469 }
3470 0 print $pad,
3471 "\n $num_pick Total Choices ",
3472 "[v][^] Scroll with ARROW keys ".
3473 " [F1] for HELP\n";
3474 0 } else { print "\n \(Press [F1] for HELP\)\n" }
3475 0 ▶ if ($Term::Menus::term_input) {
Branch: 1 branch
BranchTrueFalseTotal
if ($term_input) { } 0 0 0
3476 0 print "\n";
3477 0 ▶ if (exists $MenuUnit_hash_ref->{Input} &&
Branch: 2 branches
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Input'} and $MenuUnit_hash_ref->{'Input'}) { } 0 0 0
elsif ($show_banner_only) { } 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Input"} and $MenuUnit_hash_ref->{"Input"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Input"} and $MenuUnit_hash_ref->{"Input"}
exists $MenuUnit_hash_ref->{"Input"} $MenuUnit_hash_ref->{"Input"}
Truth table0%0/3
A and B
A= exists $MenuUnit_hash_ref->{"Input"}B= $MenuUnit_hash_ref->{"Input"}
ABresult
0X0
100
111
3478 $MenuUnit_hash_ref->{Input}) {
3479 0 ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
3480 " Press ENTER when finished ",1);
3481 0 ▶ next unless ($ikey eq 'ENTER' || $ikey eq 'ESC' ||
Branch: 1 branch
BranchTrueFalseTotal
unless $ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW" or $ikey eq "LEFTARROW" or $ikey eq "RIGHTARROW" or $ikey eq "F1" 0 0 0
Condition0%0/18
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW" or $ikey eq "LEFTARROW" or $ikey eq "RIGHTARROW" or $ikey eq "F1"
l!l&&r!l&&!r
000
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW" or $ikey eq "LEFTARROW" or $ikey eq "RIGHTARROW"
l!l&&r!l&&!r
000
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW" or $ikey eq "LEFTARROW"
l!l&&r!l&&!r
000
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW"
l!l&&r!l&&!r
000
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW"
l!l&&r!l&&!r
000
$ikey eq "ENTER" or $ikey eq "ESC"
l!l&&r!l&&!r
000
MC/DC0%0/7
$ikey eq "ENTER" or $ikey eq "ESC" or $ikey eq "UPARROW" or $ikey eq "DOWNARROW" or $ikey eq "LEFTARROW" or $ikey eq "RIGHTARROW" or $ikey eq "F1"
$ikey eq "ENTER" $ikey eq "ESC" $ikey eq "UPARROW" $ikey eq "DOWNARROW" $ikey eq "LEFTARROW" $ikey eq "RIGHTARROW" $ikey eq "F1"
Truth table0%0/8
A or B or C or D or E or F or G
A= $ikey eq "ENTER"B= $ikey eq "ESC"C= $ikey eq "UPARROW"D= $ikey eq "DOWNARROW"E= $ikey eq "LEFTARROW"F= $ikey eq "RIGHTARROW"G= $ikey eq "F1"
ABCDEFGresult
1XXXXXX1
01XXXXX1
001XXXX1
0001XXX1
00001XX1
000001X1
00000011
00000000
3482 $ikey eq 'UPARROW' || $ikey eq 'DOWNARROW' ||
3483 $ikey eq 'LEFTARROW' || $ikey eq 'RIGHTARROW' ||
3484 $ikey eq 'F1');
3485 } elsif ($show_banner_only) {
3486 0 ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
3487 " Press ENTER to continue ... ");
3488
3489 } else {
3490 0 ($numbor,$ikey)=rawInput(" \([ESC] to Quit\)".
3491 " PLEASE ENTER A CHOICE: ");
3492 }
3493 0 print "\n";
3494 } else {
3495 0 ▶ if ($show_banner_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($show_banner_only) { } 0 0 0
3496 0 print "\n \([ESC] to Quit\)",
3497 " Press ENTER to continue ... ";
3498 } else {
3499 0 print "\n \([ESC] to Quit\)",
3500 " PLEASE ENTER A CHOICE: ";
3501 }
3502 0 $numbor=<STDIN>;
3503 0 } $picknum_for_display=$numbor;chomp $picknum_for_display;
3504 } elsif ($Persists->{$MenuUnit_hash_ref}{defaults}) {
3505 0 $numbor='f';
3506 ▶ } elsif (wantarray && !$no_wantarray) {
Condition0%0/3
wantarray and not $no_wantarray
!ll&&!rl&&r
000
MC/DC0%0/2
wantarray and not $no_wantarray
wantarray not $no_wantarray
Truth table0%0/3
A and not(B)
A= wantarrayB= not $no_wantarray
ABresult
0X0
100
111
3507 0 my $die="\n FATAL ERROR! - 'Unattended' mode cannot be\n"
3508 ." used without a Plan or Default\n"
3509 ." Selections being available.";
3510 0 return '',$die;
3511 } else {
3512 0 my $die="\n FATAL ERROR! - 'Unattended' mode cannot be\n"
3513 ." used without a Plan or Default\n"
3514 ." Selections being available.";
3515 0 die($die);
3516 }
3517 0 ▶ if ($numbor=~/^[Ff]$/ &&
Branch: 12 branches
BranchTrueFalseTotal
if ($numbor =~ /^[Ff]$/ and $Persists->{$MenuUnit_hash_ref}{'defaults'} || $filtered_menu) { } 0 0 0
elsif ($numbor =~ /^\s*%(.*)/s) { } 0 0 0
elsif ($numbor =~ /^\*\s*$/s) { } 0 0 0
elsif ($numbor =~ m[^\s*/(.+)$]s) { } 0 0 0
elsif ($numbor =~ /^\</ || $ikey eq 'LEFTARROW' and $FullMenu) { } 0 0 0
elsif ($numbor =~ /^\>/ || $ikey eq 'RIGHTARROW' and exists $SaveNext->{$MenuUnit_hash_ref} and grep({/-|\+/;} values %picks) || $show_banner_only) { } 0 0 0
elsif ($ikey eq 'ESC' or $numbor =~ /^quit|exit|bye$/i) { } 0 0 0
elsif ($Term::Menus::fullauto and $ikey eq 'F1' || $numbor =~ /^help$/i) { } 0 0 0
elsif ($ikey eq 'F1' or $numbor =~ /^help$/i) { } 0 0 0
elsif ($Term::Menus::fullauto and $numbor =~ /^admin$/i) { } 0 0 0
elsif (not keys %{$$FullMenu{$MenuUnit_hash_ref}[1];} and $numbor =~ /^[Aa]$/) { } 0 0 0
elsif ($numbor =~ /^[Cc]$/) { } 0 0 0
Condition0%0/6
$numbor =~ /^[Ff]$/ and $Persists->{$MenuUnit_hash_ref}{"defaults"} || $filtered_menu
!ll&&!rl&&r
000
$Persists->{$MenuUnit_hash_ref}{"defaults"} or $filtered_menu
l!l&&r!l&&!r
000
MC/DC0%0/3
$numbor =~ /^[Ff]$/ and $Persists->{$MenuUnit_hash_ref}{"defaults"} || $filtered_menu
$numbor =~ /^[Ff]$/ $Persists->{$MenuUnit_hash_ref}{"defaults"} $filtered_menu
Truth table0%0/4
A and B or C
A= $numbor =~ /^[Ff]$/B= $Persists->{$MenuUnit_hash_ref}{"defaults"}C= $filtered_menu
ABCresult
0XX0
1000
11X1
1011
3518 ($Persists->{$MenuUnit_hash_ref}{defaults} ||
3519 $filtered_menu)) {
3520 # FINISH
3521 0 ▶ delete $main::maintain_scroll_flag->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::maintain_scroll_flag 0 0 0
3522 if defined $main::maintain_scroll_flag;
3523 0 my $choice='';my @keys=();
3524 0 my $chosen='';
3525 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
3526 0 $chosen=$parent_menu;
3527 0 return '-',
3528 $FullMenu,$Selected,$Conveyed,
3529 $SavePick,$SaveMMap,$SaveNext,
3530 $Persists,$parent_menu;
3531 0 } else { $chosen=$MenuUnit_hash_ref }
3532 0 @keys=keys %picks;
3533 0 ▶ if (-1==$#keys) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#keys) 0 0 0
3534 0 ▶ if ($Persists->{$MenuUnit_hash_ref}{defaults}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Persists->{$MenuUnit_hash_ref}{'defaults'}) { } 0 0 0
3535 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
3536 0 $chosen=$parent_menu;
3537 }
3538 0 my $it=${[keys %{${$FullMenu}{$chosen}[5]}]}[0];
3539 0 my $def=${$FullMenu}{$chosen}[5]{$it};
3540 0 ▶ $def='.*' if $def eq '*';
Branch: 1 branch
BranchTrueFalseTotal
if $def eq "*" 0 0 0
3541 0 ▶ if ($def) {
Branch: 1 branch
BranchTrueFalseTotal
if ($def) 0 0 0
3542 0 my $cnt=1;
3543 0 foreach my $item (@all_menu_items_array) {
3544 #sort @{[keys %{${$FullMenu}{$chosen}[5]}]}) {
3545 0 ▶ if ($item=~/$def/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($item =~ /$def/) 0 0 0
3546 0 $picks{$cnt}='*';
3547 0 push @keys, $item;
3548 0 } $cnt++
3549 }
3550 }
3551 } else {
3552 0 @keys=keys %{$SavePick->{$parent_menu}};
3553 0 ▶ if (-1==$#keys) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#keys) 0 0 0
3554 0 ▶ if ($^O ne 'cygwin') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O ne 'cygwin') { } 0 0 0
3555 0 ▶ unless ($noclear) {
Branch: 1 branch
BranchTrueFalseTotal
if ($noclear) { } 0 0 0
3556 0 ▶ if ($^O eq 'MSWin32' || $^O eq 'MSWin64') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'MSWin32' or $^O eq 'MSWin64') { } 0 0 0
Condition0%0/3
$^O eq "MSWin32" or $^O eq "MSWin64"
l!l&&r!l&&!r
000
MC/DC0%0/2
$^O eq "MSWin32" or $^O eq "MSWin64"
$^O eq "MSWin32" $^O eq "MSWin64"
Truth table0%0/3
A or B
A= $^O eq "MSWin32"B= $^O eq "MSWin64"
ABresult
1X1
011
000
3557 0 system("cmd /c cls");
3558 0 print "\n";
3559 } else {
3560 0 print `${Term::Menus::clearpath}clear`."\n";
3561 }
3562 0 } else { print $blanklines }
3563 0 } else { print $blanklines }
3564 0 print "\n\n Attention USER! :\n\n ",
3565 "You have selected \"f\" to finish your\n",
3566 " selections, BUT -> You have not actually\n",
3567 " selected anything!\n\n Do you wish ",
3568 "to quit or re-attempt selecting?\n\n ",
3569 "Press [ESC] to quit or ENTER to continue ... ";
3570 0 ▶ if ($Term::Menus::term_input) {
Branch: 1 branch
BranchTrueFalseTotal
if ($term_input) { } 0 0 0
3571 0 print "\n";
3572 0 ($choice,$ikey)=rawInput(" \([ESC] to Quit\)".
3573 " PLEASE ENTER A CHOICE: ");
3574 0 print "\n";
3575 } else {
3576 0 print " \([ESC] to Quit\)",
3577 "\n PLEASE ENTER A CHOICE: ";
3578 0 $choice=<STDIN>;
3579 }
3580 0 chomp($choice);
3581 0 ▶ next if lc($choice) ne 'quit';
Branch: 1 branch
BranchTrueFalseTotal
if lc $choice ne "quit" 0 0 0
3582 0 return ']quit['
3583 }
3584 }
3585 }
3586 0 my $return_values=0;
3587 0 ▶ sub numerically { $a <=> $b }
Subroutine numerically: not called CC=1 SCAR=6.9
Pod undocumented
3588 0 my %dupseen=();my @pickd=();
3589 0 foreach my $pk (sort numerically keys %picks) {
3590 $return_values=1 if !exists
3591 0 ${$FullMenu}{$chosen}[2]{${$_[0]}[$pk-1]}
3592 || !keys
3593 0 ▶ %{${$FullMenu}{$chosen}[2]{${$_[0]}[$pk-1]}};
Branch: 1 branch
BranchTrueFalseTotal
unless exists do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]} and keys %{do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]};} 0 0 0
Condition0%0/3
exists do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]} and keys %{do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]};}
!ll&&!rl&&r
000
MC/DC0%0/2
exists do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]} and keys %{do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]};}
exists do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]} keys %{do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]};}
Truth table0%0/3
A and B
A= exists do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]}B= keys %{do { $FullMenu }->{$chosen}[2]{${$_[0];}[$pk - 1]};}
ABresult
0X0
100
111
3594 0 ▶ if (${${$FullMenu}{$parent_menu}[10]}[$pk-1] &&
Branch: 3 branches
BranchTrueFalseTotal
if (${${$FullMenu;}{$parent_menu}[10];}[$pk - 1] and not ${$_[0];}[$pk - 1]) { } 0 0 0
elsif (${$_[0];}[$pk - 1]) { } 0 0 0
elsif ($pn{$picknum}) { } 0 0 0
Condition0%0/3
${${$FullMenu;}{$parent_menu}[10];}[$pk - 1] and not ${$_[0];}[$pk - 1]
!ll&&!rl&&r
000
MC/DC0%0/2
${${$FullMenu;}{$parent_menu}[10];}[$pk - 1] and not ${$_[0];}[$pk - 1]
${${$FullMenu;}{$parent_menu}[10];}[$pk - 1] not ${$_[0];}[$pk - 1]
Truth table0%0/3
A and not(B)
A= ${${$FullMenu;}{$parent_menu}[10];}[$pk - 1]B= not ${$_[0];}[$pk - 1]
ABresult
0X0
100
111
3595 0 !${$_[0]}[$pk-1]) {
3596 0 my $txt=${${$FullMenu}{$parent_menu}[10]}[$pk-1];
3597 0 ▶ if (-1<index $txt,"__Master_${$}__") {
Branch: 1 branch
BranchTrueFalseTotal
if (index($txt, "__Master_${$}__") != -1) 0 0 0
3598 0 my $lhn=$Term::Menus::local_hostname;
3599 0 $txt=~s/__Master_${$}__/Local-Host: $lhn/sg;
3600 }
3601 0 ▶ unless (exists $dupseen{$txt}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $dupseen{$txt}) 0 0 0
3602 0 push @pickd, $txt;
3603 0 } $dupseen{$txt}='';
3604 0 } elsif (${$_[0]}[$pk-1]) {
3605 0 my $txt=${$_[0]}[$pk-1];
3606 0 ▶ if (-1<index $txt,"__Master_${$}__") {
Branch: 1 branch
BranchTrueFalseTotal
if (index($txt, "__Master_${$}__") != -1) 0 0 0
3607 0 my $lhn=$Term::Menus::local_hostname;
3608 0 $txt=~s/__Master_${$}__/Local-Host: $lhn/sg;
3609 }
3610 0 ▶ unless (exists $dupseen{$txt}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $dupseen{$txt}) 0 0 0
3611 0 push @pickd, $txt;
3612 0 } $dupseen{$txt}='';
3613 } elsif ($pn{$picknum}) {
3614 0 my $txt=$pn{$picknum}[0];
3615 0 ▶ if (-1<index $txt,"__Master_${$}__") {
Branch: 1 branch
BranchTrueFalseTotal
if (index($txt, "__Master_${$}__") != -1) 0 0 0
3616 0 my $lhn=$Term::Menus::local_hostname;
3617 0 $txt=~s/__Master_${$}__/Local-Host: $lhn/sg;
3618 }
3619 0 ▶ unless (exists $dupseen{$txt}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $dupseen{$txt}) 0 0 0
3620 0 push @pickd, $txt;
3621 0 } $dupseen{$txt}='';
3622 }
3623 }
3624 0 ▶ if ($return_values && $Term::Menus::fullauto &&
Branch: 1 branch
BranchTrueFalseTotal
if ($return_values and $Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/12
$return_values and $Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$return_values and $Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
$return_values and $Term::Menus::fullauto
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/5
$return_values and $Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$return_values $Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/7
A and B and not(C && D) and E
A= $return_valuesB= $Term::Menus::fullautoC= exists do { $MenuUnit_hash_ref }->{'NoPlan'}D= do { $MenuUnit_hash_ref }->{'NoPlan'}E= defined $Net::FullAuto::FA_Core::makeplan
ABCDEresult
0XXXX0
10XXX0
1111X0
110X00
111000
110X11
111011
3625 0 (!exists ${$MenuUnit_hash_ref}{'NoPlan'} ||
3626 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
3627 defined $Net::FullAuto::FA_Core::makeplan) {
3628 #print "IN MAKEPLAN4\n";
3629 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}} &&
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3630 !exists $Net::FullAuto::FA_Core::makeplan->{'Title'}) {
3631 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}=
3632 "Multiple Selections";
3633 }
3634 0 ▶ unless ($got_default) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($got_default) 0 0 0
3635 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
3636 { Menu => &pw($MenuUnit_hash_ref),
3637 Number => 'Multiple',
3638 PlanID =>
3639 $Net::FullAuto::FA_Core::makeplan->{Number},
3640 0 Item => "'".
3641 &Data::Dump::Streamer::Dump(\@pickd)->Out().
3642 "'" }
3643 }
3644 }
3645 0 ▶ return \@pickd if $return_values;
Branch: 1 branch
BranchTrueFalseTotal
if $return_values 0 0 0
3646 0 return 'DONE';
3647 } elsif ($numbor=~/^\s*%(.*)/s) {
3648 # PERCENT SYMBOL SORT ORDER
3649 0 ▶ my $one=$1||'';
Condition0%0/2
$1 || ''
l!l
00
MC/DC0%0/1
$1 || ''
$1
Truth table0%0/2
A
A= $1
Aresult
11
00
3650 0 chomp $one;
3651 0 ▶ $one=qr/$one/ if $one;
Branch: 1 branch
BranchTrueFalseTotal
if $one 0 0 0
3652 0 my @spl=();
3653 0 chomp $numbor;
3654 0 my $cnt=0;my $ct=0;my @splice=();
3655 0 my $sort_ed='';
3656 0 ▶ if ($one) {
Branch: 2 branches
BranchTrueFalseTotal
if ($one) { } 0 0 0
elsif ($sorted and $sorted eq 'forward') { } 0 0 0
3657
3658 ▶ } elsif ($sorted && $sorted eq 'forward') {
Condition0%0/3
$sorted and $sorted eq "forward"
!ll&&!rl&&r
000
MC/DC0%0/2
$sorted and $sorted eq "forward"
$sorted $sorted eq "forward"
Truth table0%0/3
A and B
A= $sortedB= $sorted eq "forward"
ABresult
0X0
100
111
3659 0 @spl=reverse @all_menu_items_array;$sort_ed='reverse';
3660 0 } else { @spl=sort @all_menu_items_array;$sort_ed='forward' }
3661 0 ▶ next if $#spl==-1;
Branch: 1 branch
BranchTrueFalseTotal
if $#spl == -1 0 0 0
3662 0 my %sort=();
3663 0 foreach my $line (@all_menu_items_array) {
3664 0 $cnt++;
3665 0 ▶ if (exists $pn{$picknum} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq 'HASH' and keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}) { } 0 0 0
Condition0%0/15
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH" and keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
!ll&&!rl&&r
000
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH" and keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};}
!ll&&!rl&&r
000
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH"
!ll&&!rl&&r
000
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
!ll&&!rl&&r
000
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
!ll&&!rl&&r
000
MC/DC0%0/6
exists $pn{$picknum} and exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} and ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH" and keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};} and $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
exists $pn{$picknum} exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH" keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};} $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
Truth table0%0/7
A and B and C and D and E and F
A= exists $pn{$picknum}B= exists $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}C= $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}D= ref $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} eq "HASH"E= keys %{$FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]};}F= $FullMenu->{$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}
ABCDEFresult
0XXXXX0
10XXXX0
110XXX0
1110XX0
11110X0
1111100
1111111
3666 exists $FullMenu->{$MenuUnit_hash_ref}[8]
3667 {$pn{$picknum}[0]} && $FullMenu->
3668 {$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]} &&
3669 ref $FullMenu->{$MenuUnit_hash_ref}[8]
3670 {$pn{$picknum}[0]} eq 'HASH' &&
3671 keys %{$FullMenu->{$MenuUnit_hash_ref}[8]
3672 0 {$pn{$picknum}[0]}} && $FullMenu->
3673 {$MenuUnit_hash_ref}[8]{$pn{$picknum}[0]}) {
3674 0 $sort{$line}=$FullMenu->{$MenuUnit_hash_ref}[8]{$line};
3675 0 } else { $sort{$line}=$cnt }
3676 0 } $cnt=0;
3677 0 my $chosen='';
3678 0 ▶ if (!$sorted) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sorted) { } 0 0 0
3679 0 ▶ my $send_select='Many' if $select_many;
Branch: 1 branch
BranchTrueFalseTotal
if $select_many 0 0 0
3680 $chosen={
3681 Select => $send_select,
3682 0 Banner => ${$MenuUnit_hash_ref}{Banner},
3683 0 };
3684 0 my $cnt=0;
3685 0 foreach my $text (@spl) {
3686 0 my $num=$sort{$text};
3687 0 $cnt++;
3688 0 ▶ if (exists $picks{$num}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$num}) { } 0 0 0
3689 0 $chosen->{'Item_'.$cnt}=
3690 { Text => $text,Default => '*',__NUM__=>$num };
3691 } else {
3692 0 $chosen->{'Item_'.$cnt}=
3693 { Text => $text,__NUM__=>$num };
3694 }
3695 $chosen->{'Item_'.$cnt}{Result}=
3696 0 ${${$MenuUnit_hash_ref}{${${$FullMenu}
3697 0 {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'}
3698 0 if exists ${${$MenuUnit_hash_ref}{${${$FullMenu}
3699 0 ▶ {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'};
Branch: 1 branch
BranchTrueFalseTotal
if exists do { ${$MenuUnit_hash_ref;}{do { ${$FullMenu;}{$MenuUnit_hash_ref}[4] }->{$text}} }->{"Result"} 0 0 0
3700 0 $chosen->{'Item_'.$cnt}{Sort}=$sort_ed;
3701 0 $chosen->{'Item_'.$cnt}{Filter}=1;
3702 0 } $sorted=$sort_ed;
3703 } else {
3704 0 @all_menu_items_array=reverse @all_menu_items_array;
3705 0 next;
3706 }
3707 0 %{$SavePick->{$chosen}}=%picks;
3708 0 my @return_from_filtered_menu=();
3709 0 eval {
3710 0 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
3711 $SaveMMap,$SaveNext,$Persists,
3712 @return_from_filtered_menu)=&Menu(
3713 $chosen,$picks_from_parent,
3714 $recurse_level,$FullMenu,
3715 $Selected,$Conveyed,$SavePick,
3716 $SaveMMap,$SaveNext,$Persists,
3717 $MenuUnit_hash_ref,$no_wantarray);
3718 }; # MENU RETURN MENURETURN 2
3719 0 ▶ print "MENU RETURN 2\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
3720 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
3721 0 ▶ if (-1<$#return_from_filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#return_from_filtered_menu) 0 0 0
3722 0 ▶ if ((values %{$menu_output})[0] eq 'recurse') {
Branch: 1 branch
BranchTrueFalseTotal
if ((values %{$menu_output;})[0] eq "recurse") 0 0 0
3723 0 my %k=%{$menu_output};
3724 0 delete $k{Menu};
3725 0 my $lab=(keys %k)[0];
3726 0 $menu_output=$labels{$lab};
3727 }
3728 0 $MenuMap=$Persists->{$MenuUnit_hash_ref};
3729 0 eval {
3730 0 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
3731 $SaveMMap,$SaveNext,$Persists)=&Menu(
3732 $menu_output,$FullMenu,
3733 $Selected,$Conveyed,$SavePick,
3734 $SaveMMap,$SaveNext,$Persists,
3735 $return_from_filtered_menu[0],
3736 $MenuUnit_hash_ref,
3737 $return_from_filtered_menu[2]);
3738 };
3739 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
3740 }
3741 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
3742 0 ▶ if ($menu_output eq '-') {
Branch: 5 branches
BranchTrueFalseTotal
if ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE') { } 0 0 0
elsif ($menu_output) { } 0 0 0
3743 0 %picks=%{$SavePick->{$chosen}};
3744 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
3745 } elsif ($menu_output eq '+') {
3746 0 %picks=%{$SavePick->{$chosen}};
3747 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
3748 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
3749 } elsif ($menu_output eq 'DONE_SUB') {
3750 0 return 'DONE_SUB';
3751 } elsif ($menu_output eq 'DONE') {
3752 0 ▶ if (1==$recurse_level) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse_level) { } 0 0 0
3753 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
3754 .'::' if $Term::Menus::fa_code;
3755 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
3756 0 foreach my $sub (&get_subs_from_menu($Selected)) {
3757 0 my @resu=();
3758 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
3759 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
3760 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
3761 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
3762 defined $Net::FullAuto::FA_Core::makeplan) {
3763 #print "IN MAKEPLAN5\n";
3764 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3765 0 'Plan'}} && !exists
3766 $Net::FullAuto::FA_Core::makeplan->{
3767 'Title'}) {
3768 $Net::FullAuto::FA_Core::makeplan->{'Title'}
3769 0 =$pn{$numbor}[0];
3770 }
3771 push @{$Net::FullAuto::FA_Core::makeplan->{
3772 0 'Plan'}},
3773 { Menu => &pw($MenuUnit_hash_ref),
3774 Number => $numbor,
3775 PlanID =>
3776 $Net::FullAuto::FA_Core::makeplan->{
3777 0 'Number'},
3778 Item =>
3779 &Data::Dump::Streamer::Dump($sub)->Out() }
3780 }
3781 0 eval { @resu=$sub->() };
3782 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
3783 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
3784 eq 'FATAL ERROR') {
3785 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3786 0 return '',$FullMenu,$Selected,$Conveyed,
3787 $SavePick,$SaveMMap,$SaveNext,
3788 $Persists,$parent_menu,$@;
3789 }
3790 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3791 -1<index $log_handle,'*') {
3792 0 print $log_handle $@;
3793 0 close($log_handle);
3794 }
3795 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3796 0 &Net::FullAuto::FA_Core::handle_error($@);
3797 0 } else { die $@ }
3798 } else {
3799 0 my $die="\n FATAL ERROR! - The Local "
3800 ."System $Term::Menus::local_hostname "
3801 ."Conveyed\n"
3802 ." the Following "
3803 ."Unrecoverable Error Condition :\n\n"
3804 ." $@\n line ".__LINE__;
3805 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3806 0 return '',$FullMenu,$Selected,$Conveyed,
3807 $SavePick,$SaveMMap,$SaveNext,
3808 $Persists,$parent_menu,$die;
3809 }
3810 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3811 -1<index $log_handle,'*') {
3812 0 print $log_handle $die;
3813 0 close($log_handle);
3814 }
3815 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3816 0 &Net::FullAuto::FA_Core::handle_error($die);
3817 0 } else { die $die }
3818 }
3819 }
3820 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
3821 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
3822 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3823 0 return @resu;
3824 } else {
3825 0 return return_result($resu[0],
3826 $MenuUnit_hash_ref,$Conveyed);
3827 }
3828 }
3829 0 $done=1;last
3830 0 }
3831 0 eval {
3832 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
3833 0 $sub=~s/^[&]//;
3834 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
3835 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
3836 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
3837 defined $Net::FullAuto::FA_Core::makeplan) {
3838 #print "IN MAKEPLAN6\n";
3839 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
3840 0 'Plan'}} && !exists
3841 $Net::FullAuto::FA_Core::makeplan->{
3842 'Title'}) {
3843 $Net::FullAuto::FA_Core::makeplan->{'Title'}
3844 0 =$pn{$numbor}[0];
3845 }
3846 push @{$Net::FullAuto::FA_Core::makeplan->{
3847 0 'Plan'}},
3848 { Menu => &pw($MenuUnit_hash_ref),
3849 Number => $numbor,
3850 PlanID =>
3851 $Net::FullAuto::FA_Core::makeplan->{
3852 0 'Number'},
3853 Item => "&$subfile$sub" }
3854 }
3855 0 eval "\@resu=\&$subfile$sub";
3856 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
3857 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
3858 (-1<index $firsterr,$sub)) {
3859 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
3860 0 eval "\@resu=main::$sub";
3861 } else {
3862 0 eval "\@resu=$sub";
3863 }
3864 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
3865 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
3866 0 ▶ if ($FullMenu->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if ($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
3867 [2]{$all_menu_items_array[$numbor-1]}) {
3868 $die="The \"Result15 =>\" Setting"
3869 0 ."\n\t\t-> " . ${$FullMenu}
3870 {$MenuUnit_hash_ref}[2]
3871 {$all_menu_items_array[$numbor-1]}
3872 ."\n\t\tFound in the Menu Unit -> "
3873 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
3874 ."Specifies a Subroutine"
3875 ." that Does NOT Exist"
3876 ."\n\t\tin the User Code File "
3877 .$Term::Menus::fa_code
3878 .",\n\t\tnor was a routine with "
3879 ."that name\n\t\tlocated in the"
3880 ." main:: script.\n";
3881 0 } else { $die="$firsterr\n $seconderr" }
3882 0 } else { $die=$seconderr }
3883 0 &Net::FullAuto::FA_Core::handle_error($die);
3884 } elsif ($firsterr) {
3885 0 &Net::FullAuto::FA_Core::handle_error($firsterr);
3886 }
3887 } else {
3888 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
3889 0 $sub=~s/^[&]//;
3890 0 eval "\@resu=main::$sub";
3891 } else {
3892 0 eval "\@resu=$sub";
3893 }
3894 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
3895 }
3896 };
3897 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
3898 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
3899 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3900 0 return '',$FullMenu,$Selected,$Conveyed,
3901 $SavePick,$SaveMMap,$SaveNext,
3902 $Persists,$parent_menu,$@;
3903 }
3904 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3905 -1<index $log_handle,'*') {
3906 0 print $log_handle $@;
3907 0 close($log_handle);
3908 }
3909 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3910 0 &Net::FullAuto::FA_Core::handle_error($@);
3911 0 } else { die $@ }
3912 } else {
3913 0 my $die="\n FATAL ERROR! - The Local "
3914 ."System $Term::Menus::local_hostname "
3915 ."Conveyed\n"
3916 ." the Following "
3917 ."Unrecoverable Error Condition :\n\n"
3918 ." $@\n line ".__LINE__;
3919 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3920 0 return '',$FullMenu,$Selected,$Conveyed,
3921 $SavePick,$SaveMMap,$SaveNext,
3922 $Persists,$parent_menu,$die;
3923 }
3924 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
3925 -1<index $log_handle,'*') {
3926 0 print $log_handle $die;
3927 0 close($log_handle);
3928 }
3929 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
3930 0 &Net::FullAuto::FA_Core::handle_error($die);
3931 0 } else { die $die }
3932 }
3933 }
3934 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
3935 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
3936 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
3937 0 return @resu;
3938 } else {
3939 0 return return_result($resu[0],
3940 $MenuUnit_hash_ref,$Conveyed);
3941 }
3942 }
3943 }
3944 0 return 'DONE_SUB';
3945 0 } else { return 'DONE' }
3946 } elsif ($menu_output) {
3947 0 return $menu_output;
3948 } else {
3949 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
3950 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
3951 }
3952 } elsif ($numbor=~/^\*\s*$/s) {
3953 # SHOW DEFAULT SELECTIONS using STAR symbol
3954 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
3955 0 print "\n WARNING!: Only -ONE- Level of Filtering",
3956 " is Supported!\n";
3957 0 sleep 2;
3958 0 last;
3959 }
3960 0 my @splice=();
3961 0 my @spl=();
3962 0 foreach my $key (keys %{$SavePick->{$parent_menu}}) {
3963 0 $picks{$key}='*';
3964 }
3965 0 ▶ $SavePick->{$MenuUnit_hash_ref}||={};
Condition0%0/2
$SavePick->{$MenuUnit_hash_ref} ||= {}
l!l
00
MC/DC0%0/1
$SavePick->{$MenuUnit_hash_ref} ||= {}
$SavePick->{$MenuUnit_hash_ref}
Truth table0%0/2
A
A= $SavePick->{$MenuUnit_hash_ref}
Aresult
11
00
3966 0 foreach my $key (keys %picks) {
3967 0 ▶ if ($parent_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu) { } 0 0 0
3968 0 $SavePick->{$parent_menu}->{$key}='*';
3969 } else {
3970 0 $SavePick->{$MenuUnit_hash_ref}->{$key}='*';
3971 }
3972 }
3973 0 ▶ if ($Persists->{$MenuUnit_hash_ref}{defaults}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Persists->{$MenuUnit_hash_ref}{"defaults"}) 0 0 0
3974 0 my $it=${[keys %{$FullMenu->{$MenuUnit_hash_ref}[5]}]}[0];
3975 0 my $def=$FullMenu->{$MenuUnit_hash_ref}[5]{$it};
3976 0 ▶ $def='.*' if $def eq '*';
Branch: 1 branch
BranchTrueFalseTotal
if $def eq "*" 0 0 0
3977 0 ▶ if ($def) {
Branch: 1 branch
BranchTrueFalseTotal
if ($def) 0 0 0
3978 0 my $cnt=1;
3979 0 foreach my $item (@all_menu_items_array) {
3980 0 ▶ if ($item=~/$def/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($item =~ /$def/) 0 0 0
3981 0 $picks{$cnt}='*';
3982 0 } $cnt++
3983 }
3984 }
3985 }
3986 0 foreach my $pick (sort numerically keys %picks) {
3987 0 push @splice,($pick-1)
3988 }
3989 0 foreach my $spl (@splice) {
3990 0 push @spl, $FullMenu->{$MenuUnit_hash_ref}[10]->[$spl];
3991 }
3992 0 ▶ my $send_select='Many' if $select_many;
Branch: 1 branch
BranchTrueFalseTotal
if $select_many 0 0 0
3993 my $chosen={
3994 Select => $send_select,
3995 Banner => $MenuUnit_hash_ref->{Banner},
3996 0 }; my $cnt=0;
3997 0 ▶ my $hash_ref=$parent_menu||$MenuUnit_hash_ref;
Condition0%0/3
$parent_menu || $MenuUnit_hash_ref
l!l&&r!l&&!r
000
MC/DC0%0/2
$parent_menu || $MenuUnit_hash_ref
$parent_menu $MenuUnit_hash_ref
Truth table0%0/3
A || B
A= $parent_menuB= $MenuUnit_hash_ref
ABresult
1X1
011
000
3998 0 foreach my $text (@spl) {
3999 0 my $num=shift @splice;
4000 0 $cnt++;
4001 0 $chosen->{'Item_'.$cnt}=
4002 { Text => $text,Default => '*',__NUM__=>$num+1 };
4003 $chosen->{'Item_'.$cnt}{Result}=
4004 0 ${${$MenuUnit_hash_ref}{${${$FullMenu}
4005 0 {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'}
4006 0 if exists ${${$MenuUnit_hash_ref}{${${$FullMenu}
4007 0 ▶ {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'};
Branch: 1 branch
BranchTrueFalseTotal
if exists do { ${$MenuUnit_hash_ref;}{do { ${$FullMenu;}{$MenuUnit_hash_ref}[4] }->{$text}} }->{"Result"} 0 0 0
4008 0 $chosen->{'Item_'.$cnt}{Filter}=1;
4009 }
4010 0 %{$SavePick->{$chosen}}=%picks;
4011 0 $hidedefaults=1;
4012 0 eval {
4013 0 my ($ignore1,$ignore2,$ignore3)=('','','');
4014 0 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
4015 $SaveMMap,$SaveNext,$Persists,$ignore1,$ignore2,
4016 $ignore3)
4017 =&Menu($chosen,$picks_from_parent,
4018 $recurse_level,$FullMenu,
4019 $Selected,$Conveyed,$SavePick,
4020 $SaveMMap,$SaveNext,$Persists,
4021 $MenuUnit_hash_ref,$no_wantarray);
4022 }; # MENU RETURN MENURETURN 3
4023 0 ▶ print "MENU RETURN 3\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
4024 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4025 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
4026 0 ▶ if ($menu_output eq '-') {
Branch: 5 branches
BranchTrueFalseTotal
if ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE') { } 0 0 0
elsif ($menu_output) { } 0 0 0
4027 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
4028 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
4029 } elsif ($menu_output eq '+') {
4030 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
4031 0 $start=${$FullMenu}{$MenuUnit_hash_ref}[11];
4032 } elsif ($menu_output eq 'DONE_SUB') {
4033 0 return 'DONE_SUB';
4034 } elsif ($menu_output eq 'DONE') {
4035 0 ▶ if (1==$recurse_level) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse_level) { } 0 0 0
4036 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
4037 .'::' if $Term::Menus::fa_code;
4038 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
4039 0 foreach my $sub (&get_subs_from_menu($Selected)) {
4040 0 my @resu=();
4041 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
4042 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4043 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
4044 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
4045 defined $Net::FullAuto::FA_Core::makeplan) {
4046 #print "IN MAKEPLAN7\n";
4047 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4048 0 'Plan'}} && !exists
4049 $Net::FullAuto::FA_Core::makeplan->{
4050 'Title'}) {
4051 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4052 0 =$pn{$numbor}[0];
4053 }
4054 0 my $n='Number';
4055 push @{$Net::FullAuto::FA_Core::makeplan->{
4056 0 'Plan'}},
4057 { Menu => &pw($MenuUnit_hash_ref),
4058 Number => $numbor,
4059 PlanID =>
4060 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4061 Item =>
4062 &Data::Dump::Streamer::Dump($sub)->Out() }
4063 }
4064 0 eval { @resu=$sub->() };
4065 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4066 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4067 eq 'FATAL ERROR') {
4068 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4069 0 return '',$FullMenu,$Selected,$Conveyed,
4070 $SavePick,$SaveMMap,$SaveNext,
4071 $Persists,$parent_menu,$@;
4072 }
4073 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4074 -1<index $log_handle,'*') {
4075 0 print $log_handle $@;
4076 0 close($log_handle);
4077 }
4078 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4079 0 &Net::FullAuto::FA_Core::handle_error($@);
4080 0 } else { die $@ }
4081 } else {
4082 0 my $die="\n FATAL ERROR! - The Local "
4083 ."System $Term::Menus::local_hostname "
4084 ."Conveyed\n"
4085 ." the Following "
4086 ."Unrecoverable Error Condition :\n\n"
4087 ." $@\n line ".__LINE__;
4088 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4089 0 return '',$FullMenu,$Selected,$Conveyed,
4090 $SavePick,$SaveMMap,$SaveNext,
4091 $Persists,$parent_menu,$die;
4092 }
4093 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4094 -1<index $log_handle,'*') {
4095 0 print $log_handle $die;
4096 0 close($log_handle);
4097 }
4098 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4099 0 &Net::FullAuto::FA_Core::handle_error($die);
4100 0 } else { die $die }
4101 }
4102 }
4103 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4104 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4105 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4106 0 return @resu;
4107 } else {
4108 0 return return_result($resu[0],
4109 $MenuUnit_hash_ref,$Conveyed);
4110 }
4111 }
4112 0 $done=1;last
4113 0 }
4114 0 eval {
4115 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
4116 0 $sub=~s/^[&]//;
4117 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4118 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
4119 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
4120 defined $Net::FullAuto::FA_Core::makeplan) {
4121 #print "IN MAKEPLAN8\n";
4122 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4123 0 'Plan'}} && !exists
4124 $Net::FullAuto::FA_Core::makeplan->{
4125 'Title'}) {
4126 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4127 0 =$pn{$numbor}[0];
4128 }
4129 0 my $n='Number';
4130 push @{$Net::FullAuto::FA_Core::makeplan->{
4131 0 'Plan'}},
4132 { Menu => &pw($MenuUnit_hash_ref),
4133 Number => $numbor,
4134 PlanID =>
4135 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4136 Item => "&$subfile$sub" }
4137 }
4138 0 eval "\@resu=\&$subfile$sub";
4139 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4140 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
4141 (-1<index $firsterr,$sub)) {
4142 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4143 0 eval "\@resu=main::$sub";
4144 } else {
4145 0 eval "\@resu=$sub";
4146 }
4147 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4148 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
4149 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
4150 [2]{$all_menu_items_array[$numbor-1]}) {
4151 $die="The \"Result15 =>\" Setting"
4152 0 ."\n\t\t-> " . ${$FullMenu}
4153 {$MenuUnit_hash_ref}[2]
4154 {$all_menu_items_array[$numbor-1]}
4155 ."\n\t\tFound in the Menu Unit -> "
4156 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
4157 ."Specifies a Subroutine"
4158 ." that Does NOT Exist"
4159 ."\n\t\tin the User Code File "
4160 .$Term::Menus::fa_code
4161 .",\n\t\tnor was a routine with "
4162 ."that name\n\t\tlocated in the"
4163 ." main:: script.\n";
4164 0 } else { $die="$firsterr\n $seconderr" }
4165 0 } else { $die=$seconderr }
4166 0 &Net::FullAuto::FA_Core::handle_error($die);
4167 } elsif ($firsterr) {
4168 0 &Net::FullAuto::FA_Core::handle_error($firsterr);
4169 }
4170 } else {
4171 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4172 0 $sub=~s/^[&]//;
4173 0 eval "\@resu=main::$sub";
4174 } else {
4175 0 eval "\@resu=$sub";
4176 }
4177 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4178 }
4179 };
4180 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4181 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4182 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4183 0 return '',$FullMenu,$Selected,$Conveyed,
4184 $SavePick,$SaveMMap,$SaveNext,
4185 $Persists,$parent_menu,$@;
4186 }
4187 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4188 -1<index $log_handle,'*') {
4189 0 print $log_handle $@;
4190 0 close($log_handle);
4191 }
4192 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4193 0 &Net::FullAuto::FA_Core::handle_error($@);
4194 0 } else { die $@ }
4195 } else {
4196 0 my $die="\n FATAL ERROR! - The Local "
4197 ."System $Term::Menus::local_hostname "
4198 ."Conveyed\n"
4199 ." the Following "
4200 ."Unrecoverable Error Condition :\n\n"
4201 ." $@\n line ".__LINE__;
4202 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4203 0 return '',$FullMenu,$Selected,$Conveyed,
4204 $SavePick,$SaveMMap,$SaveNext,
4205 $Persists,$parent_menu,$die;
4206 }
4207 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4208 -1<index $log_handle,'*') {
4209 0 print $log_handle $die;
4210 0 close($log_handle);
4211 }
4212 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4213 0 &Net::FullAuto::FA_Core::handle_error($die);
4214 0 } else { die $die }
4215 }
4216 }
4217 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4218 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4219 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4220 0 return @resu;
4221 } else {
4222 0 return return_result($resu[0],
4223 $MenuUnit_hash_ref,$Conveyed);
4224 }
4225 }
4226 }
4227 0 return 'DONE_SUB';
4228 0 } else { return 'DONE' }
4229 } elsif ($menu_output) {
4230 0 return $menu_output;
4231 } else {
4232 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
4233 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
4234 }
4235 } elsif ($numbor=~/^\s*\/(.+)$/s) {
4236 ## SLASH SEARCH
4237 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
4238 0 print "\n WARNING!: ",
4239 "Only -ONE- Level of Search is Supported!\n";
4240 0 sleep 2;
4241 0 last;
4242 }
4243 0 ▶ my $one=$1||'';
Condition0%0/2
$1 || ''
l!l
00
MC/DC0%0/1
$1 || ''
$1
Truth table0%0/2
A
A= $1
Aresult
11
00
4244 0 chomp $one;
4245 0 $one=~s/\*/[\*]/g;
4246 0 $one=~s/\+/[\+]/g;
4247 0 ▶ $one=qr/$one/ if $one;
Branch: 1 branch
BranchTrueFalseTotal
if $one 0 0 0
4248 0 my @spl=();
4249 0 chomp $numbor;
4250 0 my $def='';
4251 0 ▶ unless (exists $Persists->{$MenuUnit_hash_ref}{defaults}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $Persists->{$MenuUnit_hash_ref}{"defaults"}) 0 0 0
4252 0 my $it=${[keys %{${$FullMenu}{$MenuUnit_hash_ref}[5]}]}[0];
4253 0 $def=${$FullMenu}{$MenuUnit_hash_ref}[5]{$it};
4254 0 ▶ $def='.*' if $def eq '*';
Branch: 1 branch
BranchTrueFalseTotal
if $def eq "*" 0 0 0
4255 0 ▶ if ($def) {
Branch: 1 branch
BranchTrueFalseTotal
if ($def) 0 0 0
4256 0 my $cnt=1;
4257 0 foreach my $item (sort
4258 0 @{[keys %{${$FullMenu}{$MenuUnit_hash_ref}[5]}]}) {
4259 0 ▶ if ($item=~/$def/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($item =~ /$def/) 0 0 0
4260 0 $picks{$cnt}='*';
4261 0 } $cnt++
4262 }
4263 }
4264 }
4265
4266 0 my $cnt=0;my $ct=0;my @splice=();
4267 0 foreach my $pik (@all_menu_items_array) {
4268 0 $cnt++;
4269 0 ▶ if ($pik=~/$one/s) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pik =~ /$one/s) 0 0 0
4270 0 push @spl, $pik;
4271 0 $splice[$ct++]=$cnt;
4272 }
4273 }
4274 0 ▶ next if $#spl==-1;
Branch: 1 branch
BranchTrueFalseTotal
if $#spl == -1 0 0 0
4275 0 ▶ my $send_select='Many' if $select_many;
Branch: 1 branch
BranchTrueFalseTotal
if $select_many 0 0 0
4276 my $chosen={
4277 Select => $send_select,
4278 0 Banner => ${$MenuUnit_hash_ref}{Banner},
4279 0 }; $cnt=0;
4280 0 foreach my $text (@spl) {
4281 0 my $num=$splice[$cnt];
4282 0 $cnt++;
4283 0 ▶ if (exists $picks{$num}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $picks{$num}) { } 0 0 0
elsif ($def and $text =~ /$def/) { } 0 0 0
4284 0 $chosen->{'Item_'.$cnt}=
4285 { Text => $text,Default => '*',__NUM__=>$num };
4286 ▶ } elsif ($def && $text=~/$def/) {
Condition0%0/3
$def and $text =~ /$def/
!ll&&!rl&&r
000
MC/DC0%0/2
$def and $text =~ /$def/
$def $text =~ /$def/
Truth table0%0/3
A and B
A= $defB= $text =~ /$def/
ABresult
0X0
100
111
4287 0 $chosen->{'Item_'.$cnt}=
4288 { Text => $text,Default => '*',__NUM__=>$num };
4289 0 $picks{$num}='*';
4290 } else {
4291 0 $chosen->{'Item_'.$cnt}=
4292 { Text => $text,__NUM__=>$num };
4293 }
4294 $chosen->{'Item_'.$cnt}{Result}=
4295 0 ${${$MenuUnit_hash_ref}{${$FullMenu->
4296 0 {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'}
4297 0 if exists ${${$MenuUnit_hash_ref}{${$FullMenu->
4298 0 ▶ {$MenuUnit_hash_ref}[4]}{$text}}}{'Result'};
Branch: 1 branch
BranchTrueFalseTotal
if exists do { ${$MenuUnit_hash_ref;}{do { $$FullMenu{$MenuUnit_hash_ref}[4] }->{$text}} }->{"Result"} 0 0 0
4299 0 $chosen->{'Item_'.$cnt}{Filter}=1;
4300 }
4301 0 %{$SavePick->{$chosen}}=%picks;
4302 0 my @return_from_filtered_menu=();
4303 0 eval {
4304 0 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
4305 $SaveMMap,$SaveNext,$Persists,
4306 @return_from_filtered_menu)=&Menu(
4307 $chosen,$picks_from_parent,
4308 $recurse_level,$FullMenu,
4309 $Selected,$Conveyed,$SavePick,
4310 $SaveMMap,$SaveNext,$Persists,
4311 $MenuUnit_hash_ref,$no_wantarray);
4312 }; # MENU RETURN MENURETURN 4
4313 0 ▶ print "MENU RETURN 4\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
4314 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4315 0 ▶ if (-1<$#return_from_filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#return_from_filtered_menu) 0 0 0
4316 0 ▶ if ((values %{$menu_output})[0] eq 'recurse') {
Branch: 1 branch
BranchTrueFalseTotal
if ((values %{$menu_output;})[0] eq "recurse") 0 0 0
4317 0 my %k=%{$menu_output};
4318 0 delete $k{Menu};
4319 0 my $lab=(keys %k)[0];
4320 0 $menu_output=$labels{$lab};
4321 }
4322 0 $MenuMap=$Persists->{$MenuUnit_hash_ref};
4323 0 eval {
4324 0 ($menu_output,$FullMenu,$Selected,$Conveyed,$SavePick,
4325 $SaveMMap,$SaveNext,$Persists)=&Menu(
4326 $menu_output,$FullMenu,
4327 $Selected,$Conveyed,$SavePick,
4328 $SaveMMap,$SaveNext,$Persists,
4329 $return_from_filtered_menu[0],
4330 $MenuUnit_hash_ref,
4331 $return_from_filtered_menu[2]);
4332 }; # MENU RETURN MENURETURN 5
4333 0 ▶ print "MENU RETURN 5\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
4334 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4335 }
4336 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
4337 0 ▶ if (($menu_output eq '-') && exists
Branch: 7 branches
BranchTrueFalseTotal
if ($menu_output eq '-' and exists $SavePick->{$MenuUnit_hash_ref}) { } 0 0 0
elsif ($menu_output eq '+' and exists $SavePick->{$MenuUnit_hash_ref}) { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE') { } 0 0 0
elsif ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output) { } 0 0 0
Condition0%0/3
$menu_output eq "-" and exists $SavePick->{$MenuUnit_hash_ref}
!ll&&!rl&&r
000
MC/DC0%0/2
$menu_output eq "-" and exists $SavePick->{$MenuUnit_hash_ref}
$menu_output eq "-" exists $SavePick->{$MenuUnit_hash_ref}
Truth table0%0/3
A and B
A= $menu_output eq "-"B= exists $SavePick->{$MenuUnit_hash_ref}
ABresult
0X0
100
111
4338 $SavePick->{$MenuUnit_hash_ref}) {
4339 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
4340 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
4341 ▶ } elsif ($menu_output eq '+' && exists
Condition0%0/3
$menu_output eq "+" and exists $SavePick->{$MenuUnit_hash_ref}
!ll&&!rl&&r
000
MC/DC0%0/2
$menu_output eq "+" and exists $SavePick->{$MenuUnit_hash_ref}
$menu_output eq "+" exists $SavePick->{$MenuUnit_hash_ref}
Truth table0%0/3
A and B
A= $menu_output eq "+"B= exists $SavePick->{$MenuUnit_hash_ref}
ABresult
0X0
100
111
4342 $SavePick->{$MenuUnit_hash_ref}) {
4343 0 %picks=%{$SavePick->{$MenuUnit_hash_ref}};
4344 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11];
4345 } elsif ($menu_output eq 'DONE_SUB') {
4346 0 return 'DONE_SUB';
4347 } elsif ($menu_output eq 'DONE') {
4348 0 ▶ if (1==$recurse_level) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse_level) { } 0 0 0
4349 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
4350 .'::' if $Term::Menus::fa_code;
4351 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
4352 0 foreach my $sub (&get_subs_from_menu($Selected)) {
4353 0 my @resu=();
4354 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
4355 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4356 $MenuUnit_hash_ref->{'NoPlan'} ||
4357 !$MenuUnit_hash_ref->{'NoPlan'}) &&
4358 defined $Net::FullAuto::FA_Core::makeplan) {
4359 #print "IN MAKEPLAN9\n";
4360 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4361 0 'Plan'}} && !exists
4362 $Net::FullAuto::FA_Core::makeplan->{
4363 'Title'}) {
4364 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4365 0 =$pn{$numbor}[0];
4366 }
4367 0 my $n='Number';
4368 push @{$Net::FullAuto::FA_Core::makeplan->{
4369 0 'Plan'}},
4370 { Menu => &pw($MenuUnit_hash_ref),
4371 Number => $numbor,
4372 PlanID =>
4373 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4374 Item =>
4375 &Data::Dump::Streamer::Dump($sub)->Out() }
4376 }
4377 0 eval { @resu=$sub->() };
4378 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4379 0 ▶ if (10<length $@ && unpack('a11',$@) eq
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4380 'FATAL ERROR') {
4381 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4382 0 return '',$FullMenu,$Selected,$Conveyed,
4383 $SavePick,$SaveMMap,$SaveNext,
4384 $Persists,$parent_menu,$@;
4385 }
4386 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4387 -1<index $log_handle,'*') {
4388 0 print $log_handle $@;
4389 0 close($log_handle);
4390 }
4391 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4392 0 &Net::FullAuto::FA_Core::handle_error($@);
4393 0 } else { die $@ }
4394 } else {
4395 0 my $die="\n FATAL ERROR! - The Local "
4396 ."System $Term::Menus::local_hostname "
4397 ."Conveyed\n"
4398 ." the Following "
4399 ."Unrecoverable Error Condition :\n\n"
4400 ." $@\n line ".__LINE__;
4401 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4402 0 return '',$FullMenu,$Selected,$Conveyed,
4403 $SavePick,$SaveMMap,$SaveNext,
4404 $Persists,$parent_menu,$die;
4405 }
4406 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4407 -1<index $log_handle,'*') {
4408 0 print $log_handle $die;
4409 0 close($log_handle);
4410 }
4411 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4412 0 &Net::FullAuto::FA_Core::handle_error($die);
4413 0 } else { die $die }
4414 }
4415 }
4416 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4417 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4418 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4419 0 return @resu;
4420 } else {
4421 0 return return_result($resu[0],
4422 $MenuUnit_hash_ref,$Conveyed);
4423 }
4424 }
4425 0 $done=1;last
4426 0 }
4427 0 eval {
4428 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
4429 0 $sub=~s/^[&]//;
4430 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4431 $MenuUnit_hash_ref->{'NoPlan'} ||
4432 !$MenuUnit_hash_ref->{'NoPlan'}) &&
4433 defined $Net::FullAuto::FA_Core::makeplan) {
4434 #print "IN MAKEPLAN10\n";
4435 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4436 0 'Plan'}} && !exists
4437 $Net::FullAuto::FA_Core::makeplan->{
4438 'Title'}) {
4439 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4440 0 =$pn{$numbor}[0];
4441 }
4442 0 my $n='Number';
4443 push @{$Net::FullAuto::FA_Core::makeplan->{
4444 0 'Plan'}},
4445 { Menu => &pw($MenuUnit_hash_ref),
4446 Number => $numbor,
4447 PlanID =>
4448 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4449 Item => "&$subfile$sub" }
4450 }
4451 0 eval "\@resu=\&$subfile$sub";
4452 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4453 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
4454 (-1<index $firsterr,$sub)) {
4455 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4456 0 eval "\@resu=main::$sub";
4457 } else {
4458 0 eval "\@resu=$sub";
4459 }
4460 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4461 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
4462 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
4463 [2]{$all_menu_items_array[$numbor-1]}) {
4464 $die="The \"Result15 =>\" Setting"
4465 0 ."\n\t\t-> " . ${$FullMenu}
4466 {$MenuUnit_hash_ref}[2]
4467 {$all_menu_items_array[$numbor-1]}
4468 ."\n\t\tFound in the Menu Unit -> "
4469 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
4470 ."Specifies a Subroutine"
4471 ." that Does NOT Exist"
4472 ."\n\t\tin the User Code File "
4473 .$Term::Menus::fa_code
4474 .",\n\t\tnor was a routine with "
4475 ."that name\n\t\tlocated in the"
4476 ." main:: script.\n";
4477 0 } else { $die="$firsterr\n $seconderr" }
4478 0 } else { $die=$seconderr }
4479 0 &Net::FullAuto::FA_Core::handle_error($die);
4480 } elsif ($firsterr) {
4481 0 &Net::FullAuto::FA_Core::handle_error($firsterr);
4482 }
4483 } else {
4484 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4485 0 $sub=~s/^[&]//;
4486 0 eval "\@resu=main::$sub";
4487 } else {
4488 0 eval "\@resu=$sub";
4489 }
4490 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4491 }
4492 };
4493 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4494 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4495 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4496 0 return '',$FullMenu,$Selected,$Conveyed,
4497 $SavePick,$SaveMMap,$SaveNext,
4498 $Persists,$parent_menu,$@;
4499 }
4500 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4501 -1<index $log_handle,'*') {
4502 0 print $log_handle $@;
4503 0 close($log_handle);
4504 }
4505 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4506 0 &Net::FullAuto::FA_Core::handle_error($@);
4507 0 } else { die $@ }
4508 } else {
4509 0 my $die="\n FATAL ERROR! - The Local "
4510 ."System $Term::Menus::local_hostname "
4511 ."Conveyed\n"
4512 ." the Following "
4513 ."Unrecoverable Error Condition :\n\n"
4514 ." $@\n line ".__LINE__;
4515 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4516 0 return '',$FullMenu,$Selected,$Conveyed,
4517 $SavePick,$SaveMMap,$SaveNext,
4518 $Persists,$parent_menu,$die;
4519 }
4520 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4521 -1<index $log_handle,'*') {
4522 0 print $log_handle $die;
4523 0 close($log_handle);
4524 }
4525 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4526 0 &Net::FullAuto::FA_Core::handle_error($die);
4527 0 } else { die $die }
4528 }
4529 }
4530 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4531 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4532 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4533 0 return @resu;
4534 } else {
4535 0 return return_result($resu[0],
4536 $MenuUnit_hash_ref,$Conveyed);
4537 }
4538 }
4539 }
4540 0 return 'DONE_SUB';
4541 0 } else { return 'DONE' }
4542 } elsif ($menu_output eq '-') {
4543 0 $return_from_child_menu='-';
4544 } elsif ($menu_output eq '+') {
4545 0 $return_from_child_menu='+';
4546 } elsif ($menu_output) {
4547 0 return $menu_output;
4548 }
4549 ▶ } elsif (($numbor=~/^\</ || $ikey eq 'LEFTARROW') && $FullMenu) {
Condition0%0/6
$numbor =~ /^\</ || $ikey eq "LEFTARROW" and $FullMenu
!ll&&!rl&&r
000
$numbor =~ /^\</ or $ikey eq "LEFTARROW"
l!l&&r!l&&!r
000
MC/DC0%0/3
$numbor =~ /^\</ || $ikey eq "LEFTARROW" and $FullMenu
$numbor =~ /^\</ $ikey eq "LEFTARROW" $FullMenu
Truth table0%0/5
A or B and C
A= $numbor =~ /^\</B= $ikey eq "LEFTARROW"C= $FullMenu
ABCresult
00X0
1X00
0100
1X11
0111
4550 0 ▶ if ($recurse_level==1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($recurse_level == 1) { } 0 0 0
elsif (grep {/\+|\*/;} values %picks) { } 0 0 0
4551 0 print "\n WARNING! - You are at the First Menu!\n";
4552 0 sleep 2;
4553 0 } elsif (grep { /\+|\*/ } values %picks) {
4554 0 return '+',
4555 $FullMenu,$Selected,$Conveyed,
4556 $SavePick,$SaveMMap,$SaveNext,
4557 $Persists;
4558 } else {
4559 0 my %sp_copy=%{$SavePick->{$parent_menu}}
4560 0 ▶ if exists $SavePick->{$parent_menu};
Branch: 1 branch
BranchTrueFalseTotal
if exists $SavePick->{$parent_menu} 0 0 0
4561 0 foreach my $key (keys %sp_copy) {
4562 $SavePick->{$parent_menu}->{$key}='-' if
4563 0 ▶ $sp_copy{$key} eq '+';
Branch: 1 branch
BranchTrueFalseTotal
if $sp_copy{$key} eq "+" 0 0 0
4564 }
4565 0 ▶ $parent_menu->{Scroll}->[1]||=0;
Condition0%0/2
$parent_menu->{"Scroll"}[1] ||= 0
l!l
00
MC/DC0%0/1
$parent_menu->{"Scroll"}[1] ||= 0
$parent_menu->{"Scroll"}[1]
Truth table0%0/2
A
A= $parent_menu->{"Scroll"}[1]
Aresult
11
00
4566 0 ▶ $main::maintain_scroll_flag||={};
Condition0%0/2
$main::maintain_scroll_flag ||= {}
l!l
00
MC/DC0%0/1
$main::maintain_scroll_flag ||= {}
$main::maintain_scroll_flag
Truth table0%0/2
A
A= $main::maintain_scroll_flag
Aresult
11
00
4567 0 ▶ if ($parent_menu->{Scroll}->[1]>1 &&
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu->{"Scroll"}[1] > 1 and not exists $main::maintain_scroll_flag->{$parent_menu}) 0 0 0
Condition0%0/3
$parent_menu->{"Scroll"}[1] > 1 and not exists $main::maintain_scroll_flag->{$parent_menu}
!ll&&!rl&&r
000
MC/DC0%0/2
$parent_menu->{"Scroll"}[1] > 1 and not exists $main::maintain_scroll_flag->{$parent_menu}
$parent_menu->{"Scroll"}[1] > 1 not exists $main::maintain_scroll_flag->{$parent_menu}
Truth table0%0/3
A and not(B)
A= $parent_menu->{"Scroll"}[1] > 1B= not exists $main::maintain_scroll_flag->{$parent_menu}
ABresult
0X0
100
111
4568 !exists $main::maintain_scroll_flag->{$parent_menu}) {
4569 0 --$parent_menu->{Scroll}->[1];
4570 0 $main::maintain_scroll_flag->{$parent_menu}='';
4571 }
4572 0 return '-',
4573 $FullMenu,$Selected,$Conveyed,
4574 $SavePick,$SaveMMap,$SaveNext,
4575 $Persists;
4576 0 } last;
4577 ▶ } elsif (($numbor=~/^\>/ || $ikey eq 'RIGHTARROW') && exists
Condition0%0/12
$numbor =~ /^\>/ || $ikey eq "RIGHTARROW" and exists $SaveNext->{$MenuUnit_hash_ref} and grep({/-|\+/;} values %picks) || $show_banner_only
!ll&&!rl&&r
000
$numbor =~ /^\>/ || $ikey eq "RIGHTARROW" and exists $SaveNext->{$MenuUnit_hash_ref}
!ll&&!rl&&r
000
$numbor =~ /^\>/ or $ikey eq "RIGHTARROW"
l!l&&r!l&&!r
000
grep {/-|\+/;} values %picks or $show_banner_only
l!l&&r!l&&!r
000
MC/DC0%0/5
$numbor =~ /^\>/ || $ikey eq "RIGHTARROW" and exists $SaveNext->{$MenuUnit_hash_ref} and grep({/-|\+/;} values %picks) || $show_banner_only
$numbor =~ /^\>/ $ikey eq "RIGHTARROW" exists $SaveNext->{$MenuUnit_hash_ref} grep {/-|\+/;} values %picks $show_banner_only
Truth table0%0/9
A or B and C and D or E
A= $numbor =~ /^\>/B= $ikey eq "RIGHTARROW"C= exists $SaveNext->{$MenuUnit_hash_ref}D= grep {/-|\+/;} values %picksE= $show_banner_only
ABCDEresult
00XXX0
1X0XX0
010XX0
1X1000
011000
1X11X1
1X1011
0111X1
011011
4578 $SaveNext->{$MenuUnit_hash_ref} &&
4579 0 ((grep { /-|\+/ } values %picks) || $show_banner_only)) {
4580 0 $MenuMap=$SaveMMap->{$MenuUnit_hash_ref};
4581 0 my $returned_FullMenu='';
4582 0 my $returned_Selected='';
4583 0 my $returned_Conveyed='';
4584 0 my $returned_SavePick='';
4585 0 my $returned_SaveMMap='';
4586 0 my $returned_SaveNext='';
4587 0 my $returned_Persists='';
4588 0 my $menu_result='';
4589 0 ▶ if (exists $Selected->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Selected->{$MenuUnit_hash_ref}{'__FA_Banner__'}) { } 0 0 0
4590 {'__FA_Banner__'}) {
4591 $menu_result=$Selected->{$MenuUnit_hash_ref}
4592 0 {'__FA_Banner__'};
4593 0 ▶ $menu_result=$menu_result->() if ref
Branch: 1 branch
BranchTrueFalseTotal
if ref $menu_result eq "CODE" 0 0 0
4594 $menu_result eq 'CODE';
4595 } else {
4596 $menu_result=$FullMenu->{$MenuUnit_hash_ref}[2]
4597 0 {$all_menu_items_array[(keys %{$SavePick->
4598 0 {$MenuUnit_hash_ref}})[0]-1]};
4599 }
4600 0 eval {
4601 0 ($menu_output,$returned_FullMenu,
4602 $returned_Selected,$returned_Conveyed,
4603 $returned_SavePick,$returned_SaveMMap,
4604 $returned_SaveNext,$returned_Persists)
4605 =&Menu($menu_result,$convey,
4606 $recurse_level,$FullMenu,
4607 $Selected,$Conveyed,$SavePick,
4608 $SaveMMap,$SaveNext,$Persists,
4609 $MenuUnit_hash_ref,$no_wantarray);
4610 }; # MENU RETURN MENURETURN 6
4611 0 ▶ print "MENU RETURN 6\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
4612 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4613 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
4614 0 ▶ if (ref $menu_output eq 'ARRAY' &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref $menu_output eq 'ARRAY' and $menu_output->[0] =~ /^[{](.*)[}][<]$/) { } 0 0 0
Condition0%0/3
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{](.*)[}][<]$/
!ll&&!rl&&r
000
MC/DC0%0/2
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{](.*)[}][<]$/
ref $menu_output eq "ARRAY" $menu_output->[0] =~ /^[{](.*)[}][<]$/
Truth table0%0/3
A and B
A= ref $menu_output eq "ARRAY"B= $menu_output->[0] =~ /^[{](.*)[}][<]$/
ABresult
0X0
100
111
4615 $menu_output->[0]=~/^[{](.*)[}][<]$/) {
4616 0 delete $Selected->{$MenuUnit_hash_ref};
4617 0 delete $Conveyed->{$MenuUnit_hash_ref};
4618 0 delete $SavePick->{$MenuUnit_hash_ref};
4619 0 delete $SaveMMap->{$MenuUnit_hash_ref};
4620 0 delete $SaveNext->{$MenuUnit_hash_ref};
4621 0 delete $Persists->{$MenuUnit_hash_ref};
4622 0 ▶ if ($1 eq $MenuUnit_hash_ref->{Name}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($1 eq $MenuUnit_hash_ref->{'Name'}) { } 0 0 0
4623 delete $FullMenu->{$MenuUnit_hash_ref}[2]
4624 0 {'__FA_Banner__'};
4625 0 %picks=();
4626 0 next;
4627 } else {
4628 0 delete $FullMenu->{$MenuUnit_hash_ref};
4629 0 return $menu_output,
4630 $FullMenu,$Selected,$Conveyed,
4631 $SavePick,$SaveMMap,$SaveNext,
4632 $Persists;
4633 }
4634 } else {
4635 0 $FullMenu=$returned_FullMenu;
4636 0 $Selected=$returned_Selected;
4637 0 $Conveyed=$returned_Conveyed;
4638 0 $SavePick=$returned_SavePick;
4639 0 $SaveMMap=$returned_SaveMMap;
4640 0 $SaveNext=$returned_SaveNext;
4641 0 $Persists=$returned_Persists;
4642 }
4643 0 ▶ if ($menu_output eq 'DONE_SUB') {
Branch: 5 branches
BranchTrueFalseTotal
if ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE') { } 0 0 0
elsif ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output) { } 0 0 0
4644 0 return 'DONE_SUB';
4645 } elsif ($menu_output eq 'DONE') {
4646 0 ▶ if (1==$recurse_level) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == $recurse_level) { } 0 0 0
4647 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4648 $MenuUnit_hash_ref->{'NoPlan'} ||
4649 !$MenuUnit_hash_ref->{'NoPlan'}) &&
4650 defined $Net::FullAuto::FA_Core::makeplan) {
4651 #print "IN MAKEPLAN11\n";
4652 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}} &&
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4653 !exists $Net::FullAuto::FA_Core::makeplan->{
4654 'Title'}) {
4655 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4656 0 =$pn{$numbor}[0];
4657 }
4658 0 ▶ unless ($got_default) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($got_default) 0 0 0
4659 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
4660 { Menu => &pw($MenuUnit_hash_ref),
4661 Number => $numbor,
4662 PlanID =>
4663 $Net::FullAuto::FA_Core::makeplan->{Number},
4664 0 Item => $pn{$numbor}[0] }
4665 }
4666 }
4667 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
4668 .'::' if $Term::Menus::fa_code;
4669 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
4670 0 foreach my $sub (&get_subs_from_menu($Selected)) {
4671 0 my @resu=();
4672 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
4673 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4674 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
4675 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
4676 defined $Net::FullAuto::FA_Core::makeplan) {
4677 #print "IN MAKEPLAN12\n";
4678 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4679 0 'Plan'}} && !exists
4680 $Net::FullAuto::FA_Core::makeplan->{
4681 'Title'}) {
4682 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4683 0 =$pn{$numbor}[0];
4684 }
4685 0 my $n='Number';
4686 push @{$Net::FullAuto::FA_Core::makeplan->{
4687 0 'Plan'}},
4688 { Menu => &pw($MenuUnit_hash_ref),
4689 Number => $numbor,
4690 PlanID =>
4691 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4692 Item =>
4693 &Data::Dump::Streamer::Dump($sub)->Out() }
4694 }
4695 0 eval { @resu=$sub->() };
4696 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4697 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4698 eq 'FATAL ERROR') {
4699 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4700 0 return '',$FullMenu,$Selected,$Conveyed,
4701 $SavePick,$SaveMMap,$SaveNext,
4702 $Persists,$parent_menu,$@;
4703 }
4704 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4705 -1<index $log_handle,'*') {
4706 0 print $log_handle $@;
4707 0 close($log_handle);
4708 }
4709 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4710 0 &Net::FullAuto::FA_Core::handle_error($@);
4711 0 } else { die $@ }
4712 } else {
4713 0 my $die="\n FATAL ERROR! - The Local "
4714 ."System $Term::Menus::local_hostname "
4715 ."Conveyed\n"
4716 ." the Following "
4717 ."Unrecoverable Error Condition :\n\n"
4718 ." $@\n line ".__LINE__;
4719 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4720 0 return '',$FullMenu,$Selected,$Conveyed,
4721 $SavePick,$SaveMMap,$SaveNext,
4722 $Persists,$parent_menu,$die;
4723 }
4724 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4725 -1<index $log_handle,'*') {
4726 0 print $log_handle $die;
4727 0 close($log_handle);
4728 }
4729 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4730 0 &Net::FullAuto::FA_Core::handle_error($die);
4731 0 } else { die $die }
4732 }
4733 }
4734 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4735 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4736 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4737 0 return @resu;
4738 } else {
4739 0 return return_result($resu[0],
4740 $MenuUnit_hash_ref,$Conveyed);
4741 }
4742 }
4743 0 $done=1;last
4744 0 }
4745 0 eval {
4746 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
4747 0 $sub=~s/^[&]//;
4748 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
4749 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
4750 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
4751 defined $Net::FullAuto::FA_Core::makeplan) {
4752 #print "IN MAKEPLAN13\n";
4753 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
4754 0 'Plan'}} && !exists
4755 $Net::FullAuto::FA_Core::makeplan->{
4756 'Title'}) {
4757 $Net::FullAuto::FA_Core::makeplan->{'Title'}
4758 0 =$pn{$numbor}[0];
4759 }
4760 0 my $n='Number';
4761 push @{$Net::FullAuto::FA_Core::makeplan->{
4762 0 'Plan'}},
4763 { Menu => &pw($MenuUnit_hash_ref),
4764 Number => $numbor,
4765 PlanID =>
4766 0 $Net::FullAuto::FA_Core::makeplan->{$n},
4767 Item => "&$subfile$sub" }
4768 }
4769 0 eval "\@resu=\&$subfile$sub";
4770 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4771 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
4772 (-1<index $firsterr,$sub)) {
4773 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4774 0 eval "\@resu=main::$sub";
4775 } else {
4776 0 eval "\@resu=$sub";
4777 }
4778 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
4779 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
4780 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
4781 [2]{$all_menu_items_array[$numbor-1]}) {
4782 $die="The \"Result15 =>\" Setting"
4783 0 ."\n\t\t-> " . ${$FullMenu}
4784 {$MenuUnit_hash_ref}[2]
4785 {$all_menu_items_array[$numbor-1]}
4786 ."\n\t\tFound in the Menu Unit -> "
4787 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
4788 ."Specifies a Subroutine"
4789 ." that Does NOT Exist"
4790 ."\n\t\tin the User Code File "
4791 .$Term::Menus::fa_code
4792 .",\n\t\tnor was a routine with "
4793 ."that name\n\t\tlocated in the"
4794 ." main:: script.\n";
4795 0 } else { $die="$firsterr\n $seconderr" }
4796 0 } else { $die=$seconderr }
4797 0 &Net::FullAuto::FA_Core::handle_error($die);
4798 } elsif ($firsterr) {
4799 0 &Net::FullAuto::FA_Core::handle_error($firsterr);
4800 }
4801 } else {
4802 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
4803 0 $sub=~s/^[&]//;
4804 0 eval "\@resu=main::$sub";
4805 } else {
4806 0 eval "\@resu=$sub";
4807 }
4808 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
4809 }
4810 };
4811 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
4812 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
4813 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4814 0 return '',$FullMenu,$Selected,$Conveyed,
4815 $SavePick,$SaveMMap,$SaveNext,
4816 $Persists,$parent_menu,$@;
4817 }
4818 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4819 -1<index $log_handle,'*') {
4820 0 print $log_handle $@;
4821 0 close($log_handle);
4822 }
4823 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4824 0 &Net::FullAuto::FA_Core::handle_error($@);
4825 0 } else { die $@ }
4826 } else {
4827 0 my $die="\n FATAL ERROR! - The Local "
4828 ."System $Term::Menus::local_hostname "
4829 ."Conveyed\n"
4830 ." the Following "
4831 ."Unrecoverable Error Condition :\n\n"
4832 ." $@\n line ".__LINE__;
4833 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4834 0 return '',$FullMenu,$Selected,$Conveyed,
4835 $SavePick,$SaveMMap,$SaveNext,
4836 $Persists,$parent_menu,$die;
4837 }
4838 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
4839 -1<index $log_handle,'*') {
4840 0 print $log_handle $die;
4841 0 close($log_handle);
4842 }
4843 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
4844 0 &Net::FullAuto::FA_Core::handle_error($die);
4845 0 } else { die $die }
4846 }
4847 }
4848 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
4849 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
4850 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
4851 0 return @resu;
4852 } else {
4853 0 return return_result($resu[0],
4854 $MenuUnit_hash_ref,$Conveyed);
4855 }
4856 }
4857 }
4858 0 return 'DONE_SUB';
4859 0 } else { return 'DONE' }
4860 } elsif ($menu_output eq '-') {
4861 0 $return_from_child_menu='-';
4862 } elsif ($menu_output eq '+') {
4863 0 $return_from_child_menu='+';
4864 } elsif ($menu_output) {
4865 0 return $menu_output;
4866 }
4867 ▶ } elsif ($ikey eq 'ESC' || $numbor=~/^quit|exit|bye$/i) {
Condition0%0/3
$ikey eq "ESC" or $numbor =~ /^quit|exit|bye$/i
l!l&&r!l&&!r
000
MC/DC0%0/2
$ikey eq "ESC" or $numbor =~ /^quit|exit|bye$/i
$ikey eq "ESC" $numbor =~ /^quit|exit|bye$/i
Truth table0%0/3
A or B
A= $ikey eq "ESC"B= $numbor =~ /^quit|exit|bye$/i
ABresult
1X1
011
000
4868 0 ▶ print "\n" if $^O ne 'cygwin';
Branch: 1 branch
BranchTrueFalseTotal
if $^O ne "cygwin" 0 0 0
4869 0 return ']quit['
4870 ▶ } elsif ($Term::Menus::fullauto and $ikey eq 'F1' ||
Condition0%0/6
$Term::Menus::fullauto and $ikey eq "F1" || $numbor =~ /^help$/i
!ll&&!rl&&r
000
$ikey eq "F1" or $numbor =~ /^help$/i
l!l&&r!l&&!r
000
MC/DC0%0/3
$Term::Menus::fullauto and $ikey eq "F1" || $numbor =~ /^help$/i
$Term::Menus::fullauto $ikey eq "F1" $numbor =~ /^help$/i
Truth table0%0/4
A and B or C
A= $Term::Menus::fullautoB= $ikey eq "F1"C= $numbor =~ /^help$/i
ABCresult
0XX0
1000
11X1
1011
4871 $numbor=~/^help$/i) {
4872 0 system('man Net::FullAuto');
4873 ▶ } elsif ($ikey eq 'F1' || $numbor=~/^help$/i) {
Condition0%0/3
$ikey eq "F1" or $numbor =~ /^help$/i
l!l&&r!l&&!r
000
MC/DC0%0/2
$ikey eq "F1" or $numbor =~ /^help$/i
$ikey eq "F1" $numbor =~ /^help$/i
Truth table0%0/3
A or B
A= $ikey eq "F1"B= $numbor =~ /^help$/i
ABresult
1X1
011
000
4874 0 system('man Term::Menus');
4875 ▶ } elsif ($Term::Menus::fullauto and $numbor=~/^admin$/i) {
Condition0%0/3
$Term::Menus::fullauto and $numbor =~ /^admin$/i
!ll&&!rl&&r
000
MC/DC0%0/2
$Term::Menus::fullauto and $numbor =~ /^admin$/i
$Term::Menus::fullauto $numbor =~ /^admin$/i
Truth table0%0/3
A and B
A= $Term::Menus::fullautoB= $numbor =~ /^admin$/i
ABresult
0X0
100
111
4876 0 ▶ if (!exists $Net::FullAuto::FA_Core::admin_menus{
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $Net::FullAuto::FA_Core::admin_menus{&pw($MenuUnit_hash_ref)}) { } 0 0 0
4877 &pw($MenuUnit_hash_ref)}) {
4878 0 while (1) {
4879 0 ▶ my @menu_output=Menu($Net::FullAuto::FA_Core::admin_menu->())
Branch: 1 branch
BranchTrueFalseTotal
if $Net::FullAuto::FA_Core::admin_menu 0 0 0
4880 if $Net::FullAuto::FA_Core::admin_menu;
4881 0 ▶ last if $menu_output[0] ne '-' && $menu_output[0] ne '+';
Branch: 1 branch
BranchTrueFalseTotal
if $menu_output[0] ne "-" and $menu_output[0] ne "+" 0 0 0
Condition0%0/3
$menu_output[0] ne "-" and $menu_output[0] ne "+"
!ll&&!rl&&r
000
MC/DC0%0/2
$menu_output[0] ne "-" and $menu_output[0] ne "+"
$menu_output[0] ne "-" $menu_output[0] ne "+"
Truth table0%0/3
A and B
A= $menu_output[0] ne "-"B= $menu_output[0] ne "+"
ABresult
0X0
100
111
4882 }
4883 } else {
4884 0 return ['{admin}<'],$FullMenu,$Selected,$Conveyed,
4885 $SavePick,$SaveMMap,$SaveNext,$Persists;
4886 }
4887 0 ▶ } elsif (!keys %{$FullMenu->{$MenuUnit_hash_ref}[1]}
Condition0%0/3
not keys %{$$FullMenu{$MenuUnit_hash_ref}[1];} and $numbor =~ /^[Aa]$/
!ll&&!rl&&r
000
MC/DC0%0/2
not keys %{$$FullMenu{$MenuUnit_hash_ref}[1];} and $numbor =~ /^[Aa]$/
not keys %{$$FullMenu{$MenuUnit_hash_ref}[1];} $numbor =~ /^[Aa]$/
Truth table0%0/3
not(A) and B
A= not keys %{$$FullMenu{$MenuUnit_hash_ref}[1];}B= $numbor =~ /^[Aa]$/
ABresult
0X0
100
111
4888 && $numbor=~/^[Aa]$/) {
4889 0 ▶ if (!$select_many && !(keys %{$MenuUnit_hash_ref->{Select}})) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($select_many or keys %{$$MenuUnit_hash_ref{"Select"};}) 0 0 0
Condition0%0/3
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
$select_many keys %{$$MenuUnit_hash_ref{"Select"};}
Truth table0%0/3
A or B
A= $select_manyB= keys %{$$MenuUnit_hash_ref{"Select"};}
ABresult
1X1
011
000
4890 0 print "\n ERROR: Cannot Select All Items\n".
4891 " When 'Select' is NOT set to 'Many'\n";
4892 0 sleep 2;next;
4893 }
4894 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
4895 0 foreach my $num (0..$#all_menu_items_array) {
4896 0 $picks{$num+1}='*';
4897 }
4898 0 foreach my $key (keys %{$FullMenu->{$MenuUnit_hash_ref}[8]}) {
4899 $SavePick->{$parent_menu}{$FullMenu->
4900 0 {$MenuUnit_hash_ref}[8]{$key}}='*';
4901 }
4902 } else {
4903 0 my $nmp=$num_pick-1;
4904 0 foreach my $pck (0..$nmp) {
4905 0 ▶ if ($select_many ||
Branch: 1 branch
BranchTrueFalseTotal
if ($select_many or exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$pck]}) 0 0 0
Condition0%0/3
$select_many or exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$pck]}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$pck]}
$select_many exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$pck]}
Truth table0%0/3
A or B
A= $select_manyB= exists $FullMenu->{$MenuUnit_hash_ref}[6]{$all_menu_items_array[$pck]}
ABresult
1X1
011
000
4906 exists $FullMenu->{$MenuUnit_hash_ref}[6]->{
4907 $all_menu_items_array[$pck]}) {
4908 0 $picks{$pck+1}='*'
4909 }
4910 }
4911 }
4912 } elsif ($numbor=~/^[Cc]$/) {
4913 ## CLEAR ALL CLEARALL
4914 0 foreach my $key (keys %{${$FullMenu}{$MenuUnit_hash_ref}[8]}) {
4915 0 delete ${$SavePick}{$parent_menu}{${$FullMenu}
4916 0 {$MenuUnit_hash_ref}[8]{$key}};
4917 }
4918 0 foreach my $pick (keys %picks) {
4919 0 ▶ if (exists $picks{$pick}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$pick}) 0 0 0
4920 0 delete $picks{$pick};
4921 0 delete $items{$pick};
4922 0 delete $Selected->{$MenuUnit_hash_ref}{$pick};
4923 0 delete $Selected->{$parent_menu}{$pick};
4924 0 delete $SavePick->{$MenuUnit_hash_ref}{$pick};
4925 0 delete $SavePick->{$parent_menu}{$pick};
4926 0 delete $SaveNext->{$MenuUnit_hash_ref};
4927 }
4928 0 } $FullMenu->{$parent_menu}[5]='';
4929 0 $return_from_child_menu=0;
4930 0 $Persists->{$MenuUnit_hash_ref}{defaults}=0;
4931 0 ▶ $Persists->{$parent_menu}{defaults}=0 if defined $parent_menu;
Branch: 1 branch
BranchTrueFalseTotal
if defined $parent_menu 0 0 0
4932 }
4933 0 ▶ if ($numbor=~/^u$/i || $ikey eq 'UPARROW' || $ikey eq 'PAGEUP') {
Branch: 5 branches
BranchTrueFalseTotal
if ($numbor =~ /^u$/i or $ikey eq 'UPARROW' or $ikey eq 'PAGEUP') { } 0 0 0
elsif ($ikey eq 'END') { } 0 0 0
elsif ($ikey eq 'HOME') { } 0 0 0
elsif ($numbor and unpack('a1', $numbor) eq '!') { } 0 0 0
elsif (!$ikey || $ikey eq 'ENTER' and $numbor =~ /^()$/ || $numbor =~ /^\n/ or $numbor =~ /^d$/i or $ikey eq 'DOWNARROW' or $ikey eq 'PAGEDOWN') { } 0 0 0
Condition0%0/6
$numbor =~ /^u$/i or $ikey eq "UPARROW" or $ikey eq "PAGEUP"
l!l&&r!l&&!r
000
$numbor =~ /^u$/i or $ikey eq "UPARROW"
l!l&&r!l&&!r
000
MC/DC0%0/3
$numbor =~ /^u$/i or $ikey eq "UPARROW" or $ikey eq "PAGEUP"
$numbor =~ /^u$/i $ikey eq "UPARROW" $ikey eq "PAGEUP"
Truth table0%0/4
A or B or C
A= $numbor =~ /^u$/iB= $ikey eq "UPARROW"C= $ikey eq "PAGEUP"
ABCresult
1XX1
01X1
0011
0000
4934 0 ▶ if ($ikey ne 'PAGEUP' && exists $MenuUnit_hash_ref->{Scroll}
Branch: 2 branches
BranchTrueFalseTotal
if ($ikey ne 'PAGEUP' and exists $MenuUnit_hash_ref->{'Scroll'} and $MenuUnit_hash_ref->{'Scroll'}) { } 0 0 0
elsif (0 <= $start - $display_this_many_items) { } 0 0 0
Condition0%0/6
$ikey ne "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
$ikey ne "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/3
$ikey ne "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
$ikey ne "PAGEUP" exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/4
A and B and C
A= $ikey ne "PAGEUP"B= exists $MenuUnit_hash_ref->{"Scroll"}C= $MenuUnit_hash_ref->{"Scroll"}
ABCresult
0XX0
10X0
1100
1111
4935 && $MenuUnit_hash_ref->{Scroll}) {
4936 $MenuUnit_hash_ref->{Scroll}->[1]-- if
4937 0 ▶ $MenuUnit_hash_ref->{Scroll}->[1]!=1;
Branch: 1 branch
BranchTrueFalseTotal
if $MenuUnit_hash_ref->{"Scroll"}[1] != 1 0 0 0
4938 0 my $remainder=0;my $curscreennum=0;
4939 0 ▶ $remainder=$num_pick % $display_this_many_items if $num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $num_pick 0 0 0
4940 0 ▶ $curscreennum=($start+$remainder==$num_pick)?
Branch: 1 branch
BranchTrueFalseTotal
$start + $remainder == $num_pick ? : 0 0 0
4941 $start+$remainder:$start+$choose_num;
4942 0 ▶ if ($curscreennum-$remainder==
Branch: 2 branches
BranchTrueFalseTotal
if ($curscreennum - $remainder == $MenuUnit_hash_ref->{'Scroll'}[1] and $curscreennum == $num_pick) { } 0 0 0
elsif ($start == $MenuUnit_hash_ref->{'Scroll'}[1]) { } 0 0 0
Condition0%0/3
$curscreennum - $remainder == $MenuUnit_hash_ref->{"Scroll"}[1] and $curscreennum == $num_pick
!ll&&!rl&&r
000
MC/DC0%0/2
$curscreennum - $remainder == $MenuUnit_hash_ref->{"Scroll"}[1] and $curscreennum == $num_pick
$curscreennum - $remainder == $MenuUnit_hash_ref->{"Scroll"}[1] $curscreennum == $num_pick
Truth table0%0/3
A and B
A= $curscreennum - $remainder == $MenuUnit_hash_ref->{"Scroll"}[1]B= $curscreennum == $num_pick
ABresult
0X0
100
111
4943 $MenuUnit_hash_ref->{Scroll}->[1] &&
4944 $curscreennum==$num_pick) {
4945 0 $start=$start-$display_this_many_items;
4946 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
4947 } elsif ($start==$MenuUnit_hash_ref->{Scroll}->[1]) {
4948 0 ▶ if ($display_this_many_items<$num_pick-$start
Branch: 1 branch
BranchTrueFalseTotal
if ($display_this_many_items < $num_pick - $start or $remainder or not $remainder and $num_pick == $start + 1 || $num_pick == $start + $display_this_many_items) 0 0 0
Condition0%0/12
$display_this_many_items < $num_pick - $start or $remainder or not $remainder and $num_pick == $start + 1 || $num_pick == $start + $display_this_many_items
l!l&&r!l&&!r
000
$display_this_many_items < $num_pick - $start or $remainder
l!l&&r!l&&!r
000
not $remainder and $num_pick == $start + 1 || $num_pick == $start + $display_this_many_items
!ll&&!rl&&r
000
$num_pick == $start + 1 or $num_pick == $start + $display_this_many_items
l!l&&r!l&&!r
000
MC/DC0%0/5
$display_this_many_items < $num_pick - $start or $remainder or not $remainder and $num_pick == $start + 1 || $num_pick == $start + $display_this_many_items
$display_this_many_items < $num_pick - $start $remainder not $remainder $num_pick == $start + 1 $num_pick == $start + $display_this_many_items
Truth table0%0/6
A or B or not(C) and D or E
A= $display_this_many_items < $num_pick - $startB= $remainderC= not $remainderD= $num_pick == $start + 1E= $num_pick == $start + $display_this_many_items
ABCDEresult
1XXXX1
01XXX1
0011X1
001011
000XX0
001000
4949 || $remainder || (!$remainder &&
4950 (($num_pick==$start+1) ||
4951 ($num_pick==$start+$display_this_many_items)))) {
4952 0 $start=$start-$display_this_many_items;
4953 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
4954 }
4955 0 } else { next }
4956 0 $numbor=$start+$choose_num+1;
4957 0 $hidedefaults=0;
4958 0 last;
4959 } elsif (0<=$start-$display_this_many_items) {
4960 0 $start=$start-$display_this_many_items;
4961 $MenuUnit_hash_ref->{Scroll}->[1]=
4962 $start+$display_this_many_items
4963 if $ikey eq 'PAGEUP' &&
4964 exists $MenuUnit_hash_ref->{Scroll}
4965 0 ▶ && $MenuUnit_hash_ref->{Scroll};
Branch: 1 branch
BranchTrueFalseTotal
if $ikey eq "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} 0 0 0
Condition0%0/6
$ikey eq "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
$ikey eq "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/3
$ikey eq "PAGEUP" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
$ikey eq "PAGEUP" exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/4
A and B and C
A= $ikey eq "PAGEUP"B= exists $MenuUnit_hash_ref->{"Scroll"}C= $MenuUnit_hash_ref->{"Scroll"}
ABCresult
0XX0
10X0
1100
1111
4966 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
4967 } else {
4968 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11]=0;
4969 }
4970 0 $numbor=$start+$choose_num+1;
4971 0 $hidedefaults=0;
4972 0 last;
4973 } elsif ($ikey eq 'END') {
4974 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$num_pick;
4975 $MenuUnit_hash_ref->{Scroll}->[1]=$num_pick if
4976 $MenuUnit_hash_ref->{Scroll} &&
4977 0 ▶ $MenuUnit_hash_ref->{Scroll};
Branch: 1 branch
BranchTrueFalseTotal
if $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} 0 0 0
Condition0%0/3
$MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/2
$MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
$MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/3
A and B
A= $MenuUnit_hash_ref->{"Scroll"}B= $MenuUnit_hash_ref->{"Scroll"}
ABresult
0X0
100
111
4978 0 $hidedefaults=0;
4979 0 ▶ if ($num_pick==$start+$choose_num) {
Branch: 1 branch
BranchTrueFalseTotal
if ($num_pick == $start + $choose_num) 0 0 0
4980 0 next;
4981 }
4982 0 my $remainder=$num_pick % $choose_num;
4983 0 ▶ if ($remainder) {
Branch: 1 branch
BranchTrueFalseTotal
if ($remainder) { } 0 0 0
4984 0 $start=$num_pick-$remainder;
4985 } else {
4986 0 $start=$num_pick-$display_this_many_items;
4987 }
4988 0 last;
4989 } elsif ($ikey eq 'HOME') {
4990 0 $FullMenu->{$MenuUnit_hash_ref}[11]=0;
4991 $MenuUnit_hash_ref->{Scroll}->[1]=1 if
4992 $MenuUnit_hash_ref->{Scroll} &&
4993 0 ▶ $MenuUnit_hash_ref->{Scroll};
Branch: 1 branch
BranchTrueFalseTotal
if $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} 0 0 0
Condition0%0/3
$MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/2
$MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
$MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/3
A and B
A= $MenuUnit_hash_ref->{"Scroll"}B= $MenuUnit_hash_ref->{"Scroll"}
ABresult
0X0
100
111
4994 0 $hidedefaults=0;
4995 0 $start=0;
4996 0 last;
4997 ▶ } elsif ($numbor && unpack('a1',$numbor) eq '!') {
Condition0%0/3
$numbor and unpack("a1", $numbor) eq "!"
!ll&&!rl&&r
000
MC/DC0%0/2
$numbor and unpack("a1", $numbor) eq "!"
$numbor unpack("a1", $numbor) eq "!"
Truth table0%0/3
A and B
A= $numborB= unpack("a1", $numbor) eq "!"
ABresult
0X0
100
111
4998 # SHELLOUT shellout
4999 0 ▶ my $username=getlogin || getpwuid($<);
Condition0%0/3
getlogin || getpwuid $<
l!l&&r!l&&!r
000
MC/DC0%0/2
getlogin || getpwuid $<
getlogin getpwuid $<
Truth table0%0/3
A || B
A= getloginB= getpwuid $<
ABresult
1X1
011
000
5000 0 my $cmd=unpack('x1 a*',$numbor);
5001 0 print "\n";
5002 0 ▶ unless ($^O eq 'cygwin') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'cygwin') { } 0 0 0
5003 0 system("su -l -c$cmd $username");
5004 } else {
5005 0 system($cmd);
5006 }
5007 0 print "\nPress ENTER to continue";<STDIN>;
5008 0 next;
5009 ▶ } elsif (((!$ikey || $ikey eq 'ENTER') &&
Condition0%0/18
!$ikey || $ikey eq "ENTER" and $numbor =~ /^()$/ || $numbor =~ /^\n/ or $numbor =~ /^d$/i or $ikey eq "DOWNARROW" or $ikey eq "PAGEDOWN"
l!l&&r!l&&!r
000
!$ikey || $ikey eq "ENTER" and $numbor =~ /^()$/ || $numbor =~ /^\n/ or $numbor =~ /^d$/i or $ikey eq "DOWNARROW"
l!l&&r!l&&!r
000
!$ikey || $ikey eq "ENTER" and $numbor =~ /^()$/ || $numbor =~ /^\n/ or $numbor =~ /^d$/i
l!l&&r!l&&!r
000
!$ikey || $ikey eq "ENTER" and $numbor =~ /^()$/ || $numbor =~ /^\n/
!ll&&!rl&&r
000
not $ikey or $ikey eq "ENTER"
l!l&&r!l&&!r
000
$numbor =~ /^()$/ or $numbor =~ /^\n/
l!l&&r!l&&!r
000
MC/DC0%0/7
!$ikey || $ikey eq "ENTER" and $numbor =~ /^()$/ || $numbor =~ /^\n/ or $numbor =~ /^d$/i or $ikey eq "DOWNARROW" or $ikey eq "PAGEDOWN"
not $ikey $ikey eq "ENTER" $numbor =~ /^()$/ $numbor =~ /^\n/ $numbor =~ /^d$/i $ikey eq "DOWNARROW" $ikey eq "PAGEDOWN"
Truth table0%0/16
not(A) or B and C or D or E or F or G
A= not $ikeyB= $ikey eq "ENTER"C= $numbor =~ /^()$/D= $numbor =~ /^\n/E= $numbor =~ /^d$/iF= $ikey eq "DOWNARROW"G= $ikey eq "PAGEDOWN"
ABCDEFGresult
1X1XXXX1
1X01XXX1
011XXXX1
0101XXX1
00XX1XX1
1X001XX1
01001XX1
00XX01X1
1X0001X1
010001X1
00XX0011
1X000011
01000011
00XX0000
1X000000
01000000
5010 ($numbor=~/^()$/ || $numbor=~/^\n/)) || $numbor=~/^d$/i
5011 || $ikey eq 'DOWNARROW' || $ikey eq 'PAGEDOWN') {
5012 0 ▶ $ikey||='ENTER';
Condition0%0/2
$ikey ||= "ENTER"
l!l
00
MC/DC0%0/1
$ikey ||= "ENTER"
$ikey
Truth table0%0/2
A
A= $ikey
Aresult
11
00
5013 0 ▶ delete $main::maintain_scroll_flag->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::maintain_scroll_flag 0 0 0
5014 if defined $main::maintain_scroll_flag;
5015 0 ▶ if (($ikey eq 'DOWNARROW' || $numbor=~/^d$/i) &&
Branch: 2 branches
BranchTrueFalseTotal
if ($ikey eq 'DOWNARROW' || $numbor =~ /^d$/i and exists $MenuUnit_hash_ref->{'Scroll'} and $MenuUnit_hash_ref->{'Scroll'}) { } 0 0 0
elsif ($ikey eq 'ENTER' and exists $MenuUnit_hash_ref->{'Scroll'} and $MenuUnit_hash_ref->{'Scroll'} and not $show_banner_only) { } 0 0 0
Condition0%0/9
$ikey eq "DOWNARROW" || $numbor =~ /^d$/i and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
$ikey eq "DOWNARROW" || $numbor =~ /^d$/i and exists $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
$ikey eq "DOWNARROW" or $numbor =~ /^d$/i
l!l&&r!l&&!r
000
MC/DC0%0/4
$ikey eq "DOWNARROW" || $numbor =~ /^d$/i and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
$ikey eq "DOWNARROW" $numbor =~ /^d$/i exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/7
A or B and C and D
A= $ikey eq "DOWNARROW"B= $numbor =~ /^d$/iC= exists $MenuUnit_hash_ref->{"Scroll"}D= $MenuUnit_hash_ref->{"Scroll"}
ABCDresult
00XX0
1X0X0
010X0
1X100
01100
1X111
01111
5016 exists $MenuUnit_hash_ref->{Scroll}
5017 && $MenuUnit_hash_ref->{Scroll}) {
5018 0 my $remainder=0;my $curscreennum=0;
5019 0 ▶ $remainder=$num_pick % $choose_num if $num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $num_pick 0 0 0
5020 0 ▶ $curscreennum=($start+$remainder==$num_pick)?
Branch: 1 branch
BranchTrueFalseTotal
$start + $remainder == $num_pick ? : 0 0 0
5021 $start+$remainder:$start+$choose_num;
5022 $MenuUnit_hash_ref->{Scroll}->[1]++
5023 0 ▶ if $MenuUnit_hash_ref->{Scroll}->[1]!=$num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $MenuUnit_hash_ref->{"Scroll"}[1] != $num_pick 0 0 0
5024 0 ▶ if ($curscreennum<$MenuUnit_hash_ref->{Scroll}->[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($curscreennum < $MenuUnit_hash_ref->{'Scroll'}[1]) { } 0 0 0
5025 0 ▶ if ($display_this_many_items<$num_pick-$start) {
Branch: 1 branch
BranchTrueFalseTotal
if ($display_this_many_items < $num_pick - $start) { } 0 0 0
5026 0 $start=$start+$display_this_many_items;
5027 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
5028 } else {
5029 0 $start=$start+$remainder;
5030 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$num_pick;
5031 }
5032 0 } else { next }
5033 0 $hidedefaults=0;
5034 0 $numbor=$start+$choose_num+1;
5035 0 last;
5036 ▶ } elsif ($ikey eq 'ENTER' && exists $MenuUnit_hash_ref->{Scroll}
Condition0%0/9
$ikey eq "ENTER" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} and not $show_banner_only
!ll&&!rl&&r
000
$ikey eq "ENTER" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
$ikey eq "ENTER" and exists $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/4
$ikey eq "ENTER" and exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} and not $show_banner_only
$ikey eq "ENTER" exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"} not $show_banner_only
Truth table0%0/5
A and B and C and not(D)
A= $ikey eq "ENTER"B= exists $MenuUnit_hash_ref->{"Scroll"}C= $MenuUnit_hash_ref->{"Scroll"}D= not $show_banner_only
ABCDresult
0XXX0
10XX0
110X0
11100
11111
5037 && $MenuUnit_hash_ref->{Scroll} && !$show_banner_only) {
5038 0 $numbor=$MenuUnit_hash_ref->{Scroll}->[1];
5039 $MenuUnit_hash_ref->{Scroll}->[1]++
5040 0 ▶ if $MenuUnit_hash_ref->{Scroll}->[1]!=$num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $MenuUnit_hash_ref->{"Scroll"}[1] != $num_pick 0 0 0
5041 } else {
5042 0 ▶ if ($show_banner_only) {
Branch: 3 branches
BranchTrueFalseTotal
if ($show_banner_only) { } 0 0 0
elsif ($display_this_many_items < $num_pick - $start) { } 0 0 0
elsif ($ikey ne 'PAGEDOWN') { } 0 0 0
5043 0 ▶ if (exists $MenuUnit_hash_ref->{Result}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Result'}) { } 0 0 0
5044 0 $numbor='f';
5045 0 $picks{'__FA_Banner__'}='';
5046 0 my $remainder=0;
5047 0 ▶ $remainder=$choose_num % $num_pick if $num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $num_pick 0 0 0
5048 0 ▶ my $curscreennum=($start+$remainder==$num_pick)?
Branch: 1 branch
BranchTrueFalseTotal
$start + $remainder == $num_pick ? : 0 0 0
5049 $start+$remainder:$start+$choose_num;
5050 0 my $numpick=0;
5051 0 ▶ if ($parent_menu and exists $parent_menu->{Scroll}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and exists $parent_menu->{"Scroll"}) 0 0 0
Condition0%0/3
$parent_menu and exists $parent_menu->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/2
$parent_menu and exists $parent_menu->{"Scroll"}
$parent_menu exists $parent_menu->{"Scroll"}
Truth table0%0/3
A and B
A= $parent_menuB= exists $parent_menu->{"Scroll"}
ABresult
0X0
100
111
5052 0 ▶ if (ref $parent_menu->{Scroll} eq 'ARRAY') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $parent_menu->{"Scroll"} eq "ARRAY") 0 0 0
5053 0 $numpick=$#{[keys %{$FullMenu->{$parent_menu}[2]}]};
5054 0 ▶ if ($curscreennum+$display_this_many_items
Branch: 1 branch
BranchTrueFalseTotal
if ($curscreennum + $display_this_many_items < $parent_menu->{"Scroll"}[1] and $parent_menu->{"Scroll"}[1] < $numpick) 0 0 0
Condition0%0/3
$curscreennum + $display_this_many_items < $parent_menu->{"Scroll"}[1] and $parent_menu->{"Scroll"}[1] < $numpick
!ll&&!rl&&r
000
MC/DC0%0/2
$curscreennum + $display_this_many_items < $parent_menu->{"Scroll"}[1] and $parent_menu->{"Scroll"}[1] < $numpick
$curscreennum + $display_this_many_items < $parent_menu->{"Scroll"}[1] $parent_menu->{"Scroll"}[1] < $numpick
Truth table0%0/3
A and B
A= $curscreennum + $display_this_many_items < $parent_menu->{"Scroll"}[1]B= $parent_menu->{"Scroll"}[1] < $numpick
ABresult
0X0
100
111
5055 <$parent_menu->{Scroll}->[1] &&
5056 $parent_menu->{Scroll}->[1]<$numpick) {
5057 $FullMenu->{$parent_menu}[11]=
5058 0 $parent_menu->{Scroll}->[1];
5059 }
5060 }
5061 0 ▶ $parent_menu->{Scroll}->[1]||=0;
Condition0%0/2
$parent_menu->{"Scroll"}[1] ||= 0
l!l
00
MC/DC0%0/1
$parent_menu->{"Scroll"}[1] ||= 0
$parent_menu->{"Scroll"}[1]
Truth table0%0/2
A
A= $parent_menu->{"Scroll"}[1]
Aresult
11
00
5062 }
5063 } else {
5064 0 return 'DONE_SUB';
5065 }
5066 } elsif ($display_this_many_items<$num_pick-$start) {
5067 0 $start=$start+$display_this_many_items;
5068 $MenuUnit_hash_ref->{Scroll}->[1]=$start+1 if
5069 exists $MenuUnit_hash_ref->{Scroll}
5070 0 ▶ && $MenuUnit_hash_ref->{Scroll};
Branch: 1 branch
BranchTrueFalseTotal
if exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"} 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Scroll"} and $MenuUnit_hash_ref->{"Scroll"}
exists $MenuUnit_hash_ref->{"Scroll"} $MenuUnit_hash_ref->{"Scroll"}
Truth table0%0/3
A and B
A= exists $MenuUnit_hash_ref->{"Scroll"}B= $MenuUnit_hash_ref->{"Scroll"}
ABresult
0X0
100
111
5071 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
5072 } elsif ($ikey ne 'PAGEDOWN') {
5073 0 $start=$FullMenu->{$MenuUnit_hash_ref}[11]=0;
5074 }
5075 0 ▶ unless ($show_banner_only || $numbor!~/^\d+/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($show_banner_only or not $numbor =~ /^\d+/) 0 0 0
Condition0%0/3
$show_banner_only or not $numbor =~ /^\d+/
l!l&&r!l&&!r
000
MC/DC0%0/2
$show_banner_only or not $numbor =~ /^\d+/
$show_banner_only not $numbor =~ /^\d+/
Truth table0%0/3
A or not(B)
A= $show_banner_onlyB= not $numbor =~ /^\d+/
ABresult
1X1
011
000
5076 0 $hidedefaults=0;
5077 0 $numbor=$start+$choose_num+1;
5078 0 last;
5079 }
5080 }
5081 0 } chomp $numbor;my $test_numbor=$numbor;$test_numbor=~s/\//\\\//sg;
5082 0 ▶ if (!((keys %picks) && $numbor=~/^[Ff]$/) &&
Branch: 2 branches
BranchTrueFalseTotal
if (not keys %picks && $numbor =~ /^[Ff]$/ || $test_numbor =~ /^\d+|admin$/ || $return_from_child_menu) { } 0 0 0
elsif (exists $pn{$numbor} or keys %picks and $numbor =~ /^[Ff]$/) { } 0 0 0
Condition0%0/9
keys %picks && $numbor =~ /^[Ff]$/ || $test_numbor =~ /^\d+|admin$/ || $return_from_child_menu
l!l&&r!l&&!r
000
keys %picks and $numbor =~ /^[Ff]$/ or $test_numbor =~ /^\d+|admin$/
l!l&&r!l&&!r
000
keys %picks and $numbor =~ /^[Ff]$/
!ll&&!rl&&r
000
MC/DC0%0/4
keys %picks && $numbor =~ /^[Ff]$/ || $test_numbor =~ /^\d+|admin$/ || $return_from_child_menu
keys %picks $numbor =~ /^[Ff]$/ $test_numbor =~ /^\d+|admin$/ $return_from_child_menu
Truth table0%0/7
A and B or C || D
A= keys %picksB= $numbor =~ /^[Ff]$/C= $test_numbor =~ /^\d+|admin$/D= $return_from_child_menu
ABCDresult
11XX1
0X1X1
101X1
0X011
10011
0X000
10000
5083 $test_numbor!~/^\d+|admin$/ && !$return_from_child_menu) {
5084 0 ▶ delete $main::maintain_scroll_flag->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::maintain_scroll_flag 0 0 0
5085 if defined $main::maintain_scroll_flag;
5086 0 $numbor=$start+$choose_num+1;
5087 0 last;
5088 ▶ } elsif (exists $pn{$numbor} || ((keys %picks) && $numbor=~/^[Ff]$/)) {
Condition0%0/6
exists $pn{$numbor} or keys %picks and $numbor =~ /^[Ff]$/
l!l&&r!l&&!r
000
keys %picks and $numbor =~ /^[Ff]$/
!ll&&!rl&&r
000
MC/DC0%0/3
exists $pn{$numbor} or keys %picks and $numbor =~ /^[Ff]$/
exists $pn{$numbor} keys %picks $numbor =~ /^[Ff]$/
Truth table0%0/4
A or B and C
A= exists $pn{$numbor}B= keys %picksC= $numbor =~ /^[Ff]$/
ABCresult
1XX1
0111
00X0
0100
5089 # NUMBOR CHOSEN
5090 0 ▶ delete $main::maintain_scroll_flag->{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::maintain_scroll_flag 0 0 0
5091 if defined $main::maintain_scroll_flag;
5092 0 ▶ delete $picks{'__FA_Banner__'} if exists $picks{'__FA_Banner__'};
Branch: 1 branch
BranchTrueFalseTotal
if exists $picks{"__FA_Banner__"} 0 0 0
5093 0 ▶ %pn=() unless %pn;
Branch: 1 branch
BranchTrueFalseTotal
unless %pn 0 0 0
5094 0 my $callertest=__PACKAGE__."::Menu";
5095 0 ▶ if ($Persists->{$MenuUnit_hash_ref}{defaults} && !$filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu) 0 0 0
Condition0%0/3
$Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
!ll&&!rl&&r
000
MC/DC0%0/2
$Persists->{$MenuUnit_hash_ref}{"defaults"} and not $filtered_menu
$Persists->{$MenuUnit_hash_ref}{"defaults"} not $filtered_menu
Truth table0%0/3
A and not(B)
A= $Persists->{$MenuUnit_hash_ref}{"defaults"}B= not $filtered_menu
ABresult
0X0
100
111
5096 0 $Persists->{$MenuUnit_hash_ref}{defaults}=0;
5097 0 ▶ $Persists->{$parent_menu}{defaults}=0 if $parent_menu;
Branch: 1 branch
BranchTrueFalseTotal
if $parent_menu 0 0 0
5098 0 foreach my $pick (keys %picks) {
5099 0 ▶ if (exists $picks{$pick} && !$picks{$numbor}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$pick} and not $picks{$numbor}) 0 0 0
Condition0%0/3
exists $picks{$pick} and not $picks{$numbor}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $picks{$pick} and not $picks{$numbor}
exists $picks{$pick} not $picks{$numbor}
Truth table0%0/3
A and not(B)
A= exists $picks{$pick}B= not $picks{$numbor}
ABresult
0X0
100
111
5100 0 ▶ if ($picks{$pick} eq '*') {
Branch: 2 branches
BranchTrueFalseTotal
if ($picks{$pick} eq '*') { } 0 0 0
elsif ($picks{$pick} eq '+') { } 0 0 0
5101 0 delete $picks{$pick};
5102 0 delete $items{$pick};
5103 0 delete $Selected->{$MenuUnit_hash_ref}{$pick};
5104 } elsif ($picks{$pick} eq '+') {
5105 0 &delete_Selected($MenuUnit_hash_ref,$pick,
5106 $Selected,$SavePick,$SaveNext,$Persists);
5107 0 delete $picks{$pick};
5108 0 delete $items{$pick};
5109 }
5110 }
5111 0 } $FullMenu->{$MenuUnit_hash_ref}[5]='';
5112 }
5113 0 ▶ $pn{$numbor}[1]||=1;
Condition0%0/2
$pn{$numbor}[1] ||= 1
l!l
00
MC/DC0%0/1
$pn{$numbor}[1] ||= 1
$pn{$numbor}[1]
Truth table0%0/2
A
A= $pn{$numbor}[1]
Aresult
11
00
5114 0 ▶ my $digital_numbor=($numbor=~/^\d+$/) ? $numbor : 1;
Branch: 1 branch
BranchTrueFalseTotal
$numbor =~ /^\d+$/ ? : 0 0 0
5115 0 ▶ $all_menu_items_array[0]||='';
Condition0%0/2
$all_menu_items_array[0] ||= ""
l!l
00
MC/DC0%0/1
$all_menu_items_array[0] ||= ""
$all_menu_items_array[0]
Truth table0%0/2
A
A= $all_menu_items_array[0]
Aresult
11
00
5116 0 ▶ if (exists $MenuUnit_hash_ref->{Result} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{"Result"} and not defined $MenuUnit_hash_ref->{"Result"}) 0 0 0
Condition0%0/3
exists $MenuUnit_hash_ref->{"Result"} and not defined $MenuUnit_hash_ref->{"Result"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $MenuUnit_hash_ref->{"Result"} and not defined $MenuUnit_hash_ref->{"Result"}
exists $MenuUnit_hash_ref->{"Result"} not defined $MenuUnit_hash_ref->{"Result"}
Truth table0%0/3
A and not(B)
A= exists $MenuUnit_hash_ref->{"Result"}B= not defined $MenuUnit_hash_ref->{"Result"}
ABresult
0X0
100
111
5117 !defined $MenuUnit_hash_ref->{Result}) {
5118 0 my $name=$MenuUnit_hash_ref->{Name};
5119 0 print "\n\n";
5120 0 my $fatal_error=<<END;
5121
5122 FATAL ERROR!: The Menu Block \"$name\" :
5123
5124 END
5125 0 $fatal_error.=<<'END';
5126 has a Result => undef element defined, but not instantiated.
5127 There may be a couple reasons for this, having to do with scope
5128 and where code blocks are located in relation to each other in
5129 the script. It could also be that you didn't provide a value
5130 for the element. If blocks are locally scoped with "my" than
5131 the result block must exist ABOVE the calling block:
5132
5133 my $block_being_called = { ... };
5134 my $block_doing_calling = { Result => $block_being_called, };
5135
5136 However, with more complex menu implementations, this
5137 convenience is not always possible or workable. In this
5138 situation, the approach is different. It will be necessary to
5139 globally scope code blocks, and use full package naming
5140 conventions when calling code blocks:
5141
5142 our $block_doing_calling = {
5143
5144 Result => $Full::Package::Name::Of::block_being_called,
5145
5146 };
5147 our $block_being_called = { ... };
5148
5149 ---------------------------------------------------------------
5150
5151 Result => elements MUST have a value. A NULL value will work:
5152
5153 my|our $block_being_called = { Result => '', }
5154
5155 END
5156 0 die $fatal_error;
5157 }
5158 0 ▶ if (($select_many ||
Branch: 5 branches
BranchTrueFalseTotal
if ($select_many || exists do { $MenuUnit_hash_ref }->{'Select'}{$numbor} and not $numbor =~ /^[Ff]$/) { } 0 0 0
elsif ($show_banner_only and exists $MenuUnit_hash_ref->{'Result'} and ref $MenuUnit_hash_ref->{'Result'} eq 'HASH' or $numbor =~ /^\d+$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq 'HASH' or $numbor =~ /^[Ff]$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq 'HASH') { } 0 0 0
elsif ($FullMenu and $caller eq $callertest and $select_many || keys %{$$MenuUnit_hash_ref{'Select'};}) { } 0 0 0
elsif ($show_banner_only and exists $MenuUnit_hash_ref->{'Result'} and ref $MenuUnit_hash_ref->{'Result'} eq 'CODE' or keys %{$$FullMenu{$MenuUnit_hash_ref}[2];} and exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}) { } 0 0 0
elsif ($return_from_child_menu and not exists $SavePick->{$MenuUnit_hash_ref}{$pn{$numbor}}) { } 0 0 0
Condition0%0/6
$select_many || exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor} and not $numbor =~ /^[Ff]$/
!ll&&!rl&&r
000
$select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}
l!l&&r!l&&!r
000
MC/DC0%0/3
$select_many || exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor} and not $numbor =~ /^[Ff]$/
$select_many exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor} not $numbor =~ /^[Ff]$/
Truth table0%0/5
A or B and not(C)
A= $select_manyB= exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}C= not $numbor =~ /^[Ff]$/
ABCresult
00X0
1X00
0100
1X11
0111
5159 0 (exists ${$MenuUnit_hash_ref}{Select}{$numbor}))
5160 && $numbor!~/^[Ff]$/) {
5161 0 ▶ if ($filtered_menu && (exists
Branch: 2 branches
BranchTrueFalseTotal
if ($filtered_menu and exists $SavePick->{$parent_menu}{$numbor}) { } 0 0 0
elsif (exists $picks{$numbor}) { } 0 0 0
Condition0%0/3
$filtered_menu and exists $SavePick->{$parent_menu}{$numbor}
!ll&&!rl&&r
000
MC/DC0%0/2
$filtered_menu and exists $SavePick->{$parent_menu}{$numbor}
$filtered_menu exists $SavePick->{$parent_menu}{$numbor}
Truth table0%0/3
A and B
A= $filtered_menuB= exists $SavePick->{$parent_menu}{$numbor}
ABresult
0X0
100
111
5162 $SavePick->{$parent_menu}{$numbor})) {
5163 0 ▶ if ($Persists->{$parent_menu}{defaults}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Persists->{$parent_menu}{"defaults"}) 0 0 0
5164 0 $Persists->{$parent_menu}{defaults}=0;
5165 0 $Persists->{$MenuUnit_hash_ref}{defaults}=0;
5166 0 foreach my $pick (keys %picks) {
5167 0 ▶ if (exists $picks{$pick} && !$picks{$numbor}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$pick} and not $picks{$numbor}) 0 0 0
Condition0%0/3
exists $picks{$pick} and not $picks{$numbor}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $picks{$pick} and not $picks{$numbor}
exists $picks{$pick} not $picks{$numbor}
Truth table0%0/3
A and not(B)
A= exists $picks{$pick}B= not $picks{$numbor}
ABresult
0X0
100
111
5168 0 ▶ if ($picks{$pick} eq '*') {
Branch: 2 branches
BranchTrueFalseTotal
if ($picks{$pick} eq '*') { } 0 0 0
elsif ($picks{$pick} eq '+') { } 0 0 0
5169 0 delete $picks{$pick};
5170 0 delete $items{$pick};
5171 0 delete $Selected->{$parent_menu}{$pick};
5172 0 delete $SavePick->{$MenuUnit_hash_ref}{$numbor};
5173 } elsif ($picks{$pick} eq '+') {
5174 0 &delete_Selected($parent_menu,$pick,
5175 $Selected,$SavePick,$SaveNext,$Persists);
5176 0 $SaveNext={%{$SavePick}};
5177 0 delete $picks{$pick};
5178 0 delete $items{$pick};
5179 }
5180 }
5181 0 } $FullMenu->{$MenuUnit_hash_ref}[5]='';
5182 }
5183 0 delete $Selected->{$MenuUnit_hash_ref}{$numbor};
5184 0 delete $picks{$numbor};
5185 0 delete $items{$numbor};
5186 0 delete $SaveNext->{$MenuUnit_hash_ref};
5187 0 delete $SavePick->{$MenuUnit_hash_ref}{$numbor};
5188 0 delete $SavePick->{$parent_menu}{$numbor};
5189 } elsif (exists $picks{$numbor}) {
5190 0 ▶ if ($picks{$numbor} eq '*') {
Branch: 1 branch
BranchTrueFalseTotal
if ($picks{$numbor} eq '*') { } 0 0 0
5191 0 delete $picks{$numbor};
5192 0 delete $items{$numbor};
5193 0 delete $Selected->{$MenuUnit_hash_ref}{$numbor};
5194 0 delete $SavePick->{$MenuUnit_hash_ref}{$numbor};
5195 0 ▶ delete $SavePick->{$parent_menu}{$numbor}
Branch: 1 branch
BranchTrueFalseTotal
if $filtered_menu 0 0 0
5196 if $filtered_menu;
5197 } else {
5198 0 &delete_Selected($MenuUnit_hash_ref,$numbor,
5199 $Selected,$SavePick,$SaveNext,$Persists);
5200 0 delete $picks{$numbor};
5201 0 delete $items{$numbor};
5202 }
5203 } else {
5204 $items{$numbor}=$FullMenu->{$MenuUnit_hash_ref}
5205 0 [4]{$all_menu_items_array[$numbor-1]};
5206 0 ▶ $SavePick->{$parent_menu}{$numbor}='*'
Branch: 1 branch
BranchTrueFalseTotal
if $filtered_menu 0 0 0
5207 if $filtered_menu;
5208 0 my $skip=0;
5209 0 foreach my $key (keys %picks) {
5210 0 ▶ if (defined $all_menu_items_array[$key-1] &&
Branch: 2 branches
BranchTrueFalseTotal
if (defined $all_menu_items_array[$key - 1] and exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]} and grep {$items{$numbor} eq $_;} @{do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]};}) { } 0 0 0
elsif ($picks{$key} eq '-') { } 0 0 0
Condition0%0/6
defined $all_menu_items_array[$key - 1] and exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]} and grep {$items{$numbor} eq $_;} @{do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]};}
!ll&&!rl&&r
000
defined $all_menu_items_array[$key - 1] and exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]}
!ll&&!rl&&r
000
MC/DC0%0/3
defined $all_menu_items_array[$key - 1] and exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]} and grep {$items{$numbor} eq $_;} @{do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]};}
defined $all_menu_items_array[$key - 1] exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]} grep {$items{$numbor} eq $_;} @{do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]};}
Truth table0%0/4
A and B and C
A= defined $all_menu_items_array[$key - 1]B= exists do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]}C= grep {$items{$numbor} eq $_;} @{do { $FullMenu }->{$MenuUnit_hash_ref}[1]{$all_menu_items_array[$key - 1]};}
ABCresult
0XX0
10X0
1100
1111
5211 0 exists ${$FullMenu}{$MenuUnit_hash_ref}[1]->{
5212 $all_menu_items_array[$key-1]}
5213 0 && (grep { $items{$numbor} eq $_ }
5214 0 @{${$FullMenu}{$MenuUnit_hash_ref}[1]->{
5215 0 $all_menu_items_array[$key-1]}})) {
5216 0 my $warn="\n WARNING! You Cannot Select ";
5217 0 $warn.="Line $numbor while Line $key is Selected!\n";
5218 0 print "$warn";sleep 2;
5219 0 $skip=1;
5220 } elsif ($picks{$key} eq '-') {
5221 0 delete ${$Selected}{$MenuUnit_hash_ref}{$key};
5222 0 delete $picks{$key};
5223 0 delete $SaveNext->{$MenuUnit_hash_ref};
5224 }
5225 }
5226 0 ▶ if ($skip==0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($skip == 0) 0 0 0
5227 0 $picks{$numbor}='*';
5228 $negate{$numbor}=
5229 0 ${${$FullMenu}{$MenuUnit_hash_ref}[1]}
5230 0 {$all_menu_items_array[$numbor-1]};
5231 0 %{$SavePick->{$MenuUnit_hash_ref}}=%picks;
5232 }
5233 }
5234 0 ▶ if ($prev_menu && $prev_menu!=$numbor) {
Branch: 1 branch
BranchTrueFalseTotal
if ($prev_menu and $prev_menu != $numbor) 0 0 0
Condition0%0/3
$prev_menu and $prev_menu != $numbor
!ll&&!rl&&r
000
MC/DC0%0/2
$prev_menu and $prev_menu != $numbor
$prev_menu $prev_menu != $numbor
Truth table0%0/3
A and B
A= $prev_menuB= $prev_menu != $numbor
ABresult
0X0
100
111
5235 0 &delete_Selected($MenuUnit_hash_ref,$prev_menu,
5236 $Selected,$SavePick,$SaveNext,$Persists);
5237 0 delete $picks{$prev_menu};
5238 0 delete $items{$prev_menu};
5239 }
5240 ▶ } elsif (($show_banner_only && exists $MenuUnit_hash_ref->
Condition0%0/23
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "HASH" or $numbor =~ /^\d+$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH" or $numbor =~ /^[Ff]$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq "HASH"
l!l&&r!l&&!r
000
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "HASH" or $numbor =~ /^\d+$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH"
l!l&&r!l&&!r
000
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "HASH"
!ll&&!rl&&r
000
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"}
!ll&&!rl&&r
000
$numbor =~ /^\d+$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH"
!ll&&!rl&&r
000
$all_menu_items_array[$digital_numbor - 1] || $all_menu_items_array[$pn{$digital_numbor}[1] - 1]
l!l&&r!l&&!r
000
$numbor =~ /^[Ff]$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq "HASH"
!ll&&!rl&&r
000
(keys %picks)[0] || 1
l!l
00
MC/DC0%0/7
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "HASH" or $numbor =~ /^\d+$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH" or $numbor =~ /^[Ff]$/ and ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq "HASH"
$show_banner_only exists $MenuUnit_hash_ref->{"Result"} ref $MenuUnit_hash_ref->{"Result"} eq "HASH" $numbor =~ /^\d+$/ ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH" $numbor =~ /^[Ff]$/ ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq "HASH"
MC/DC0%0/2
$all_menu_items_array[$digital_numbor - 1] || $all_menu_items_array[$pn{$digital_numbor}[1] - 1]
$all_menu_items_array[$digital_numbor - 1] $all_menu_items_array[$pn{$digital_numbor}[1] - 1]
MC/DC0%0/1
(keys %picks)[0] || 1
(keys %picks)[0]
Truth table0%0/22
A and B and C or D and E or F and G
A= $show_banner_onlyB= exists $MenuUnit_hash_ref->{"Result"}C= ref $MenuUnit_hash_ref->{"Result"} eq "HASH"D= $numbor =~ /^\d+$/E= ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or $all_menu_items_array[$pn{$digital_numbor}[1] - 1]} eq "HASH"F= $numbor =~ /^[Ff]$/G= ref $FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[((keys %picks)[0] || 1) - 1]} eq "HASH"
ABCDEFGresult
111XXXX1
0XX11XX1
10X11XX1
11011XX1
0XX0X111
0XX10111
10X0X111
10X10111
1100X111
11010111
0XX0X0X0
0XX0X100
0XX100X0
0XX10100
10X0X0X0
10X0X100
10X100X0
10X10100
1100X0X0
1100X100
110100X0
11010100
Truth table0%0/3
A || B
A= $all_menu_items_array[$digital_numbor - 1]B= $all_menu_items_array[$pn{$digital_numbor}[1] - 1]
ABresult
1X1
011
000
Truth table0%0/2
A
A= (keys %picks)[0]
Aresult
11
00
5241 {Result} and ref $MenuUnit_hash_ref->
5242 {Result} eq 'HASH') || ($numbor=~/^\d+$/ &&
5243 (ref $FullMenu->{$MenuUnit_hash_ref}[2]
5244 {$all_menu_items_array[$digital_numbor-1]||
5245 $all_menu_items_array[$pn{$digital_numbor}[1]-1]}
5246 eq 'HASH')) || ($numbor=~/^[Ff]$/ &&
5247 ref $FullMenu->{$MenuUnit_hash_ref}[2]
5248 {$all_menu_items_array[((keys %picks)[0]||1)-1]}
5249 eq 'HASH')) {
5250 0 my $numbor_is_eff=0;
5251 0 ▶ if ($numbor=~/^[Ff]$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($numbor =~ /^[Ff]$/) 0 0 0
5252 0 $numbor=(keys %picks)[0];
5253 0 $numbor_is_eff=1;
5254 }
5255 0 ▶ if (grep { /Item_/ } keys %{$MenuUnit_hash_ref}) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {/Item_/;} keys %{$MenuUnit_hash_ref;}) 0 0 0
5256 0 my @items=();
5257 0 foreach my $key (keys %{$MenuUnit_hash_ref}) {
5258 0 ▶ next unless $key=~/Item_/;
Branch: 1 branch
BranchTrueFalseTotal
unless $key =~ /Item_/ 0 0 0
5259 0 push @items, $MenuUnit_hash_ref->{$key};
5260 }
5261 0 ▶ if ($#items==0 && ref $items[0] eq 'HASH' &&
Branch: 1 branch
BranchTrueFalseTotal
if ($#items == 0 and ref $items[0] eq "HASH" and not grep({/Item_/;} keys %{$items[0];}) and grep {/Banner/;} keys %{$items[0];}) 0 0 0
Condition0%0/9
$#items == 0 and ref $items[0] eq "HASH" and not grep({/Item_/;} keys %{$items[0];}) and grep {/Banner/;} keys %{$items[0];}
!ll&&!rl&&r
000
$#items == 0 and ref $items[0] eq "HASH" and not grep({/Item_/;} keys %{$items[0];})
!ll&&!rl&&r
000
$#items == 0 and ref $items[0] eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/4
$#items == 0 and ref $items[0] eq "HASH" and not grep({/Item_/;} keys %{$items[0];}) and grep {/Banner/;} keys %{$items[0];}
$#items == 0 ref $items[0] eq "HASH" not grep({/Item_/;} keys %{$items[0];}) grep {/Banner/;} keys %{$items[0];}
Truth table0%0/5
A and B and not(C) and D
A= $#items == 0B= ref $items[0] eq "HASH"C= not grep({/Item_/;} keys %{$items[0];})D= grep {/Banner/;} keys %{$items[0];}
ABCDresult
0XXX0
10XX0
110X0
11100
11111
5262 0 (!grep { /Item_/ } keys %{$items[0]}) &&
5263 0 grep { /Banner/ } keys %{$items[0]}) {
5264 0 $show_banner_only=1;
5265 }
5266 }
5267 0 ▶ if ($show_banner_only ||
Branch: 1 branch
BranchTrueFalseTotal
if ($show_banner_only or grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};} or exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []} or &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]})) 0 0 0
Condition0%0/9
$show_banner_only or grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};} or exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []} or &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]})
l!l&&r!l&&!r
000
$show_banner_only or grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};} or exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []}
l!l&&r!l&&!r
000
$show_banner_only or grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};}
l!l&&r!l&&!r
000
MC/DC0%0/4
$show_banner_only or grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};} or exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []} or &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]})
$show_banner_only grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};} exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []} &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]})
Truth table0%0/5
A or B or C or D
A= $show_banner_onlyB= grep {/Item_/;} keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]};}C= exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ""};})[0] or []}D= &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1] or $all_menu_items_array[$pn{$numbor}[1] - 1]})
ABCDresult
1XXX1
01XX1
001X1
00011
00000
5268 0 (grep { /Item_/ } keys %{$FullMenu->{
5269 $MenuUnit_hash_ref}[2]{$all_menu_items_array[
5270 $numbor-1]||$all_menu_items_array[
5271 0 ▶ $pn{$numbor}[1]-1]}})|| exists $labels{
Condition0%0/5
$all_menu_items_array[$numbor - 1] || $all_menu_items_array[$pn{$numbor}[1] - 1]
l!l&&r!l&&!r
000
(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ''};})[0] || []
l!l
00
MC/DC0%0/2
$all_menu_items_array[$numbor - 1] || $all_menu_items_array[$pn{$numbor}[1] - 1]
$all_menu_items_array[$numbor - 1] $all_menu_items_array[$pn{$numbor}[1] - 1]
MC/DC0%0/1
(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ''};})[0] || []
(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ''};})[0]
Truth table0%0/3
A || B
A= $all_menu_items_array[$numbor - 1]B= $all_menu_items_array[$pn{$numbor}[1] - 1]
ABresult
1X1
011
000
Truth table0%0/2
A
A= (keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1] or ''};})[0]
Aresult
11
00
5272 (keys %{$FullMenu->{$MenuUnit_hash_ref}[2]
5273 0 ▶ {$all_menu_items_array[$digital_numbor-1]
Condition0%0/5
$all_menu_items_array[$digital_numbor - 1] || ''
l!l
00
$all_menu_items_array[$numbor - 1] || $all_menu_items_array[$pn{$numbor}[1] - 1]
l!l&&r!l&&!r
000
MC/DC0%0/1
$all_menu_items_array[$digital_numbor - 1] || ''
$all_menu_items_array[$digital_numbor - 1]
MC/DC0%0/2
$all_menu_items_array[$numbor - 1] || $all_menu_items_array[$pn{$numbor}[1] - 1]
$all_menu_items_array[$numbor - 1] $all_menu_items_array[$pn{$numbor}[1] - 1]
Truth table0%0/2
A
A= $all_menu_items_array[$digital_numbor - 1]
Aresult
11
00
Truth table0%0/3
A || B
A= $all_menu_items_array[$numbor - 1]B= $all_menu_items_array[$pn{$numbor}[1] - 1]
ABresult
1X1
011
000
5274 ||''}})[0]or[]}||
5275 &test_hashref($FullMenu->{$MenuUnit_hash_ref}[2]
5276 {$all_menu_items_array[$numbor-1]||
5277 $all_menu_items_array[$pn{$numbor}[1]-1]})) {
5278 0 my $menyou='';
5279 0 ▶ my $cur_menu=($filtered_menu)?$parent_menu:$MenuUnit_hash_ref;
Branch: 1 branch
BranchTrueFalseTotal
$filtered_menu ? : 0 0 0
5280 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
5281 0 my @all_copy=@all_menu_items_array;
5282 0 @all_menu_items_array=();
5283 0 my $pstart=0;
5284 0 my $pstop=0;
5285 0 foreach my $pik (sort numerically keys %pn) {
5286 0 $pstop=$pik-2;
5287 0 foreach my $item ($pstart..$pstop) {
5288 0 push @all_menu_items_array,'';
5289 }
5290 0 push @all_menu_items_array, shift @all_copy;
5291 0 $pstart=$pstop+2;
5292 0 $pstop=0;
5293 }
5294 0 ▶ while (my $pst=$pstart--) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $pst = $pstart--) 0 0 0
5295 0 ▶ if ($pst=~/0$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pst =~ /0$/) 0 0 0
5296 0 $FullMenu->{$cur_menu}[11]=$pst;
5297 0 last;
5298 }
5299 }
5300 0 delete $SavePick->{$MenuUnit_hash_ref};
5301 0 delete $SaveNext->{$MenuUnit_hash_ref};
5302 }
5303 0 ▶ if (!$filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($filtered_menu) 0 0 0
5304 0 ▶ if (exists $MenuUnit_hash_ref->{Result}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $MenuUnit_hash_ref->{'Result'}) { } 0 0 0
elsif (exists $labels{(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$digital_numbor - 1]};})[0]}) { } 0 0 0
5305 $FullMenu->{$MenuUnit_hash_ref}[2]
5306 {'__FA_Banner__'}
5307 0 =$MenuUnit_hash_ref->{Result};
5308 } elsif (exists $labels{(keys %{$FullMenu->
5309 {$MenuUnit_hash_ref}[2]
5310 0 {$all_menu_items_array[$digital_numbor-1]}})[0]}) {
5311 0 my %men_result=%{$FullMenu->
5312 {$MenuUnit_hash_ref}[2]
5313 0 {$all_menu_items_array[$digital_numbor-1]}};
5314 $menyou=&Data::Dump::Streamer::Dump($labels{
5315 0 (keys %men_result)[0]})->Out();
5316 #print "MENYOU=$menyou<==\n";<STDIN>;
5317 0 $menyou=~s/\$HASH\d*\s*=\s*//s;
5318 0 my $mnyou=eval $menyou;
5319 #print "WHAT IS THE CONVEY=$mnyou->{Item_1}->{Convey}<==\n";
5320 $FullMenu->
5321 {$MenuUnit_hash_ref}[2]
5322 0 {$all_menu_items_array[$numbor-1]}=$mnyou;
5323 my $itemnum=$FullMenu->{$MenuUnit_hash_ref}[4]
5324 0 {$all_menu_items_array[$numbor-1]};
5325 }
5326 }
5327 0 ▶ chomp($numbor) if $numbor;
Branch: 1 branch
BranchTrueFalseTotal
if $numbor 0 0 0
5328 0 ▶ unless ($numbor_is_eff) {
Branch: 2 branches
BranchTrueFalseTotal
if ($numbor_is_eff) { } 0 0 0
if (do { not $show_banner_only }) 0 0 0
5329 0 ▶ if (exists $picks{$numbor}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $picks{$numbor}) 0 0 0
5330 #$FullMenu->{$cur_menu}[5]='ERASE';
5331 0 $hidedefaults=0;
5332 0 foreach my $key (keys %{$SaveNext}) {
5333 0 delete $SaveNext->{$key};
5334 }
5335 0 ▶ if ($picks{$numbor} eq '*') {
Branch: 2 branches
BranchTrueFalseTotal
if ($picks{$numbor} eq '*') { } 0 0 0
elsif ($picks{$numbor} ne ' ') { } 0 0 0
5336 0 delete $picks{$numbor};
5337 0 delete $items{$numbor};
5338 0 delete $Selected->{$cur_menu}{$numbor};
5339 } elsif ($picks{$numbor} ne ' ') {
5340 0 &delete_Selected($cur_menu,$numbor,
5341 $Selected,$SavePick,$SaveNext,$Persists);
5342 0 delete $picks{$numbor};
5343 0 delete $items{$numbor};
5344 }
5345 }
5346 0 ▶ if ($prev_menu && $prev_menu!=$numbor) {
Branch: 1 branch
BranchTrueFalseTotal
if ($prev_menu and $prev_menu != $numbor) 0 0 0
Condition0%0/3
$prev_menu and $prev_menu != $numbor
!ll&&!rl&&r
000
MC/DC0%0/2
$prev_menu and $prev_menu != $numbor
$prev_menu $prev_menu != $numbor
Truth table0%0/3
A and B
A= $prev_menuB= $prev_menu != $numbor
ABresult
0X0
100
111
5347 #$FullMenu->{$cur_menu}[5]='ERASE';
5348 0 $hidedefaults=0;
5349 0 &delete_Selected($cur_menu,$prev_menu,
5350 $Selected,$SavePick,$SaveNext,$Persists);
5351 0 delete $picks{$prev_menu};
5352 0 delete $items{$prev_menu};
5353 }
5354 0 } elsif (!$show_banner_only) {
5355 0 foreach my $key (keys %picks) {
5356 0 ▶ if (($start<=$key) || ($key<=$start+$choose_num)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($start <= $key or $key <= $start + $choose_num) 0 0 0
Condition0%0/3
$start <= $key or $key <= $start + $choose_num
l!l&&r!l&&!r
000
MC/DC0%0/2
$start <= $key or $key <= $start + $choose_num
$start <= $key $key <= $start + $choose_num
Truth table0%0/3
A or B
A= $start <= $keyB= $key <= $start + $choose_num
ABresult
1X1
011
000
5357 0 $numbor=$key;
5358 0 last;
5359 }
5360 }
5361 }
5362 0 my $next_menu_ref='';
5363 0 ▶ unless ($show_banner_only) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($show_banner_only) 0 0 0
5364 $next_menu_ref=$FullMenu->
5365 {$cur_menu}[2]
5366 0 ▶ {$all_menu_items_array[$numbor-1]}
Branch: 1 branch
BranchTrueFalseTotal
unless $filtered_menu 0 0 0
5367 unless $filtered_menu;
5368 0 ▶ $next_menu_ref||='';
Condition0%0/2
$next_menu_ref ||= ""
l!l
00
MC/DC0%0/1
$next_menu_ref ||= ""
$next_menu_ref
Truth table0%0/2
A
A= $next_menu_ref
Aresult
11
00
5369 0 ▶ delete $SavePick->{$next_menu_ref}
Branch: 1 branch
BranchTrueFalseTotal
unless $filtered_menu 0 0 0
5370 unless $filtered_menu;
5371 0 ▶ $FullMenu->{$next_menu_ref}[11]=0
Branch: 1 branch
BranchTrueFalseTotal
unless $filtered_menu 0 0 0
5372 unless $filtered_menu;
5373 %picks=() if (!$select_many &&
5374 0 ▶ !exists ${$MenuUnit_hash_ref}{Select}{$numbor});
Branch: 1 branch
BranchTrueFalseTotal
unless $select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor} 0 0 0
Condition0%0/3
$select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}
$select_many exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}
Truth table0%0/3
A or B
A= $select_manyB= exists do { $MenuUnit_hash_ref }->{"Select"}{$numbor}
ABresult
1X1
011
000
5375 0 ▶ $picks{$numbor}='-' if !(keys %picks) || $numbor!~/^[Ff]$/;
Branch: 1 branch
BranchTrueFalseTotal
unless keys %picks and $numbor =~ /^[Ff]$/ 0 0 0
Condition0%0/3
keys %picks and $numbor =~ /^[Ff]$/
!ll&&!rl&&r
000
MC/DC0%0/2
keys %picks and $numbor =~ /^[Ff]$/
keys %picks $numbor =~ /^[Ff]$/
Truth table0%0/3
A and B
A= keys %picksB= $numbor =~ /^[Ff]$/
ABresult
0X0
100
111
5376 }
5377 0 ($FullMenu,$Conveyed,$SaveNext,$Persists,$Selected,
5378 $convey,$parent_menu)
5379 =$get_result->($cur_menu,
5380 \@all_menu_items_array,\%picks,
5381 $picks_from_parent,$FullMenu,$Conveyed,$Selected,
5382 $SaveNext,$Persists,$parent_menu);
5383 0 %{$SavePick->{$cur_menu}}=%picks;
5384 0 $Conveyed->{&pw($cur_menu)}=[];
5385 0 ▶ if (0<$#{[keys %picks]}) {
Branch: 2 branches
BranchTrueFalseTotal
if (0 < $#{[keys %picks];}) { } 0 0 0
elsif ($numbor) { } 0 0 0
5386 0 foreach my $key (sort numerically keys %picks) {
5387 0 push @{$Conveyed->{&pw($cur_menu)}},
5388 $all_menu_items_array[$key-1];
5389 }
5390 } elsif ($numbor) {
5391 0 $Conveyed->{&pw($cur_menu)}=
5392 $all_menu_items_array[$numbor-1];
5393 }
5394 0 my $mcount=0;
5395 0 ▶ unless (exists $SaveMMap->{$cur_menu}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $SaveMMap->{$cur_menu}) 0 0 0
5396 0 ▶ if ($filtered_menu) {
Branch: 2 branches
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
elsif ($parent_menu) { } 0 0 0
5397 0 my $pmap=[];
5398 0 foreach my $kee (keys %{$SaveMMap}) {
5399 my $map=&Data::Dump::Streamer::Dump(
5400 0 $SaveMMap->{$kee})->Out();
5401 0 $map=~s/\$ARRAY\d*\s*=\s*//s;
5402 0 my $m=eval $map;
5403 0 ▶ $pmap=$m if $#{$pmap}<$#{$m};
Branch: 1 branch
BranchTrueFalseTotal
if $#{$pmap;} < $#{$m;} 0 0 0
5404 }
5405 0 $SaveMMap->{$cur_menu}=$pmap;
5406 $mcount=&get_Menu_map_count(
5407 0 $SaveMMap->{$cur_menu});
5408 } elsif ($parent_menu) {
5409 my $parent_map=&Data::Dump::Streamer::Dump(
5410 0 $SaveMMap->{$parent_menu})->Out();
5411 0 $parent_map=~s/\$ARRAY\d*\s*=\s*//s;
5412 0 $SaveMMap->{$cur_menu}=eval $parent_map;
5413 $mcount=&get_Menu_map_count(
5414 0 $SaveMMap->{$cur_menu});
5415 } else {
5416 0 $SaveMMap->{$cur_menu}=[];
5417 }
5418 }
5419 0 ▶ if (ref $convey eq 'ARRAY') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $convey eq 'ARRAY') { } 0 0 0
5420 0 push @{$SaveMMap->{$cur_menu}},
5421 [ ++$mcount, $convey->[0] ];
5422 } else {
5423 0 push @{$SaveMMap->{$cur_menu}},
5424 [ ++$mcount, $convey ];
5425 }
5426 0 ▶ if ($filtered_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filtered_menu) 0 0 0
5427 return $FullMenu->
5428 {$cur_menu}[2]
5429 0 {$all_menu_items_array[$numbor-1]},$convey,
5430 $recurse_level,$FullMenu,
5431 $Selected,$Conveyed,$SavePick,
5432 $SaveMMap,$SaveNext,$Persists,
5433 $cur_menu,$no_wantarray;
5434 }
5435 0 $MenuMap=$SaveMMap->{$cur_menu};
5436 0 my $returned_FullMenu='';
5437 0 my $returned_Selected='';
5438 0 my $returned_Conveyed='';
5439 0 my $returned_SavePick='';
5440 0 my $returned_SaveMMap='';
5441 0 my $returned_SaveNext='';
5442 0 my $returned_Persists='';
5443 0 my $menu_result='';
5444 0 ▶ if (exists $Selected->{$cur_menu}
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Selected->{$cur_menu}{'__FA_Banner__'}) { } 0 0 0
5445 {'__FA_Banner__'}) {
5446 $menu_result=$Selected->{$cur_menu}
5447 0 {'__FA_Banner__'};
5448 0 ▶ $menu_result=$menu_result->() if ref
Branch: 1 branch
BranchTrueFalseTotal
if ref $menu_result eq "CODE" 0 0 0
5449 $menu_result eq 'CODE';
5450 } else {
5451 $menu_result=$FullMenu->{$cur_menu}[2]
5452 0 {$all_menu_items_array[$numbor-1]};
5453 }
5454 0 eval {
5455 0 ($menu_output,$returned_FullMenu,
5456 $returned_Selected,$returned_Conveyed,
5457 $returned_SavePick,$returned_SaveMMap,
5458 $returned_SaveNext,$returned_Persists)
5459 =&Menu($menu_result,$convey,
5460 $recurse_level,$FullMenu,
5461 $Selected,$Conveyed,$SavePick,
5462 $SaveMMap,$SaveNext,$Persists,
5463 $cur_menu,$no_wantarray);
5464 }; # MENU RETURN MENURETURN 7
5465 0 ▶ print "MENU RETURN 7\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
5466 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
5467 0 ▶ if (ref $menu_output eq 'ARRAY' &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref $menu_output eq 'ARRAY' and $menu_output->[0] =~ /^[{](.*)[}][<]$/) { } 0 0 0
Condition0%0/3
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{](.*)[}][<]$/
!ll&&!rl&&r
000
MC/DC0%0/2
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{](.*)[}][<]$/
ref $menu_output eq "ARRAY" $menu_output->[0] =~ /^[{](.*)[}][<]$/
Truth table0%0/3
A and B
A= ref $menu_output eq "ARRAY"B= $menu_output->[0] =~ /^[{](.*)[}][<]$/
ABresult
0X0
100
111
5468 $menu_output->[0]=~/^[{](.*)[}][<]$/) {
5469 0 delete $Selected->{$MenuUnit_hash_ref};
5470 0 delete $Conveyed->{$MenuUnit_hash_ref};
5471 0 delete $SavePick->{$MenuUnit_hash_ref};
5472 0 delete $SaveMMap->{$MenuUnit_hash_ref};
5473 0 delete $SaveNext->{$MenuUnit_hash_ref};
5474 0 delete $Persists->{$MenuUnit_hash_ref};
5475 0 ▶ if ($1 eq $MenuUnit_hash_ref->{Name}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($1 eq $MenuUnit_hash_ref->{'Name'}) { } 0 0 0
5476 0 %picks=();
5477 0 my $remainder=0;my $curscreennum=0;
5478 0 ▶ $remainder=$num_pick % $choose_num if $num_pick;
Branch: 1 branch
BranchTrueFalseTotal
if $num_pick 0 0 0
5479 0 ▶ $curscreennum=($start+$remainder==$num_pick)?
Branch: 1 branch
BranchTrueFalseTotal
$start + $remainder == $num_pick ? : 0 0 0
5480 $start+$remainder:$start+$choose_num;
5481 0 ▶ if ($curscreennum<$MenuUnit_hash_ref->{Scroll}->[1]
Branch: 1 branch
BranchTrueFalseTotal
if ($curscreennum < $MenuUnit_hash_ref->{"Scroll"}[1] and $display_this_many_items < $num_pick - $start) 0 0 0
Condition0%0/3
$curscreennum < $MenuUnit_hash_ref->{"Scroll"}[1] and $display_this_many_items < $num_pick - $start
!ll&&!rl&&r
000
MC/DC0%0/2
$curscreennum < $MenuUnit_hash_ref->{"Scroll"}[1] and $display_this_many_items < $num_pick - $start
$curscreennum < $MenuUnit_hash_ref->{"Scroll"}[1] $display_this_many_items < $num_pick - $start
Truth table0%0/3
A and B
A= $curscreennum < $MenuUnit_hash_ref->{"Scroll"}[1]B= $display_this_many_items < $num_pick - $start
ABresult
0X0
100
111
5482 && $display_this_many_items<$num_pick-$start) {
5483 0 $start=$start+$display_this_many_items;
5484 0 $FullMenu->{$MenuUnit_hash_ref}[11]=$start;
5485 0 ▶ if ($start+$remainder==$num_pick) {
Branch: 1 branch
BranchTrueFalseTotal
if ($start + $remainder == $num_pick) { } 0 0 0
5486 0 $choose_num=$num_pick-$start;
5487 } else {
5488 0 $choose_num=$display_this_many_items;
5489 }
5490 }
5491 0 $show_banner_only=0;
5492 0 next;
5493 } else {
5494 0 delete $FullMenu->{$MenuUnit_hash_ref};
5495 0 return $menu_output,
5496 $FullMenu,$Selected,$Conveyed,
5497 $SavePick,$SaveMMap,$SaveNext,
5498 $Persists;
5499 }
5500 } else {
5501 0 $FullMenu=$returned_FullMenu;
5502 0 $Selected=$returned_Selected;
5503 0 $Conveyed=$returned_Conveyed;
5504 0 $SavePick=$returned_SavePick;
5505 0 $SaveMMap=$returned_SaveMMap;
5506 0 $SaveNext=$returned_SaveNext;
5507 0 $Persists=$returned_Persists;
5508 }
5509 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
5510 0 ▶ if ($filtered_menu) {
Branch: 6 branches
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
elsif ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE' and 1 < $recurse_level) { } 0 0 0
elsif ($menu_output) { } 0 0 0
5511 0 ▶ if (grep { /\+|\*/ } values %picks) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {/\+|\*/;} values %picks) { } 0 0 0
5512 0 return '+',
5513 $FullMenu,$Selected,$Conveyed,
5514 $SavePick,$SaveMMap,$SaveNext,
5515 $Persists;
5516 } else {
5517 0 my %sp_copy=%{$SavePick->{$parent_menu}}
5518 0 ▶ if exists $SavePick->{$parent_menu};
Branch: 1 branch
BranchTrueFalseTotal
if exists $SavePick->{$parent_menu} 0 0 0
5519 0 foreach my $key (keys %sp_copy) {
5520 $SavePick->{$parent_menu}->{$key}='-' if
5521 0 ▶ $sp_copy{$key} eq '+';
Branch: 1 branch
BranchTrueFalseTotal
if $sp_copy{$key} eq "+" 0 0 0
5522 }
5523 0 return '-',
5524 $FullMenu,$Selected,$Conveyed,
5525 $SavePick,$SaveMMap,$SaveNext,
5526 $Persists;
5527 }
5528 } elsif ($menu_output eq '-') {
5529 0 $return_from_child_menu='-';
5530 } elsif ($menu_output eq '+') {
5531 0 $return_from_child_menu='+';
5532 } elsif ($menu_output eq 'DONE_SUB') {
5533 0 return 'DONE_SUB';
5534 ▶ } elsif ($menu_output eq 'DONE' and 1<$recurse_level) {
Condition0%0/3
$menu_output eq "DONE" and 1 < $recurse_level
!ll&&!rl&&r
000
MC/DC0%0/2
$menu_output eq "DONE" and 1 < $recurse_level
$menu_output eq "DONE" 1 < $recurse_level
Truth table0%0/3
A and B
A= $menu_output eq "DONE"B= 1 < $recurse_level
ABresult
0X0
100
111
5535 0 return 'DONE';
5536 } elsif ($menu_output) {
5537 0 return $menu_output;
5538 } else {
5539 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
5540 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
5541 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
5542 defined $Net::FullAuto::FA_Core::makeplan) {
5543 #print "IN MAKEPLAN14\n";
5544 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}}
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
5545 && !exists
5546 $Net::FullAuto::FA_Core::makeplan->{'Title'}) {
5547 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}
5548 =$all_menu_items_array[$numbor-1];
5549 }
5550 0 ▶ unless ($got_default) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($got_default) 0 0 0
5551 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
5552 { Menu => &pw($MenuUnit_hash_ref),
5553 Number => $numbor,
5554 PlanID =>
5555 $Net::FullAuto::FA_Core::makeplan->{Number},
5556 0 Item => $all_menu_items_array[$numbor-1] }
5557 }
5558 }
5559 0 ▶ my $subfile=substr(
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
5560 $Term::Menus::fa_code,0,-3).'::'
5561 if $Term::Menus::fa_code;
5562 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
5563 0 foreach my $sub (&get_subs_from_menu($Selected)) {
5564 0 my @resu=();
5565 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
5566 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
5567 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
5568 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
5569 defined $Net::FullAuto::FA_Core::makeplan) {
5570 #print "IN MAKEPLAN15\n";
5571 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
5572 0 'Plan'}} && !exists
5573 $Net::FullAuto::FA_Core::makeplan->{
5574 'Title'}) {
5575 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}
5576 =$all_menu_items_array[$numbor-1];
5577 }
5578 0 my $n='Numbor';
5579 push @{$Net::FullAuto::FA_Core::makeplan->{
5580 0 'Plan'}},
5581 { Menu => &pw($MenuUnit_hash_ref),
5582 Number => $numbor,
5583 PlanID =>
5584 0 $Net::FullAuto::FA_Core::makeplan->{$n},
5585 Item =>
5586 &Data::Dump::Streamer::Dump($sub)->Out()
5587 }
5588 }
5589 0 eval { @resu=$sub->() };
5590 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
5591 0 ▶ if (10<length $@ && unpack('a11',$@) eq
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
5592 'FATAL ERROR') {
5593 0 ▶ if ($parent_menu && wantarray &&
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5594 !$no_wantarray) {
5595 0 return '',$FullMenu,$Selected,$Conveyed,
5596 $SavePick,$SaveMMap,$SaveNext,
5597 $Persists,$parent_menu,$@;
5598 }
5599 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5600 -1<index $log_handle,'*') {
5601 0 print $log_handle $@;
5602 0 close($log_handle);
5603 }
5604 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5605 0 &Net::FullAuto::FA_Core::handle_error($@);
5606 0 } else { die $@ }
5607 } else {
5608 0 my $die="\n FATAL ERROR! - The Local "
5609 ."System $Term::Menus::local_hostname "
5610 ."Conveyed\n"
5611 ." the Following "
5612 ."Unrecoverable Error Condition :\n\n"
5613 ." $@\n line ".__LINE__;
5614 0 ▶ if ($parent_menu && wantarray &&
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5615 !$no_wantarray) {
5616 0 return '',$FullMenu,$Selected,$Conveyed,
5617 $SavePick,$SaveMMap,$SaveNext,
5618 $Persists,$parent_menu,$die;
5619 }
5620 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5621 -1<index $log_handle,'*') {
5622 0 print $log_handle $die;
5623 0 close($log_handle);
5624 }
5625 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5626 0 &Net::FullAuto::FA_Core::handle_error($die);
5627 0 } else { die $die }
5628 }
5629 }
5630 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
5631 0 ▶ if ($resu[0] eq '<') {
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
5632 0 %picks=();
5633 0 $show_banner_only=0;
5634 next
5635 0 }
5636 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5637 0 return @resu;
5638 } else {
5639 0 return return_result($resu[0],
5640 $MenuUnit_hash_ref,$Conveyed);
5641 }
5642 }
5643 0 $done=1;last
5644 0 }
5645 0 eval {
5646 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
5647 0 $sub=~s/^[&]//;
5648 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
5649 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
5650 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
5651 defined $Net::FullAuto::FA_Core::makeplan) {
5652 #print "IN MAKEPLAN16\n";
5653 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
5654 0 'Plan'}} && !exists
5655 $Net::FullAuto::FA_Core::makeplan->{
5656 'Title'}) {
5657 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}
5658 =$all_menu_items_array[$numbor-1];
5659 }
5660 0 my $n='Number';
5661 push @{$Net::FullAuto::FA_Core::makeplan->{
5662 0 'Plan'}},
5663 { Menu => &pw($MenuUnit_hash_ref),
5664 Number => $numbor,
5665 PlanID =>
5666 0 $Net::FullAuto::FA_Core::makeplan->{$n},
5667 Item => "&$subfile$sub" }
5668 }
5669 0 eval "\@resu=\&$subfile$sub";
5670 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
5671 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
5672 (-1<index $firsterr,$sub)) {
5673 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
5674 0 eval "\@resu=main::$sub";
5675 } else {
5676 0 eval "\@resu=$sub";
5677 }
5678 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
5679 0 my $c=$Term::Menus::fa_code;
5680 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
5681 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}[2]
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
5682 {$all_menu_items_array[$numbor-1]}) {
5683 $die="The \"Result15 =>\" Setting"
5684 0 ."\n\t\t-> " . ${$FullMenu}
5685 {$MenuUnit_hash_ref}[2]
5686 {$all_menu_items_array[$numbor-1]}
5687 ."\n\t\tFound in the Menu Unit -> "
5688 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
5689 ."Specifies a Subroutine"
5690 ." that Does NOT Exist"
5691 ."\n\t\tin the User Code File "
5692 .$c.",\n\t\tnor was a routine with "
5693 ."that name\n\t\tlocated in the"
5694 ." main:: script.\n";
5695 } else {
5696 0 $die="$firsterr\n $seconderr"
5697 }
5698 0 } else { $die=$seconderr }
5699 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5700 0 &Net::FullAuto::FA_Core::handle_error($die);
5701 } else {
5702 0 die $die;
5703 }
5704 } elsif ($firsterr) {
5705 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5706 0 &Net::FullAuto::FA_Core::handle_error(
5707 $firsterr);
5708 } else {
5709 0 die $firsterr;
5710 }
5711 }
5712 } else {
5713 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
5714 0 $sub=~s/^[&]//;
5715 0 eval "\@resu=main::$sub";
5716 } else {
5717 0 eval "\@resu=$sub";
5718 }
5719 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
5720 }
5721 };
5722 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
5723 0 ▶ if (10<length $@ && unpack('a11',$@) eq
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
5724 'FATAL ERROR') {
5725 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5726 0 return '',$FullMenu,$Selected,$Conveyed,
5727 $SavePick,$SaveMMap,$SaveNext,
5728 $Persists,$parent_menu,$@;
5729 }
5730 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5731 -1<index $log_handle,'*') {
5732 0 print $log_handle $@;
5733 0 close($log_handle);
5734 }
5735 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5736 0 &Net::FullAuto::FA_Core::handle_error($@);
5737 0 } else { die $@ }
5738 } else {
5739 0 my $die="\n FATAL ERROR! - The Local "
5740 ."System $Term::Menus::local_hostname "
5741 ."Conveyed\n"
5742 ." the Following "
5743 ."Unrecoverable Error Condition :\n\n"
5744 ." $@\n line ".__LINE__;
5745 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5746 0 return '',$FullMenu,$Selected,$Conveyed,
5747 $SavePick,$SaveMMap,$SaveNext,
5748 $Persists,$parent_menu,$die;
5749 }
5750 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5751 -1<index $log_handle,'*') {
5752 0 print $log_handle $die;
5753 0 close($log_handle);
5754 }
5755 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5756 0 &Net::FullAuto::FA_Core::handle_error($die);
5757 0 } else { die $die }
5758 }
5759 }
5760 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
5761 0 ▶ if ($resu[0] eq '<') {
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
5762 0 %picks=();
5763 0 $show_banner_only=0;
5764 next
5765 0 }
5766 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5767 0 return @resu;
5768 } else {
5769 0 return return_result($resu[0],
5770 $MenuUnit_hash_ref,$Conveyed);
5771 }
5772 }
5773 }
5774 0 return 'DONE_SUB';
5775 }
5776 }
5777 ▶ } elsif ($FullMenu && $caller eq $callertest &&
Condition0%0/9
$FullMenu and $caller eq $callertest and $select_many || keys %{$$MenuUnit_hash_ref{"Select"};}
!ll&&!rl&&r
000
$FullMenu and $caller eq $callertest
!ll&&!rl&&r
000
$select_many or keys %{$$MenuUnit_hash_ref{"Select"};}
l!l&&r!l&&!r
000
MC/DC0%0/4
$FullMenu and $caller eq $callertest and $select_many || keys %{$$MenuUnit_hash_ref{"Select"};}
$FullMenu $caller eq $callertest $select_many keys %{$$MenuUnit_hash_ref{"Select"};}
Truth table0%0/5
A and B and C or D
A= $FullMenuB= $caller eq $callertestC= $select_manyD= keys %{$$MenuUnit_hash_ref{"Select"};}
ABCDresult
0XXX0
10XX0
11000
111X1
11011
5778 0 ($select_many || (keys %{$MenuUnit_hash_ref->{Select}}))) {
5779 0 ▶ if ($numbor!~/^[Ff]$/ && exists $picks{$numbor}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $numbor =~ /^[Ff]$/ and exists $picks{$numbor}) 0 0 0
Condition0%0/3
not $numbor =~ /^[Ff]$/ and exists $picks{$numbor}
!ll&&!rl&&r
000
MC/DC0%0/2
not $numbor =~ /^[Ff]$/ and exists $picks{$numbor}
not $numbor =~ /^[Ff]$/ exists $picks{$numbor}
Truth table0%0/3
not(A) and B
A= not $numbor =~ /^[Ff]$/B= exists $picks{$numbor}
ABresult
0X0
100
111
5780 0 ▶ if ($picks{$numbor} eq '*') {
Branch: 1 branch
BranchTrueFalseTotal
if ($picks{$numbor} eq '*') { } 0 0 0
5781 0 delete $picks{$numbor};
5782 0 delete $items{$numbor};
5783 0 delete ${$Selected}{$MenuUnit_hash_ref}{$numbor};
5784 } else {
5785 0 &delete_Selected($MenuUnit_hash_ref,$numbor,
5786 $Selected,$SavePick,$SaveNext,$Persists);
5787 0 $SaveNext={%{$SavePick}};
5788 0 delete $picks{$numbor};
5789 0 delete $items{$numbor};
5790 0 } last;
5791 }
5792 0 ▶ if (keys %{$FullMenu->{$MenuUnit_hash_ref}[2]}) {
Branch: 1 branch
BranchTrueFalseTotal
if (keys %{$$FullMenu{$MenuUnit_hash_ref}[2];}) { } 0 0 0
5793 0 ▶ $numbor=(keys %picks)[0] if $numbor=~/^[Ff]$/;
Branch: 1 branch
BranchTrueFalseTotal
if $numbor =~ /^[Ff]$/ 0 0 0
5794 my $test_result=
5795 $FullMenu->{$MenuUnit_hash_ref}[2]
5796 0 {$all_menu_items_array[$numbor-1]};
5797 0 ▶ if (ref $test_result eq 'CODE') {
Branch: 3 branches
BranchTrueFalseTotal
if (ref $test_result eq 'CODE') { } 0 0 0
elsif ($test_result and not $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*')) { } 0 0 0
elsif (not defined $pn{$numbor}[0] && exists do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}) { } 0 0 0
5798 0 my $cd='';
5799 my $sub=$FullMenu->{$MenuUnit_hash_ref}[2]
5800 0 {$all_menu_items_array[$picknum-1]};
5801 0 my $select_ed=[];
5802 0 ▶ if (0<$#{[keys %picks]}) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#{[keys %picks];}) { } 0 0 0
5803 0 foreach my $key (keys %picks) {
5804 0 push @{$select_ed}, $pn{$key}[0];
5805 }
5806 } else {
5807 0 $select_ed=$pn{$numbor}[0];
5808 }
5809 0 ▶ if ($Term::Menus::data_dump_streamer) {
Branch: 1 branch
BranchTrueFalseTotal
if ($data_dump_streamer) 0 0 0
5810 0 $cd=&Data::Dump::Streamer::Dump($sub)->Out();
5811 $cd=&transform_sicm($cd,$numbor,
5812 \@all_menu_items_array,\%picks,'',
5813 $return_from_child_menu,$log_handle,
5814 0 $MenuUnit_hash_ref->{Name});
5815 #print "CD3=$cd\n<=CD\n";<STDIN>;
5816 0 $cd=&transform_pmsi($cd,
5817 $Conveyed,$SaveMMap,
5818 $picks_from_parent);
5819 #print "CD4=$cd\n<=CD2\n";<STDIN>;
5820 }
5821 0 $cd=~s/\$CODE\d*\s*=\s*//s;
5822 0 $sub=eval $cd;
5823 0 my @resu=();
5824 0 eval { @resu=$sub->() };
5825 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
5826 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
5827 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5828 0 return '',$FullMenu,$Selected,$Conveyed,
5829 $SavePick,$SaveMMap,$SaveNext,
5830 $Persists,$parent_menu,$@;
5831 }
5832 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5833 -1<index $log_handle,'*') {
5834 0 print $log_handle $@;
5835 0 close($log_handle);
5836 }
5837 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5838 0 &Net::FullAuto::FA_Core::handle_error($@);
5839 0 } else { die $@ }
5840 } else {
5841 0 my $die="\n FATAL ERROR! - The Local "
5842 ."System $Term::Menus::local_hostname "
5843 ."Conveyed\n"
5844 ." the Following "
5845 ."Unrecoverable Error Condition :\n\n"
5846 ." $@\n line ".__LINE__;
5847 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5848 0 return '',$FullMenu,$Selected,$Conveyed,
5849 $SavePick,$SaveMMap,$SaveNext,
5850 $Persists,$parent_menu,$die;
5851 }
5852 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5853 -1<index $log_handle,'*') {
5854 0 print $log_handle $die;
5855 0 close($log_handle);
5856 }
5857 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5858 0 &Net::FullAuto::FA_Core::handle_error($die);
5859 0 } else { die $die }
5860 }
5861 }
5862 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
5863 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
5864 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5865 0 return @resu;
5866 } else {
5867 0 return return_result($resu[0],
5868 $MenuUnit_hash_ref,$Conveyed);
5869 }
5870 }
5871 ▶ } elsif ($test_result &&
Condition0%0/6
$test_result and not $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module("main", $Term::Menus::fa_code) && $picks{$numbor} ne "*")
!ll&&!rl&&r
000
$test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*')
!ll&&!rl&&r
000
MC/DC0%0/3
$test_result and not $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module("main", $Term::Menus::fa_code) && $picks{$numbor} ne "*")
$test_result $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*')
Truth table0%0/4
A and not(B && C)
A= $test_resultB= $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/C= grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*')
ABCresult
0XX0
1110
10X1
1101
5872 ($test_result!~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ ||
5873 0 ▶ (!grep { $1 eq $_ } list_module('main',
Condition0%0/3
list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*'
!ll&&!rl&&r
000
MC/DC0%0/2
list_module('main', $Term::Menus::fa_code) && $picks{$numbor} ne '*'
list_module('main', $Term::Menus::fa_code) $picks{$numbor} ne '*'
Truth table0%0/3
A && B
A= list_module('main', $Term::Menus::fa_code)B= $picks{$numbor} ne '*'
ABresult
0X0
100
111
5874 $Term::Menus::fa_code) && $picks{$numbor} ne '*'))) {
5875 0 my $die="The \"Result12 =>\" Setting\n -> "
5876 ."$test_result\n Found in the Menu "
5877 ."Unit -> ".$MenuUnit_hash_ref
5878 ."\n is NOT a Menu Unit\,"
5879 ."\ and it is NOT a Valid Subroutine.\n\n"
5880 ."\n Cannot Determine "
5881 ."if it is a Valid SubRoutine.\n\n";
5882 0 die $die;
5883 ▶ } elsif (!defined $pn{$numbor}[0] ||
Condition0%0/3
defined $pn{$numbor}[0] && exists do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $pn{$numbor}[0] && exists do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
defined $pn{$numbor}[0] exists do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
Truth table0%0/3
A && B
A= defined $pn{$numbor}[0]B= exists do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
ABresult
0X0
100
111
5884 0 !exists ${$FullMenu}{$MenuUnit_hash_ref}[2]{
5885 $pn{$numbor}[0]}) {
5886 0 my @resu=map { $all_menu_items_array[$_-1] }
5887 sort numerically keys %picks;
5888 0 push @resu,\%picks,$MenuUnit_hash_ref;
5889 0 ▶ if (wantarray && !$no_wantarray) {
Branch: 2 branches
BranchTrueFalseTotal
if (wantarray and not $no_wantarray) { } 0 0 0
elsif ($#resu == 0) { } 0 0 0
Condition0%0/3
wantarray and not $no_wantarray
!ll&&!rl&&r
000
MC/DC0%0/2
wantarray and not $no_wantarray
wantarray not $no_wantarray
Truth table0%0/3
A and not(B)
A= wantarrayB= not $no_wantarray
ABresult
0X0
100
111
5890 0 return @resu;
5891 } elsif ($#resu==0) {
5892 0 return @resu;
5893 } else {
5894 0 return \@resu;
5895 }
5896 }
5897 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}[2]
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}) 0 0 0
5898 {$pn{$numbor}[0]}) { }
5899 0 ($FullMenu,$Conveyed,$SaveNext,
5900 $Persists,$Selected,$convey,$parent_menu)
5901 =$get_result->($MenuUnit_hash_ref,
5902 \@all_menu_items_array,\%picks,$picks_from_parent,
5903 $FullMenu,$Conveyed,$Selected,$SaveNext,
5904 $Persists,$parent_menu);
5905 0 my %pick=();
5906 0 $pick{$numbor}='*';
5907 0 %{$SavePick->{$MenuUnit_hash_ref}}=%pick;
5908 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
5909 $MenuUnit_hash_ref->{'NoPlan'} ||
5910 !$MenuUnit_hash_ref->{'NoPlan'}) &&
5911 defined $Net::FullAuto::FA_Core::makeplan) {
5912 #print "IN MAKEPLAN17\n";
5913 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}} &&
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
5914 !exists
5915 $Net::FullAuto::FA_Core::makeplan->{'Title'}) {
5916 $Net::FullAuto::FA_Core::makeplan->{'Title'}
5917 0 =$pn{$numbor}[0];
5918 }
5919 0 ▶ unless ($got_default) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($got_default) 0 0 0
5920 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
5921 { Menu => &pw($MenuUnit_hash_ref),
5922 Number => $numbor,
5923 PlanID =>
5924 $Net::FullAuto::FA_Core::makeplan->{Number},
5925 0 Item => $pn{$numbor}[0] }
5926 }
5927 }
5928 0 ▶ my $subfile=substr($Term::Menus::fa_code,0,-3)
Branch: 1 branch
BranchTrueFalseTotal
if $Term::Menus::fa_code 0 0 0
5929 .'::' if $Term::Menus::fa_code;
5930 0 ▶ $subfile||='';
Condition0%0/2
$subfile ||= ""
l!l
00
MC/DC0%0/1
$subfile ||= ""
$subfile
Truth table0%0/2
A
A= $subfile
Aresult
11
00
5931 0 foreach my $sub (&get_subs_from_menu($Selected)) {
5932 0 my @resu=();
5933 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
5934 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
5935 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
5936 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
5937 defined $Net::FullAuto::FA_Core::makeplan) {
5938 #print "IN MAKEPLAN18\n";
5939 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
5940 0 'Plan'}} && !exists
5941 $Net::FullAuto::FA_Core::makeplan->{
5942 'Title'}) {
5943 $Net::FullAuto::FA_Core::makeplan->{'Title'}
5944 0 =$pn{$numbor}[0];
5945 }
5946 0 my $n='Number';
5947 push @{$Net::FullAuto::FA_Core::makeplan->{
5948 0 'Plan'}},
5949 { Menu => &pw($MenuUnit_hash_ref),
5950 Number => $numbor,
5951 PlanID =>
5952 0 $Net::FullAuto::FA_Core::makeplan->{$n},
5953 Item =>
5954 &Data::Dump::Streamer::Dump($sub)->Out()
5955 }
5956 }
5957 0 eval { @resu=$sub->() };
5958 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
5959 0 ▶ if (10<length $@ && unpack('a11',$@)
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
5960 eq 'FATAL ERROR') {
5961 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5962 0 return '',$FullMenu,$Selected,$Conveyed,
5963 $SavePick,$SaveMMap,$SaveNext,
5964 $Persists,$parent_menu,$@;
5965 }
5966 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5967 -1<index $log_handle,'*') {
5968 0 print $log_handle $@;
5969 0 close($log_handle);
5970 }
5971 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5972 0 &Net::FullAuto::FA_Core::handle_error($@);
5973 0 } else { die $@ }
5974 } else {
5975 0 my $die="\n FATAL ERROR! - The Local "
5976 ."System $Term::Menus::local_hostname "
5977 ."Conveyed\n"
5978 ." the Following "
5979 ."Unrecoverable Error Condition :\n\n"
5980 ." $@\n line ".__LINE__;
5981 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5982 0 return '',$FullMenu,$Selected,$Conveyed,
5983 $SavePick,$SaveMMap,$SaveNext,
5984 $Persists,$parent_menu,$die;
5985 }
5986 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
5987 -1<index $log_handle,'*') {
5988 0 print $log_handle $die;
5989 0 close($log_handle);
5990 }
5991 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
5992 0 &Net::FullAuto::FA_Core::handle_error($die);
5993 0 } else { die $die }
5994 }
5995 }
5996 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
5997 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
5998 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
5999 0 return @resu;
6000 } else {
6001 0 return return_result($resu[0],
6002 $MenuUnit_hash_ref,$Conveyed);
6003 }
6004 }
6005 0 $done=1;last
6006 0 }
6007 0 eval {
6008 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
6009 0 $sub=~s/^[&]//;
6010 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
6011 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
6012 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
6013 defined $Net::FullAuto::FA_Core::makeplan) {
6014 #print "IN MAKEPLAN19\n";
6015 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
6016 0 'Plan'}} && !exists
6017 $Net::FullAuto::FA_Core::makeplan->{
6018 'Title'}) {
6019 $Net::FullAuto::FA_Core::makeplan->{'Title'}
6020 0 =$pn{$numbor}[0];
6021 }
6022 0 my $n='Number';
6023 push @{$Net::FullAuto::FA_Core::makeplan->{
6024 0 'Plan'}},
6025 { Menu => &pw($MenuUnit_hash_ref),
6026 Number => $numbor,
6027 PlanID =>
6028 0 $Net::FullAuto::FA_Core::makeplan->{$n},
6029 Item => "&$subfile$sub" }
6030 }
6031 0 eval "\@resu=\&$subfile$sub";
6032 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
6033 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
6034 (-1<index $firsterr,$sub)) {
6035 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
6036 0 eval "\@resu=main::$sub";
6037 } else {
6038 0 eval "\@resu=$sub";
6039 }
6040 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
6041 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
6042 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
6043 [2]{$all_menu_items_array[$numbor-1]}) {
6044 $die="The \"Result15 =>\" Setting"
6045 0 ."\n\t\t-> " . ${$FullMenu}
6046 {$MenuUnit_hash_ref}[2]
6047 {$all_menu_items_array[$numbor-1]}
6048 ."\n\t\tFound in the Menu Unit -> "
6049 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
6050 ."Specifies a Subroutine"
6051 ." that Does NOT Exist"
6052 ."\n\t\tin the User Code File "
6053 .$Term::Menus::fa_code
6054 .",\n\t\tnor was a routine with "
6055 ."that name\n\t\tlocated in the"
6056 ." main:: script.\n";
6057 0 } else { $die="$firsterr\n $seconderr" }
6058 0 } else { $die=$seconderr }
6059 0 &Net::FullAuto::FA_Core::handle_error($die);
6060 } elsif ($firsterr) {
6061 0 &Net::FullAuto::FA_Core::handle_error($firsterr);
6062 }
6063 } else {
6064 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
6065 0 $sub=~s/^[&]//;
6066 0 eval "\@resu=main::$sub";
6067 } else {
6068 0 eval "\@resu=$sub";
6069 }
6070 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
6071 }
6072 };
6073 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
6074 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
6075 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6076 0 return '',$FullMenu,$Selected,$Conveyed,
6077 $SavePick,$SaveMMap,$SaveNext,
6078 $Persists,$parent_menu,$@;
6079 }
6080 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6081 -1<index $log_handle,'*') {
6082 0 print $log_handle $@;
6083 0 close($log_handle);
6084 }
6085 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6086 0 &Net::FullAuto::FA_Core::handle_error($@);
6087 0 } else { die $@ }
6088 } else {
6089 0 my $die="\n FATAL ERROR! - The Local "
6090 ."System $Term::Menus::local_hostname "
6091 ."Conveyed\n"
6092 ." the Following "
6093 ."Unrecoverable Error Condition :\n\n"
6094 ." $@\n line ".__LINE__;
6095 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6096 0 return '',$FullMenu,$Selected,$Conveyed,
6097 $SavePick,$SaveMMap,$SaveNext,
6098 $Persists,$parent_menu,$die;
6099 }
6100 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6101 -1<index $log_handle,'*') {
6102 0 print $log_handle $die;
6103 0 close($log_handle);
6104 }
6105 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6106 0 &Net::FullAuto::FA_Core::handle_error($die);
6107 0 } else { die $die }
6108 }
6109 }
6110 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
6111 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
6112 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6113 0 return @resu;
6114 } else {
6115 0 return return_result($resu[0],
6116 $MenuUnit_hash_ref,$Conveyed);
6117 }
6118 }
6119 0 $done=1;last
6120 0 }
6121 0 } else { $done=1;last }
6122 0 return 'DONE_SUB';
6123 ▶ } elsif (($show_banner_only && exists $MenuUnit_hash_ref->
Condition0%0/12
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "CODE" or keys %{$$FullMenu{$MenuUnit_hash_ref}[2];} and exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
l!l&&r!l&&!r
000
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "CODE"
!ll&&!rl&&r
000
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"}
!ll&&!rl&&r
000
keys %{$$FullMenu{$MenuUnit_hash_ref}[2];} and exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
!ll&&!rl&&r
000
MC/DC0%0/5
$show_banner_only and exists $MenuUnit_hash_ref->{"Result"} and ref $MenuUnit_hash_ref->{"Result"} eq "CODE" or keys %{$$FullMenu{$MenuUnit_hash_ref}[2];} and exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
$show_banner_only exists $MenuUnit_hash_ref->{"Result"} ref $MenuUnit_hash_ref->{"Result"} eq "CODE" keys %{$$FullMenu{$MenuUnit_hash_ref}[2];} exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
Truth table0%0/10
A and B and C or D and E
A= $show_banner_onlyB= exists $MenuUnit_hash_ref->{"Result"}C= ref $MenuUnit_hash_ref->{"Result"} eq "CODE"D= keys %{$$FullMenu{$MenuUnit_hash_ref}[2];}E= exists $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]}
ABCDEresult
111XX1
0XX111
10X111
110111
0XX0X0
0XX100
10X0X0
10X100
1100X0
110100
6124 {Result} && ref $MenuUnit_hash_ref->{Result}
6125 0 eq 'CODE')||(keys %{$FullMenu->{$MenuUnit_hash_ref}[2]}
6126 && exists $FullMenu->{$MenuUnit_hash_ref}[2]
6127 {$pn{$numbor}[0]})) {
6128 0 my $test_result='';
6129 0 ▶ if ($show_banner_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($show_banner_only) { } 0 0 0
6130 0 $test_result=$MenuUnit_hash_ref->{Result};
6131 0 $numbor=1;
6132 } else {
6133 $test_result=
6134 0 $FullMenu->{$MenuUnit_hash_ref}[2]{$pn{$numbor}[0]};
6135 }
6136 0 ▶ if (ref $test_result eq 'CODE') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $test_result eq 'CODE') { } 0 0 0
elsif (not $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code))) { } 0 0 0
6137 0 my @resu=();
6138 0 my $test_result_loop=$test_result;
6139 0 while (1) {
6140 0 my $look_at_test_result=
6141 &Data::Dump::Streamer::Dump(
6142 $test_result_loop)->Out();
6143 0 my $tspmi_regex=qr/\](!)?t(?:e+st[-_]*)*[p|s]*
6144 (?:r+vious[-_]*|e+lected[-_]*)
6145 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
6146 0 my $sicm_regex=
6147 qr/\](!)?s(?:e+lected[-_]*)*i*(?:t+ems[-_]*)
6148 *c*(?:u+rrent[-_]*)*m*(?:e+nu[-_]*)*\[/xi;
6149 0 my $tbii_regex=qr/\](!)?i(?:n+put[-_]*)*b*(?:a+nner[-_]*)
6150 *m*(?:e+nu[-_]*)*i*(?:t+ems[-_]*)*\[/xi;
6151 0 my $trim_look=$look_at_test_result;
6152 0 $trim_look=~s/^.*(\$CODE\d+\s*=\s*.*$)/$1/s;
6153 0 ▶ if ((($trim_look!~/Item_/s &&
Branch: 1 branch
BranchTrueFalseTotal
if (not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s or $look_at_test_result =~ /$tspmi_regex/ or $trim_look =~ /$sicm_regex/ or $trim_look =~ /$tbii_regex/) 0 0 0
Condition0%0/15
not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s or $look_at_test_result =~ /$tspmi_regex/ or $trim_look =~ /$sicm_regex/ or $trim_look =~ /$tbii_regex/
l!l&&r!l&&!r
000
not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s or $look_at_test_result =~ /$tspmi_regex/ or $trim_look =~ /$sicm_regex/
l!l&&r!l&&!r
000
not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s or $look_at_test_result =~ /$tspmi_regex/
l!l&&r!l&&!r
000
not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s
l!l&&r!l&&!r
000
$trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s
l!l&&r!l&&!r
000
MC/DC0%0/6
not $trim_look =~ /Item_/s || $trim_look =~ /[']Result['][,]/s or $trim_look =~ /=\s*[']Item_/s or $look_at_test_result =~ /$tspmi_regex/ or $trim_look =~ /$sicm_regex/ or $trim_look =~ /$tbii_regex/
$trim_look =~ /Item_/s $trim_look =~ /[']Result['][,]/s $trim_look =~ /=\s*[']Item_/s $look_at_test_result =~ /$tspmi_regex/ $trim_look =~ /$sicm_regex/ $trim_look =~ /$tbii_regex/
Truth table0%0/11
not(A || B) or C or D or E or F
A= $trim_look =~ /Item_/sB= $trim_look =~ /[']Result['][,]/sC= $trim_look =~ /=\s*[']Item_/sD= $look_at_test_result =~ /$tspmi_regex/E= $trim_look =~ /$sicm_regex/F= $trim_look =~ /$tbii_regex/
ABCDEFresult
00XXXX1
1X1XXX1
011XXX1
1X01XX1
0101XX1
1X001X1
01001X1
1X00011
0100011
1X00000
0100000
6154 $trim_look!~/[']Result['][,]/s) ||
6155 $trim_look=~/=\s*[']Item_/s) ||
6156 $look_at_test_result=~/$tspmi_regex/ ||
6157 $trim_look=~/$sicm_regex/ ||
6158 $trim_look=~/$tbii_regex/) {
6159 0 ▶ %picks=() unless $select_many;
Branch: 1 branch
BranchTrueFalseTotal
unless $select_many 0 0 0
6160 0 $picks{$numbor}='';
6161 0 ($FullMenu,$Conveyed,$SaveNext,$Persists,
6162 $Selected,$convey,$parent_menu)
6163 =$get_result->($MenuUnit_hash_ref,
6164 \@all_menu_items_array,\%picks,$picks_from_parent,
6165 $FullMenu,$Conveyed,$Selected,$SaveNext,
6166 $Persists,$parent_menu);
6167 0 ▶ my $item=($show_banner_only)?'__FA_Banner__':$numbor;
Branch: 1 branch
BranchTrueFalseTotal
$show_banner_only ? : 0 0 0
6168 $test_result_loop=
6169 $Selected->{$MenuUnit_hash_ref}->{$item}
6170 0 ▶ if $Selected->{$MenuUnit_hash_ref}->{$item};
Branch: 1 branch
BranchTrueFalseTotal
if $Selected->{$MenuUnit_hash_ref}{$item} 0 0 0
6171 0 my $cd=&Data::Dump::Streamer::Dump(
6172 $test_result_loop)->Out();
6173 0 $cd=&transform_pmsi($cd,
6174 $Conveyed,$SaveMMap,
6175 $picks_from_parent);
6176 0 $cd=&transform_mbir($cd,$Conveyed,$MenuUnit_hash_ref,
6177 $log_handle);
6178 0 $cd=~s/\$CODE\d*\s*=\s*//s;
6179 0 eval { $test_result_loop=eval $cd };
6180 }
6181 0 eval { @resu=$test_result_loop->() };
6182 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
6183 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
6184 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6185 0 return '',$FullMenu,$Selected,$Conveyed,
6186 $SavePick,$SaveMMap,$SaveNext,
6187 $Persists,$parent_menu,$@;
6188 }
6189 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6190 -1<index $log_handle,'*') {
6191 0 print $log_handle $@;
6192 0 close($log_handle);
6193 }
6194 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6195 0 &Net::FullAuto::FA_Core::handle_error($@);
6196 0 } else { die $@ }
6197 } else {
6198 0 my $die="\n FATAL ERROR! - The Local "
6199 ."System $Term::Menus::local_hostname "
6200 ."Conveyed\n"
6201 ." the Following "
6202 ."Unrecoverable Error Condition :\n\n"
6203 ." $@\n line ".__LINE__;
6204 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6205 0 return '',$FullMenu,$Selected,$Conveyed,
6206 $SavePick,$SaveMMap,$SaveNext,
6207 $Persists,$parent_menu,$die;
6208 }
6209 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6210 -1<index $log_handle,'*') {
6211 0 print $log_handle $die;
6212 0 close($log_handle);
6213 }
6214 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6215 0 &Net::FullAuto::FA_Core::handle_error($die);
6216 0 } else { die $die }
6217 }
6218 }
6219 0 ▶ if (0==$#resu && ref $resu[0] eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (0 == $#resu and ref $resu[0] eq 'CODE') { } 0 0 0
Condition0%0/3
0 == $#resu and ref $resu[0] eq "CODE"
!ll&&!rl&&r
000
MC/DC0%0/2
0 == $#resu and ref $resu[0] eq "CODE"
0 == $#resu ref $resu[0] eq "CODE"
Truth table0%0/3
A and B
A= 0 == $#resuB= ref $resu[0] eq "CODE"
ABresult
0X0
100
111
6220 0 $test_result_loop=$resu[0];
6221 0 $SaveNext->{$MenuUnit_hash_ref}=$resu[0];
6222 0 next;
6223 } else {
6224 0 last;
6225 }
6226 }
6227 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
6228 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
6229 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 2 branches
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
elsif (ref $resu[0] eq 'HASH') { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6230 0 return \@resu;
6231 } elsif (ref $resu[0] eq 'HASH') {
6232 0 ▶ if (grep { /Item_/ } keys %{$resu[0]} && $parent_menu) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {/Item_/;} keys %{$resu[0];} && $parent_menu) { } 0 0 0
Condition0%0/3
keys %{$resu[0];} && $parent_menu
!ll&&!rl&&r
000
MC/DC0%0/2
keys %{$resu[0];} && $parent_menu
keys %{$resu[0];} $parent_menu
Truth table0%0/3
A && B
A= keys %{$resu[0];}B= $parent_menu
ABresult
0X0
100
111
6233 0 ▶ if (exists $FullMenu->{$parent_menu}[2]
Branch: 1 branch
BranchTrueFalseTotal
if (exists $FullMenu->{$parent_menu}[2]{'__FA_Banner__'}) { } 0 0 0
6234 {'__FA_Banner__'}) {
6235 $FullMenu->{$MenuUnit_hash_ref}[2]
6236 0 {'__FA_Banner__'}=$resu[0];
6237 } else {
6238 $FullMenu->{$MenuUnit_hash_ref}[2]
6239 0 {$pn{$numbor}[0]}=$resu[0];
6240 }
6241 } else {
6242 0 $FullMenu->{$MenuUnit_hash_ref}[2]{'__FA_Banner__'}=
6243 $resu[0];
6244 }
6245 } else {
6246 0 return return_result($resu[0],
6247 $MenuUnit_hash_ref,$Conveyed);
6248 }
6249 }
6250 ▶ } elsif ($test_result!~/^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ ||
Condition0%0/3
$test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code))
!ll&&!rl&&r
000
MC/DC0%0/2
$test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ && grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code))
$test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/ grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code))
Truth table0%0/3
A && B
A= $test_result =~ /^&?(?:.*::)*(\w+)\s*[(]?.*[)]?\s*$/B= grep({$1 eq $_;} list_module('main', $Term::Menus::fa_code))
ABresult
0X0
100
111
6251 0 !grep { $1 eq $_ } list_module(
6252 'main',$Term::Menus::fa_code)) {
6253 0 my $die="The \"Result14 =>\" Setting\n -> "
6254 .$test_result
6255 ."\n Found in the Menu Unit -> "
6256 .$MenuUnit_hash_ref
6257 ."\n is not a Menu Unit\,"
6258 ." and not a Valid SubRoutine.\n\n";
6259 0 die $die;
6260 }
6261 0 ▶ %picks=() unless $select_many;
Branch: 1 branch
BranchTrueFalseTotal
unless $select_many 0 0 0
6262 0 $picks{$numbor}='';
6263 0 ($FullMenu,$Conveyed,$SaveNext,$Persists,
6264 $Selected,$convey,$parent_menu)
6265 =$get_result->($MenuUnit_hash_ref,
6266 \@all_menu_items_array,\%picks,$picks_from_parent,
6267 $FullMenu,$Conveyed,$Selected,$SaveNext,
6268 $Persists,$parent_menu);
6269 0 my $show_banner_only=0;
6270 0 my $test_item='';
6271 0 ▶ if (exists $Selected->{$MenuUnit_hash_ref}{'__FA_Banner__'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Selected->{$MenuUnit_hash_ref}{'__FA_Banner__'}) { } 0 0 0
6272 0 $test_item=$Selected->{$MenuUnit_hash_ref}{'__FA_Banner__'};
6273 0 $show_banner_only=1;
6274 } else {
6275 $test_item=$FullMenu->{$MenuUnit_hash_ref}[2]
6276 0 {$pn{$numbor}[0]};
6277 }
6278 0 ▶ $test_item||='';
Condition0%0/2
$test_item ||= ""
l!l
00
MC/DC0%0/1
$test_item ||= ""
$test_item
Truth table0%0/2
A
A= $test_item
Aresult
11
00
6279 0 ▶ if ((ref $test_item eq 'HASH' &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref $test_item eq "HASH" and grep {/Item_/;} keys %{$test_item;} or $show_banner_only) 0 0 0
Condition0%0/6
ref $test_item eq "HASH" and grep {/Item_/;} keys %{$test_item;} or $show_banner_only
l!l&&r!l&&!r
000
ref $test_item eq "HASH" and grep {/Item_/;} keys %{$test_item;}
!ll&&!rl&&r
000
MC/DC0%0/3
ref $test_item eq "HASH" and grep {/Item_/;} keys %{$test_item;} or $show_banner_only
ref $test_item eq "HASH" grep {/Item_/;} keys %{$test_item;} $show_banner_only
Truth table0%0/5
A and B or C
A= ref $test_item eq "HASH"B= grep {/Item_/;} keys %{$test_item;}C= $show_banner_only
ABCresult
11X1
0X11
1011
0X00
1000
6280 0 grep { /Item_/ } keys %{$test_item}) ||
6281 $show_banner_only) {
6282 0 $Conveyed->{&pw($MenuUnit_hash_ref)}=[];
6283 0 ▶ if (0<$#{[keys %picks]}) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#{[keys %picks];}) { } 0 0 0
6284 0 foreach my $key (sort numerically keys %picks) {
6285 0 push @{$Conveyed->{&pw($MenuUnit_hash_ref)}},
6286 $all_menu_items_array[$key-1];
6287 }
6288 } else {
6289 0 $Conveyed->{&pw($MenuUnit_hash_ref)}=
6290 $all_menu_items_array[$numbor-1];
6291 }
6292 0 my $mcount=0;
6293 0 ▶ unless (exists $SaveMMap->{$MenuUnit_hash_ref}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $SaveMMap->{$MenuUnit_hash_ref}) 0 0 0
6294 0 ▶ if ($filtered_menu) {
Branch: 2 branches
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
elsif ($parent_menu) { } 0 0 0
6295 0 my $pmap=[];
6296 0 foreach my $kee (keys %{$SaveMMap}) {
6297 my $map=&Data::Dump::Streamer::Dump(
6298 0 $SaveMMap->{$kee})->Out();
6299 0 $map=~s/\$ARRAY\d*\s*=\s*//s;
6300 0 my $m=eval $map;
6301 0 ▶ $pmap=$m if $#{$pmap}<$#{$m};
Branch: 1 branch
BranchTrueFalseTotal
if $#{$pmap;} < $#{$m;} 0 0 0
6302 }
6303 0 $SaveMMap->{$MenuUnit_hash_ref}=$pmap;
6304 $mcount=&get_Menu_map_count(
6305 0 $SaveMMap->{$MenuUnit_hash_ref});
6306 } elsif ($parent_menu) {
6307 my $parent_map=&Data::Dump::Streamer::Dump(
6308 0 $SaveMMap->{$parent_menu})->Out();
6309 0 $parent_map=~s/\$ARRAY\d*\s*=\s*//s;
6310 0 $SaveMMap->{$MenuUnit_hash_ref}=eval $parent_map;
6311 $mcount=&get_Menu_map_count(
6312 0 $SaveMMap->{$MenuUnit_hash_ref});
6313 } else {
6314 0 $SaveMMap->{$MenuUnit_hash_ref}=[];
6315 }
6316 }
6317 0 ▶ if (ref $convey eq 'ARRAY') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $convey eq 'ARRAY') { } 0 0 0
6318 0 push @{$SaveMMap->{$MenuUnit_hash_ref}},
6319 [ ++$mcount, $convey->[0] ];
6320 } else {
6321 0 push @{$SaveMMap->{$MenuUnit_hash_ref}},
6322 [ ++$mcount, $convey ];
6323 }
6324 0 $MenuMap=$SaveMMap->{$MenuUnit_hash_ref};
6325 0 my $returned_FullMenu='';
6326 0 my $returned_Selected='';
6327 0 my $returned_Conveyed='';
6328 0 my $returned_SavePick='';
6329 0 my $returned_SaveMMap='';
6330 0 my $returned_SaveNext='';
6331 0 my $returned_Persists='';
6332 0 my $menu_result='';
6333 0 ▶ if ($show_banner_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($show_banner_only) { } 0 0 0
6334 0 $menu_result=$test_item;
6335 } else {
6336 $menu_result=$FullMenu->{$MenuUnit_hash_ref}[2]
6337 0 {$all_menu_items_array[$numbor-1]};
6338 }
6339 $SaveNext->{$MenuUnit_hash_ref}=$menu_result
6340 0 ▶ unless exists $SaveNext->{$MenuUnit_hash_ref};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $SaveNext->{$MenuUnit_hash_ref} 0 0 0
6341 0 eval {
6342 0 ($menu_output,$returned_FullMenu,
6343 $returned_Selected,$returned_Conveyed,
6344 $returned_SavePick,$returned_SaveMMap,
6345 $returned_SaveNext,$returned_Persists)
6346 =&Menu($menu_result,$convey,
6347 $recurse_level,$FullMenu,
6348 $Selected,$Conveyed,$SavePick,
6349 $SaveMMap,$SaveNext,$Persists,
6350 $MenuUnit_hash_ref,$no_wantarray);
6351 }; # MENU RETURN MENURETURN 8
6352 0 ▶ print "MENU RETURN 8\n" if $menu_return_debug;
Branch: 1 branch
BranchTrueFalseTotal
if $menu_return_debug 0 0 0
6353 0 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
6354 0 ▶ chomp($menu_output) if !(ref $menu_output);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $menu_output 0 0 0
6355 0 my $test_for_menu_name=$MenuUnit_hash_ref->{Name};
6356 0 ▶ if ($menu_output eq '-') {
Branch: 6 branches
BranchTrueFalseTotal
if ($menu_output eq '-') { } 0 0 0
elsif ($menu_output eq '+') { } 0 0 0
elsif ($menu_output eq 'DONE_SUB') { } 0 0 0
elsif ($menu_output eq 'DONE' and 1 < $recurse_level) { } 0 0 0
elsif (ref $menu_output eq 'ARRAY' and $menu_output->[0] =~ /^[{]${test_for_menu_name}[}][<]$/) { } 0 0 0
elsif ($menu_output) { } 0 0 0
6357 0 $return_from_child_menu='-';
6358 0 next;
6359 } elsif ($menu_output eq '+') {
6360 0 $return_from_child_menu='+';
6361 0 next;
6362 } elsif ($menu_output eq 'DONE_SUB') {
6363 0 return 'DONE_SUB';
6364 ▶ } elsif ($menu_output eq 'DONE' and 1<$recurse_level) {
Condition0%0/3
$menu_output eq "DONE" and 1 < $recurse_level
!ll&&!rl&&r
000
MC/DC0%0/2
$menu_output eq "DONE" and 1 < $recurse_level
$menu_output eq "DONE" 1 < $recurse_level
Truth table0%0/3
A and B
A= $menu_output eq "DONE"B= 1 < $recurse_level
ABresult
0X0
100
111
6365 0 return 'DONE';
6366 ▶ } elsif (ref $menu_output eq 'ARRAY' &&
Condition0%0/3
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{]${test_for_menu_name}[}][<]$/
!ll&&!rl&&r
000
MC/DC0%0/2
ref $menu_output eq "ARRAY" and $menu_output->[0] =~ /^[{]${test_for_menu_name}[}][<]$/
ref $menu_output eq "ARRAY" $menu_output->[0] =~ /^[{]${test_for_menu_name}[}][<]$/
Truth table0%0/3
A and B
A= ref $menu_output eq "ARRAY"B= $menu_output->[0] =~ /^[{]${test_for_menu_name}[}][<]$/
ABresult
0X0
100
111
6367 $menu_output->[0]=~
6368 /^[{]$test_for_menu_name[}][<]$/) {
6369 0 delete $Selected->{$MenuUnit_hash_ref};
6370 0 delete $Conveyed->{$MenuUnit_hash_ref};
6371 0 delete $SavePick->{$MenuUnit_hash_ref};
6372 0 delete $SaveMMap->{$MenuUnit_hash_ref};
6373 0 delete $SaveNext->{$MenuUnit_hash_ref};
6374 0 delete $Persists->{$MenuUnit_hash_ref};
6375 delete $FullMenu->{$MenuUnit_hash_ref}[2]
6376 0 {'__FA_Banner__'};
6377 0 %picks=();
6378 $start=$FullMenu->{$MenuUnit_hash_ref}[11]-1 if
6379 0 ▶ $start+$choose_num<$FullMenu->{$MenuUnit_hash_ref}[11];
Branch: 1 branch
BranchTrueFalseTotal
if $start + $choose_num < $FullMenu->{$MenuUnit_hash_ref}[11] 0 0 0
6380 0 ▶ $choose_num=$num_pick-$start if
Branch: 1 branch
BranchTrueFalseTotal
if $display_this_many_items >= $num_pick - $start 0 0 0
6381 $display_this_many_items>=$num_pick-$start;
6382 0 next;
6383 } elsif ($menu_output) {
6384 0 return $menu_output;
6385 } else {
6386 0 $FullMenu=$returned_FullMenu;
6387 0 $Selected=$returned_Selected;
6388 0 $Conveyed=$returned_Conveyed;
6389 0 $SavePick=$returned_SavePick;
6390 0 $SaveMMap=$returned_SaveMMap;
6391 0 $SaveNext=$returned_SaveNext;
6392 0 $Persists=$returned_Persists;
6393 }
6394 }
6395 0 my %pick=();
6396 0 $pick{$numbor}='*';
6397 0 %{$SavePick->{$MenuUnit_hash_ref}}=%pick;
6398 0 ▶ my $subfile=($Term::Menus::fullauto)
Branch: 1 branch
BranchTrueFalseTotal
$Term::Menus::fullauto ? : 0 0 0
6399 ?substr($Term::Menus::fa_code,0,-3).'::'
6400 :'';
6401 0 foreach my $sub (&get_subs_from_menu($Selected)) {
6402 0 my @resu=();
6403 0 ▶ if (ref $sub eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sub eq "CODE") 0 0 0
6404 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"}
!ll&&!rl&&r
000
exists $MenuUnit_hash_ref->{'NoPlan'} && $MenuUnit_hash_ref->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists $MenuUnit_hash_ref->{"NoPlan"} && $MenuUnit_hash_ref->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists $MenuUnit_hash_ref->{'NoPlan'} $MenuUnit_hash_ref->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists $MenuUnit_hash_ref->{'NoPlan'}C= $MenuUnit_hash_ref->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
6405 $MenuUnit_hash_ref->{'NoPlan'} ||
6406 !$MenuUnit_hash_ref->{'NoPlan'}) &&
6407 defined $Net::FullAuto::FA_Core::makeplan) {
6408 #print "IN MAKEPLAN20\n";
6409 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
6410 0 'Plan'}} && !exists
6411 $Net::FullAuto::FA_Core::makeplan->{
6412 'Title'}) {
6413 $Net::FullAuto::FA_Core::makeplan->{'Title'}
6414 0 =$pn{$numbor}[0];
6415 }
6416 push @{$Net::FullAuto::FA_Core::makeplan->{
6417 0 'Plan'}},
6418 { Menu => &pw($MenuUnit_hash_ref),
6419 Number => $numbor,
6420 PlanID =>
6421 $Net::FullAuto::FA_Core::makeplan->{Number},
6422 0 Item =>
6423 &Data::Dump::Streamer::Dump($sub)->Out() }
6424 }
6425 0 eval { @resu=$sub->() };
6426 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
6427 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
6428 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6429 0 return '',$FullMenu,$Selected,$Conveyed,
6430 $SavePick,$SaveMMap,$SaveNext,
6431 $Persists,$parent_menu,$@;
6432 }
6433 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6434 -1<index $log_handle,'*') {
6435 0 print $log_handle $@;
6436 0 close($log_handle);
6437 }
6438 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6439 0 &Net::FullAuto::FA_Core::handle_error($@);
6440 0 } else { die $@ }
6441 } else {
6442 0 my $die="\n FATAL ERROR! - The Local "
6443 ."System $Term::Menus::local_hostname "
6444 ."Conveyed\n"
6445 ." the Following "
6446 ."Unrecoverable Error Condition :\n\n"
6447 ." $@\n line ".__LINE__;
6448 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6449 0 return '',$FullMenu,$Selected,$Conveyed,
6450 $SavePick,$SaveMMap,$SaveNext,
6451 $Persists,$parent_menu,$die;
6452 }
6453 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6454 -1<index $log_handle,'*') {
6455 0 print $log_handle $die;
6456 0 close($log_handle);
6457 }
6458 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6459 0 &Net::FullAuto::FA_Core::handle_error($die);
6460 0 } else { die $die }
6461 }
6462 }
6463 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
6464 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
6465 0 ▶ if ($resu[0]=~/^[{](.*)[}][<]$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] =~ /^[{](.*)[}][<]$/) 0 0 0
6466 0 ▶ if ($1 eq $MenuUnit_hash_ref->{Name}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($1 eq $MenuUnit_hash_ref->{'Name'}) { } 0 0 0
6467 0 %picks=();next;
6468 } else {
6469 0 return $resu[0];
6470 }
6471 }
6472 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6473 0 return @resu;
6474 } else {
6475 0 return return_result($resu[0],
6476 $MenuUnit_hash_ref,$Conveyed);
6477 }
6478 }
6479 0 $done=1;last
6480 0 }
6481 0 eval {
6482 0 ▶ if ($subfile) {
Branch: 1 branch
BranchTrueFalseTotal
if ($subfile) { } 0 0 0
6483 0 $sub=~s/^[&]//;
6484 0 ▶ if ($Term::Menus::fullauto && (!exists
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
6485 0 ${$MenuUnit_hash_ref}{'NoPlan'} ||
6486 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
6487 defined $Net::FullAuto::FA_Core::makeplan) {
6488 #print "IN MAKEPLAN21\n";
6489 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
6490 0 'Plan'}} && !exists
6491 $Net::FullAuto::FA_Core::makeplan->{
6492 'Title'}) {
6493 $Net::FullAuto::FA_Core::makeplan->{'Title'}
6494 0 =$pn{$numbor}[0];
6495 }
6496 0 my $n='Number';
6497 push @{$Net::FullAuto::FA_Core::makeplan->{
6498 0 'Plan'}},
6499 { Menu => &pw($MenuUnit_hash_ref),
6500 Number => $numbor,
6501 PlanID =>
6502 0 $Net::FullAuto::FA_Core::makeplan->{$n},
6503 Item => "&$subfile$sub" }
6504 }
6505 $sub=&transform_sicm($sub,$numbor,
6506 \@all_menu_items_array,\%picks,\%pn,
6507 $return_from_child_menu,$log_handle,
6508 0 $MenuUnit_hash_ref->{Name});
6509 0 $sub=&transform_pmsi($sub,
6510 $Conveyed,$SaveMMap,
6511 $picks_from_parent);
6512 0 eval "\@resu=\&$subfile$sub";
6513 0 ▶ my $firsterr=$@||'';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
6514 0 ▶ if ((-1<index $firsterr,'Undefined subroutine') &&
Branch: 2 branches
BranchTrueFalseTotal
if ((index($firsterr, 'Undefined subroutine') != -1) and (index($firsterr, $sub) != -1)) { } 0 0 0
elsif ($firsterr) { } 0 0 0
Condition0%0/3
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($firsterr, "Undefined subroutine") != -1) and (index($firsterr, $sub) != -1)
(index($firsterr, "Undefined subroutine") != -1) (index($firsterr, $sub) != -1)
Truth table0%0/3
A and B
A= (index($firsterr, "Undefined subroutine") != -1)B= (index($firsterr, $sub) != -1)
ABresult
0X0
100
111
6515 (-1<index $firsterr,$sub)) {
6516 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
6517 0 eval "\@resu=main::$sub";
6518 } else {
6519 0 eval "\@resu=$sub";
6520 }
6521 0 ▶ my $seconderr=$@||'';my $die='';
Condition0%0/2
$@ || ''
l!l
00
MC/DC0%0/1
$@ || ''
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
6522 0 ▶ if ($seconderr=~/Undefined subroutine/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seconderr =~ /Undefined subroutine/) { } 0 0 0
6523 0 ▶ if (${$FullMenu}{$MenuUnit_hash_ref}
Branch: 1 branch
BranchTrueFalseTotal
if (do { $FullMenu }->{$MenuUnit_hash_ref}[2]{$all_menu_items_array[$numbor - 1]}) { } 0 0 0
6524 [2]{$all_menu_items_array[$numbor-1]}) {
6525 $die="The \"Result15 =>\" Setting"
6526 0 ."\n\t\t-> " . ${$FullMenu}
6527 {$MenuUnit_hash_ref}[2]
6528 {$all_menu_items_array[$numbor-1]}
6529 ."\n\t\tFound in the Menu Unit -> "
6530 0 .$MenuUnit_hash_ref->{Name}."\n\t\t"
6531 ."Specifies a Subroutine"
6532 ." that Does NOT Exist"
6533 ."\n\t\tin the User Code File "
6534 .$Term::Menus::fa_code
6535 .",\n\t\tnor was a routine with "
6536 ."that name\n\t\tlocated in the"
6537 ." main:: script.\n";
6538 0 } else { $die="$firsterr\n $seconderr" }
6539 0 } else { $die=$seconderr }
6540 0 &Net::FullAuto::FA_Core::handle_error($die.
6541 "\n\n line ".__LINE__);
6542 } elsif ($firsterr) {
6543 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6544 0 &Net::FullAuto::FA_Core::handle_error($firsterr.
6545 "\n\n line ".__LINE__);
6546 } else {
6547 0 die "$firsterr\n\n line ".__LINE__;
6548 }
6549 }
6550 } else {
6551 $sub=&transform_sicm($sub,$numbor,
6552 \@all_menu_items_array,\%picks,\%pn,
6553 $return_from_child_menu,$log_handle,
6554 0 $MenuUnit_hash_ref->{Name});
6555 0 $sub=&transform_pmsi($sub,
6556 $Conveyed,$SaveMMap,
6557 $picks_from_parent);
6558 0 ▶ if ($sub!~/::/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $sub =~ /::/) { } 0 0 0
6559 0 $sub=~s/^[&]//;
6560 0 eval "\@resu=main::$sub";
6561 } else {
6562 0 eval "\@resu=$sub";
6563 }
6564 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
6565 0 my $er=$@."\n line ";
6566 0 die $er.__LINE__;
6567 }
6568 }
6569 };
6570 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
6571 0 ▶ if (10<length $@ && unpack('a11',$@) eq 'FATAL ERROR') {
Branch: 1 branch
BranchTrueFalseTotal
if (10 < length $@ and unpack('a11', $@) eq 'FATAL ERROR') { } 0 0 0
Condition0%0/3
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
!ll&&!rl&&r
000
MC/DC0%0/2
10 < length $@ and unpack("a11", $@) eq "FATAL ERROR"
10 < length $@ unpack("a11", $@) eq "FATAL ERROR"
Truth table0%0/3
A and B
A= 10 < length $@B= unpack("a11", $@) eq "FATAL ERROR"
ABresult
0X0
100
111
6572 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6573 0 return '',$FullMenu,$Selected,$Conveyed,
6574 $SavePick,$SaveMMap,$SaveNext,
6575 $Persists,$parent_menu,$@;
6576 }
6577 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6578 -1<index $log_handle,'*') {
6579 0 print $log_handle $@;
6580 0 close($log_handle);
6581 }
6582 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6583 0 &Net::FullAuto::FA_Core::handle_error($@);
6584 0 } else { die $@ }
6585 } else {
6586 0 my $die="\n FATAL ERROR! - The Local "
6587 ."System $Term::Menus::local_hostname "
6588 ."Conveyed\n"
6589 ." the Following "
6590 ."Unrecoverable Error Condition :\n\n"
6591 ." $@\n line ".__LINE__;
6592 0 ▶ if ($parent_menu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parent_menu and wantarray and not $no_wantarray) 0 0 0
Condition0%0/6
$parent_menu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
$parent_menu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
$parent_menu and wantarray and not $no_wantarray
$parent_menu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= $parent_menuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6593 0 return '',$FullMenu,$Selected,$Conveyed,
6594 $SavePick,$SaveMMap,$SaveNext,
6595 $Persists,$parent_menu,$die;
6596 }
6597 0 ▶ if (defined $log_handle &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $log_handle and index($log_handle, "*") != -1) 0 0 0
Condition0%0/3
defined $log_handle and index($log_handle, "*") != -1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $log_handle and index($log_handle, "*") != -1
defined $log_handle index($log_handle, "*") != -1
Truth table0%0/3
A and B
A= defined $log_handleB= index($log_handle, "*") != -1
ABresult
0X0
100
111
6598 -1<index $log_handle,'*') {
6599 0 print $log_handle $die;
6600 0 close($log_handle);
6601 }
6602 0 ▶ if ($Term::Menus::fullauto) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto) { } 0 0 0
6603 0 &Net::FullAuto::FA_Core::handle_error($die);
6604 0 } else { die $die }
6605 }
6606 }
6607 0 ▶ if (-1<$#resu) {
Branch: 1 branch
BranchTrueFalseTotal
if (-1 < $#resu) 0 0 0
6608 0 ▶ if ($resu[0] eq '<') { %picks=();next }
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] eq "<") 0 0 0
6609 0 ▶ if ($resu[0]=~/^[{](.*)[}][<]$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($resu[0] =~ /^[{](.*)[}][<]$/) 0 0 0
6610 0 ▶ if ($1 eq $MenuUnit_hash_ref->{Name}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($1 eq $MenuUnit_hash_ref->{'Name'}) { } 0 0 0
6611 0 %picks=();next;
6612 } else {
6613 0 return $resu[0];
6614 }
6615 }
6616 0 ▶ if (0<$#resu && wantarray && !$no_wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $#resu and wantarray and not $no_wantarray) { } 0 0 0
Condition0%0/6
0 < $#resu and wantarray and not $no_wantarray
!ll&&!rl&&r
000
0 < $#resu and wantarray
!ll&&!rl&&r
000
MC/DC0%0/3
0 < $#resu and wantarray and not $no_wantarray
0 < $#resu wantarray not $no_wantarray
Truth table0%0/4
A and B and not(C)
A= 0 < $#resuB= wantarrayC= not $no_wantarray
ABCresult
0XX0
10X0
1100
1111
6617 0 return @resu;
6618 } else {
6619 0 return return_result($resu[0],
6620 $MenuUnit_hash_ref,$Conveyed);
6621 }
6622 }
6623 0 $done=1;last
6624 0 }
6625 0 return 'DONE_SUB';
6626 ▶ } elsif ($return_from_child_menu &&
Condition0%0/3
$return_from_child_menu and not exists $SavePick->{$MenuUnit_hash_ref}{$pn{$numbor}}
!ll&&!rl&&r
000
MC/DC0%0/2
$return_from_child_menu and not exists $SavePick->{$MenuUnit_hash_ref}{$pn{$numbor}}
$return_from_child_menu not exists $SavePick->{$MenuUnit_hash_ref}{$pn{$numbor}}
Truth table0%0/3
A and not(B)
A= $return_from_child_menuB= not exists $SavePick->{$MenuUnit_hash_ref}{$pn{$numbor}}
ABresult
0X0
100
111
6627 !exists $SavePick->{$MenuUnit_hash_ref}->{$pn{$numbor}}) {
6628 0 delete_Selected($MenuUnit_hash_ref);
6629 0 $done=1;last;
6630 0 } else { $done=1 }
6631 0 ▶ last if !$return_from_child_menu;
Branch: 1 branch
BranchTrueFalseTotal
unless $return_from_child_menu 0 0 0
6632 }
6633 0 ▶ } last if $done;
Branch: 1 branch
BranchTrueFalseTotal
if $done 0 0 0
6634 }
6635 0 ▶ if ($select_many ||
Branch: 1 branch
BranchTrueFalseTotal
if ($select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{(keys %picks)[0] or ""}) 0 0 0
Condition0%0/3
$select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{(keys %picks)[0] or ""}
l!l&&r!l&&!r
000
MC/DC0%0/2
$select_many or exists do { $MenuUnit_hash_ref }->{"Select"}{(keys %picks)[0] or ""}
$select_many exists do { $MenuUnit_hash_ref }->{"Select"}{(keys %picks)[0] or ""}
Truth table0%0/3
A or B
A= $select_manyB= exists do { $MenuUnit_hash_ref }->{"Select"}{(keys %picks)[0] or ""}
ABresult
1X1
011
000
6636 0 ▶ (exists ${$MenuUnit_hash_ref}{Select}{(keys %picks)[0]||''})) {
Condition0%0/2
(keys %picks)[0] || ''
l!l
00
MC/DC0%0/1
(keys %picks)[0] || ''
(keys %picks)[0]
Truth table0%0/2
A
A= (keys %picks)[0]
Aresult
11
00
6637 0 my @picks=();
6638 0 foreach (sort numerically keys %picks) {
6639 0 my $pik=$all_menu_items_array[$_-1];
6640 0 push @picks, $pik;
6641 0 } undef @all_menu_items_array;
6642 0 ▶ if ($MenuUnit_hash_ref) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MenuUnit_hash_ref) { } 0 0 0
6643 0 push @picks,\%picks;
6644 0 push @picks,$MenuUnit_hash_ref;
6645 0 return \@picks,
6646 $FullMenu,$Selected,$Conveyed,
6647 $SavePick,$SaveMMap,$SaveNext,
6648 $Persists,$parent_menu;
6649 } else {
6650 0 return @picks;
6651 }
6652 }
6653 0 my $pick='';
6654 0 ▶ if ($filtered_menu) {
Branch: 2 branches
BranchTrueFalseTotal
if ($filtered_menu) { } 0 0 0
elsif ($numbor =~ /^\d+$/) { } 0 0 0
6655 0 $pick=${$FullMenu}{$MenuUnit_hash_ref}[10]->[$numbor-1];
6656 } elsif ($numbor=~/^\d+$/) {
6657 0 $pick=$all_menu_items_array[$numbor-1];
6658 }
6659 0 undef @all_menu_items_array;
6660 0 ▶ if ($Term::Menus::fullauto && (!exists ${$MenuUnit_hash_ref}{'NoPlan'} ||
Branch: 1 branch
BranchTrueFalseTotal
if ($Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan) 0 0 0
Condition0%0/9
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
!ll&&!rl&&r
000
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"}
!ll&&!rl&&r
000
exists do { $MenuUnit_hash_ref }->{'NoPlan'} && do { $MenuUnit_hash_ref }->{'NoPlan'}
!ll&&!rl&&r
000
MC/DC0%0/4
$Term::Menus::fullauto and not exists do { $MenuUnit_hash_ref }->{"NoPlan"} && do { $MenuUnit_hash_ref }->{"NoPlan"} and defined $Net::FullAuto::FA_Core::makeplan
$Term::Menus::fullauto exists do { $MenuUnit_hash_ref }->{'NoPlan'} do { $MenuUnit_hash_ref }->{'NoPlan'} defined $Net::FullAuto::FA_Core::makeplan
Truth table0%0/6
A and not(B && C) and D
A= $Term::Menus::fullautoB= exists do { $MenuUnit_hash_ref }->{'NoPlan'}C= do { $MenuUnit_hash_ref }->{'NoPlan'}D= defined $Net::FullAuto::FA_Core::makeplan
ABCDresult
0XXX0
111X0
10X00
11000
10X11
11011
6661 0 !${$MenuUnit_hash_ref}{'NoPlan'}) &&
6662 defined $Net::FullAuto::FA_Core::makeplan) {
6663 #print "IN MAKEPLAN23\n";
6664 0 ▶ if (-1==$#{$Net::FullAuto::FA_Core::makeplan{'Plan'}} &&
Branch: 1 branch
BranchTrueFalseTotal
if (-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}) 0 0 0
Condition0%0/3
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
!ll&&!rl&&r
000
MC/DC0%0/2
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} and not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
-1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};} not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
Truth table0%0/3
A and not(B)
A= -1 == $#{$Net::FullAuto::FA_Core::makeplan{"Plan"};}B= not exists $Net::FullAuto::FA_Core::makeplan->{"Title"}
ABresult
0X0
100
111
6665 !exists $Net::FullAuto::FA_Core::makeplan->{'Title'}) {
6666 0 $Net::FullAuto::FA_Core::makeplan->{'Title'}=$pick;
6667 }
6668 0 ▶ unless ($got_default) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($got_default) 0 0 0
6669 0 push @{$Net::FullAuto::FA_Core::makeplan->{'Plan'}},
6670 { Menu => &pw($MenuUnit_hash_ref),
6671 Number => $numbor,
6672 PlanID =>
6673 $Net::FullAuto::FA_Core::makeplan->{Number},
6674 0 Item => $pick }
6675 }
6676 }
6677 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
6678 0 return $pick,
6679 $FullMenu,$Selected,$Conveyed,
6680 $SavePick,$SaveMMap,$SaveNext,
6681 $Persists,$parent_menu;
6682 } else {
6683 0 return $pick;
6684 }
6685
6686 }
6687
6688 0 ▶sub return_result {
Subroutine return_result: not called CC=5 SCAR=34.0
Pod undocumented
6689
6690 0 my $result_string=$_[0];
6691 0 my $MenuUnit_hash_ref=$_[1];
6692 0 my $Conveyed=$_[2];
6693 0 $Conveyed->{&pw($MenuUnit_hash_ref)}=$result_string;
6694 0 my $result_array=[];
6695 0 ▶ if ((-1<index $result_string,'][[') &&
Branch: 1 branch
BranchTrueFalseTotal
if ((index($result_string, "][[") != -1) and (index($result_string, "]][") != -1)) 0 0 0
Condition0%0/3
(index($result_string, "][[") != -1) and (index($result_string, "]][") != -1)
!ll&&!rl&&r
000
MC/DC0%0/2
(index($result_string, "][[") != -1) and (index($result_string, "]][") != -1)
(index($result_string, "][[") != -1) (index($result_string, "]][") != -1)
Truth table0%0/3
A and B
A= (index($result_string, "][[") != -1)B= (index($result_string, "]][") != -1)
ABresult
0X0
100
111
6696 (-1<index $result_string,']][')) {
6697 0 $result_string=~s/^\s*\]\[\[\s*//s;
6698 0 $result_string=~s/\s*\]\]\[\s*$//s;
6699 0 my @elems=split /\s*\]\|\[\s*/,$result_string;
6700 0 foreach my $elem (@elems) {
6701 0 ▶ if (unpack('a5',$elem) eq 'eval ') {
Branch: 1 branch
BranchTrueFalseTotal
if (unpack('a5', $elem) eq 'eval ') { } 0 0 0
6702 0 $elem=unpack('x5 a*',$elem);
6703 0 push @{$result_array}, eval $elem;
6704 } else {
6705 0 push @{$result_array}, $elem;
6706 }
6707 }
6708 0 } return [ $result_string ];
6709
6710 }
6711
6712 0 ▶sub escape_quotes {
Subroutine escape_quotes: not called CC=5 SCAR=34.0
Pod undocumented
6713
6714 0 my $sub=$_[0];
6715 0 ▶ return $sub if -1==index $sub,'"';
Branch: 1 branch
BranchTrueFalseTotal
if index($sub, "\"") == -1 0 0 0
6716 0 my $routine=substr($sub,0,(index $sub,'(')+1);
6717 0 my $args=substr($sub,(index $sub,'(')+1,-1);
6718 0 $args=~s/[']/!%!'%!%/g;
6719 0 $args=~s/^\s*(["]|!%!)//;$args=~s/(["]|%!%)\s*$//;
6720 0 my @args=split /(?:["]|%!%)\s*,\s*(?:["]|!%!)/, $args;
6721 0 my @newargs=();
6722 0 foreach my $arg (@args) {
6723 0 $arg=~s/(!%!|%!%)//g;
6724 0 ▶ if ($arg=~/^[']/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($arg =~ /^[']/) { } 0 0 0
6725 0 push @newargs, $arg;
6726 } else {
6727 0 $arg=~s/["]/\\"/g;
6728 0 push @newargs, '"'.$arg.'"';
6729 }
6730 }
6731 0 $sub=$routine;
6732 0 foreach my $arg (@newargs) {
6733 0 $sub.=$arg.",";
6734 }
6735 0 chop $sub;
6736 0 $sub.=')';
6737 0 return $sub;
6738
6739 }
6740
6741 1 1;
6742
6743 package TMMemHandle;
6744
6745 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6746 0 ▶sub TIEHANDLE {
Subroutine TIEHANDLE: not called CC=1 SCAR=6.9
6747 0 my $class = shift;
6748 0 bless [], $class;
6749 }
6750
6751 0 ▶sub PRINT {
Subroutine PRINT: not called CC=1 SCAR=6.9
6752 0 my $self = shift;
6753 0 push @$self, join '', @_;
6754 }
6755
6756 0 ▶sub PRINTF {
Subroutine PRINTF: not called CC=1 SCAR=6.9
6757 0 my $self = shift;
6758 0 my $fmt = shift;
6759 0 push @$self, sprintf $fmt, @_;
6760 }
6761
6762 0 ▶sub READLINE {
Subroutine READLINE: not called CC=1 SCAR=6.9
6763 0 my $self = shift;
6764 0 shift @$self;
6765 }
6766
6767 1 1;
6768
6769 __END__;
↑ Summary