From 8f266abab84bbffb350582da08f07c824d2bd9e0 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Thu, 17 Oct 2013 19:11:27 -0500 Subject: [PATCH] 1.569 --- CREDITS | 10 +- ChangeLog | 18 +- FAQ | 96 +- INSTALL | 6 +- Makefile | 16 +- README | 8 +- VERSION | 2 +- VERSION_EXE | 2 +- W/.BUILD_EXE_TIME | 12 + .../Changes | 14 + .../MANIFEST | 0 .../META.yml | 2 +- W/Mail-IMAPClient-3.34/Makefile | 874 + .../Makefile.PL | 92 +- .../README | 24 +- W/Mail-IMAPClient-3.34/blib/arch/.exists | 0 .../blib/arch/auto/Mail/IMAPClient/.exists | 0 W/Mail-IMAPClient-3.34/blib/bin/.exists | 0 W/Mail-IMAPClient-3.34/blib/lib/Mail/.exists | 0 .../blib}/lib/Mail/IMAPClient.pm | 168 +- .../blib}/lib/Mail/IMAPClient.pod | 55 +- .../lib/Mail/IMAPClient/BodyStructure.pm | 0 .../IMAPClient/BodyStructure/Parse.grammar | 0 .../Mail/IMAPClient/BodyStructure/Parse.pm | 0 .../Mail/IMAPClient/BodyStructure/Parse.pod | 0 .../blib}/lib/Mail/IMAPClient/MessageSet.pm | 0 .../blib}/lib/Mail/IMAPClient/Thread.grammar | 0 .../blib}/lib/Mail/IMAPClient/Thread.pm | 0 .../blib}/lib/Mail/IMAPClient/Thread.pod | 0 .../blib/lib/auto/Mail/IMAPClient/.exists | 0 W/Mail-IMAPClient-3.34/blib/man1/.exists | 0 W/Mail-IMAPClient-3.34/blib/man3/.exists | 0 W/Mail-IMAPClient-3.34/blib/script/.exists | 0 .../examples/build_dist.pl | 0 .../examples/build_ldif.pl | 0 .../examples/cleanTest.pl | 0 .../examples/copy_folder.pl | 0 .../examples/cyrus_expire.pl | 0 .../examples/cyrus_expunge.pl | 0 .../examples/find_dup_msgs.pl | 0 .../examples/idle.pl | 0 .../examples/imap_to_mbox.pl | 0 .../examples/imtestExample.pl | 0 .../examples/migrate_mail2.pl | 0 .../examples/migrate_mbox.pl | 0 .../examples/populate_mailbox.pl | 0 .../examples/sharedFolder.pl | 0 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pm | 3497 ++++ .../lib/Mail/IMAPClient.pod | 3938 ++++ .../lib/Mail/IMAPClient/BodyStructure.pm | 576 + .../IMAPClient/BodyStructure/Parse.grammar | 189 + .../Mail/IMAPClient/BodyStructure/Parse.pm | 16801 ++++++++++++++++ .../Mail/IMAPClient/BodyStructure/Parse.pod | 15 + .../lib/Mail/IMAPClient/MessageSet.pm | 280 + .../lib/Mail/IMAPClient/Thread.grammar | 18 + .../lib/Mail/IMAPClient/Thread.pm | 1024 + .../lib/Mail/IMAPClient/Thread.pod | 14 + W/Mail-IMAPClient-3.34/pm_to_blib | 0 .../prepare_dist | 0 .../t/basic.t | 14 +- .../t/body_string.t | 0 .../t/bodystructure.t | 0 .../t/fetch_hash.t | 0 .../t/messageset.t | 0 .../t/pod.t | 0 .../t/simple.t | 0 .../t/thread.t | 0 .../test_template.txt | 0 W/paypal_reply/paypal_build_invoices | 4 +- W/test3.bat | 11 +- build_exe.bat | 6 +- examples/install_modules.bat | 26 +- i3 | 4 +- imapsync | 188 +- index.shtml | 125 +- perlcritic_1.out | 1983 -- perlcritic_2.out | 1117 +- perlcritic_3.out | 47 +- tests.sh | 38 +- 79 files changed, 28408 insertions(+), 2906 deletions(-) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/Changes (99%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/MANIFEST (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/META.yml (98%) create mode 100644 W/Mail-IMAPClient-3.34/Makefile rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/Makefile.PL (59%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/README (74%) create mode 100644 W/Mail-IMAPClient-3.34/blib/arch/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/arch/auto/Mail/IMAPClient/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/bin/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/lib/Mail/.exists rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient.pm (96%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient.pod (98%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/BodyStructure.pm (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/BodyStructure/Parse.grammar (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/BodyStructure/Parse.pm (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/BodyStructure/Parse.pod (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/MessageSet.pm (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/Thread.grammar (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/Thread.pm (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34/blib}/lib/Mail/IMAPClient/Thread.pod (100%) create mode 100644 W/Mail-IMAPClient-3.34/blib/lib/auto/Mail/IMAPClient/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/man1/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/man3/.exists create mode 100644 W/Mail-IMAPClient-3.34/blib/script/.exists rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/build_dist.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/build_ldif.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/cleanTest.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/copy_folder.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/cyrus_expire.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/cyrus_expunge.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/find_dup_msgs.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/idle.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/imap_to_mbox.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/imtestExample.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/migrate_mail2.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/migrate_mbox.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/populate_mailbox.pl (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/examples/sharedFolder.pl (100%) create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pm create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pod create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure.pm create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.grammar create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pm create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pod create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/MessageSet.pm create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.grammar create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pm create mode 100644 W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pod create mode 100644 W/Mail-IMAPClient-3.34/pm_to_blib rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/prepare_dist (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/basic.t (97%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/body_string.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/bodystructure.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/fetch_hash.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/messageset.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/pod.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/simple.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/t/thread.t (100%) rename W/{Mail-IMAPClient-3.33 => Mail-IMAPClient-3.34}/test_template.txt (100%) delete mode 100644 perlcritic_1.out diff --git a/CREDITS b/CREDITS index ba613d5..b3f4a37 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: CREDITS,v 1.175 2013/08/28 22:44:09 gilles Exp gilles $ +# $Id: CREDITS,v 1.177 2013/09/28 11:52:08 gilles Exp gilles $ If you want to make a donation to the author, Gilles LAMIRAL, use any of the following ways: @@ -30,6 +30,14 @@ I thank very much all of these people. I thank also very much all people who bought imapsync from the homepage but I don't cite them here. +Krul, Patrick +Found bug about trailing blanc on Win32 cache dir. + +Jonathan Daley +Contributed by giving the book +13.33 EUR "Cartoon Guide to Statistics" + + Bowman Gillianne Contributed by giving the book 8.60 EUR "L'Épreuve de l'étranger: Culture et traduction dans l'Allemagne romantique" diff --git a/ChangeLog b/ChangeLog index 9913d9b..305a232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,27 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.567 +head: 1.569 branch: locks: strict - gilles: 1.567 + gilles: 1.569 access list: symbolic names: keyword substitution: kv -total revisions: 567; selected revisions: 567 +total revisions: 569; selected revisions: 569 description: ---------------------------- -revision 1.567 locked by: gilles; +revision 1.569 locked by: gilles; +date: 2013/10/16 21:58:17; author: gilles; state: Exp; lines: +125 -39 +Fixed bug on Windows with --tmpdir "E:\TEMP". The colon was badly converted to _, ending with "E_\TEMP". +The fix also automatically moves the old cache to the new one if the new does not exist yet. +Fix. Example for --delete2foldersonly "/Junk$/" in help message. +---------------------------- +revision 1.568 +date: 2013/09/28 02:43:51; author: gilles; state: Exp; lines: +25 -13 +Bug fix. On Win32 trailing blanc in cache dir name raized an error. Blanc now move to underscore _. +---------------------------- +revision 1.567 date: 2013/09/18 20:38:10; author: gilles; state: Exp; lines: +8 -7 Fixed a warning when RFC822.SIZE is null or undef. ---------------------------- diff --git a/FAQ b/FAQ index 2902852..77870bf 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ,v 1.145 2013/09/21 21:56:33 gilles Exp gilles $ +# $Id: FAQ,v 1.150 2013/10/17 00:55:53 gilles Exp gilles $ +------------------+ | FAQ for imapsync | @@ -324,6 +324,21 @@ Two workarounds to reduce the cache directory name: 1) Use --tmpdir "D:\\temp" or simply --tmpdir "D:" +Currently (until 1.568) there is a bug with --tmpdir "D:\\temp" or "D:". +Since character : is forbidden in Windows paths the directory is transform +to convert those characters and others () to character _ +So "D:\\temp" becomes "D_\\temp". + +A fix is to change to D: before running imapsync and use --tmpdir "." +like this in a batch file: + + D: + cd \ + cd .\temp + %~dp0\imapsync.exe ... --tmpdir "." + +This bug should be fixed in release 1.569 + 2) add two equivalent entries in the etc/hosts for host1 imap.truc.org and host2 imap.trac.org. If you map the ip of imap.truc.org just with the letter a @@ -509,6 +524,37 @@ The file imapsync.pid contains the PID of the imapsync process. This file is removed at the end of a normal run. You can safely ignore the warning if you don't use imapsync.pid file. +======================================================================= +Q. Couldn't create folder [trash] from [INBOX.trash]: + 588 NO Mailbox already exists. + +R. Some servers take care about character case in folder names, + some servers do not, like Exchange. Since non-respecting case + can merge two different folders into one then imapsync respects case. + + For example, if a host1 server has a folder name called "trash" + and the host2 server already has a folder "Trash" or "TRASH" + then imapsync will try to create the folder "trash" on host2, + because trash and Trash are different strings. But if host2 + does not repect character case it will consider folder "trash" + already exists and will say it, that's the error message + reported by imapsync: "Mailbox already exists", message coming + from the server. + + The folder creation fails but messages are well transfered in + so take a look at this warning, understand why it happens + and it should be fine most of the time. + + To avoid this warning use --regextrans2 to map the folder names + + imapsync ... --regextrans2 "s/^trash$/Trash/" + + If there are two folders Trash and trash on host1 then both + will be merge into only one Trash folder on host2. + In case option --delete2 is used the regextans2 above becomes + mandatory, otherwise imapsync will sync messages from the + first Trash and then delete them when syncing trash. + ======================================================================= Q. Couldn't create [INBOX.Ops/foo/bar]: NO Invalid mailbox name: INBOX.Ops/foo/bar @@ -548,6 +594,28 @@ R1. Use it with --subscribed R2. There is also the --subscribe_all option that subscribe to all folders on host2. +======================================================================= +Q. Is there a way we can specify a date range to sync emails? + If yes, can you please share an example? + +Yes, with the --search option. + + imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010" + + Jan + Feb + Mar + Apr + May + Jun + Jul + Aug + Sep + Oct + Nov + Dec + + ======================================================================= Q. Does imapsync retain the \Answered and $Forwarded flags? @@ -792,8 +860,15 @@ Q. Flags are not well synchonized. Is it a bug? R. It happens with some servers on the first sync. Also, it was a bug from revision 1.200 to revision 1.207 -Solution: run imapsync a second time. imapsync synchronizes flags -on each run. +Two solutions: + +* Run imapsync a second time. imapsync synchronizes flags on each run. + +* Use option --syncflagsaftercopy. With this option imapsync will + also sync flags after each message transfer. Flags are already + synced during the transfer with the imap APPEND command but + option --syncflagsaftercopy does it again using the imap STORE + command. ======================================================================= Q. On Unix, some passwords contain * and " characters. Login fails. @@ -1561,6 +1636,13 @@ characters ' or " or \ to character _ underscore. You can select folders exported to imap within the gmail preferences, unselect all "System labels" depending on your needs. +======================================================================= +Q. Some of the folders are getting created with [IMAP] prefix on Google +side. How to stop creating folder with this prefix? +Any switch we can use? e.g. [IMAP]/Archive + +R. No switch in imapsync since [IMAP]/ prefix is done by Gmail, + it might be configurable with Gmail parameters. ======================================================================= Q. Synchronizing from Gmail to XXX @@ -1683,6 +1765,14 @@ To Folder [Sonja] Size: 1024546 Messages: 96 R. Just run imapsync a time like this : imapsync ... --folder Alexander +======================================================================= +Q. Migrating from or to Parallels Plex Server + +R. It depends on the OS + +Parallells Plesk Panel for Windows requires --sep2 / --prefix2 "" +Parallells Plesk Panel for Linux works with default parameters. + ======================================================================= Q. I'm migrating from WU to Cyrus, and the mail folders are under /home/user/mail but the tool copies everything in /home/user, how diff --git a/INSTALL b/INSTALL index b75f96a..bfd589b 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -# $Id: INSTALL,v 1.30 2013/07/03 04:13:52 gilles Exp gilles $ +# $Id: INSTALL,v 1.31 2013/09/28 11:11:48 gilles Exp gilles $ # # INSTALL file for imapsync # imapsync : IMAP sync or copy tool. @@ -94,10 +94,10 @@ Here is some individual module help: New Mail-IMAPClient-3.xx works very well with imapsync, Use at least Mail-IMAPClient-3.25 (previous may bug). Don't hesitate to use latest Mail-IMAPClient-3.xx - (3.xx >= 3.33 at the time of this writing) + (3.xx >= 3.34 at the time of this writing) Look at the script named "i3" in the tarball, it can be used to - run imapsync with included Mail-IMAPClient-3.33/ wherever you + run imapsync with included Mail-IMAPClient-3.34/ wherever you unpacked the imapsync tarball. diff --git a/Makefile b/Makefile index 24f59ea..9a3c96d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.129 2013/08/16 01:21:14 gilles Exp gilles $ +# $Id: Makefile,v 1.132 2013/10/17 00:55:16 gilles Exp gilles $ .PHONY: help usage all @@ -33,7 +33,7 @@ VERSION=$(shell perl -I$(IMAPClient) ./imapsync --version) VERSION_EXE=$(shell cat ./VERSION_EXE) HELLO=$(shell date;uname -a) -IMAPClient_3xx=./W/Mail-IMAPClient-3.33/lib +IMAPClient_3xx=./W/Mail-IMAPClient-3.34/lib IMAPClient=$(IMAPClient_3xx) hello: @@ -108,7 +108,7 @@ cidone: .PHONY: test tests testp testf test3xx testv3 perlcritic -perlcritic: perlcritic_3.out perlcritic_2.out perlcritic_1.out +perlcritic: perlcritic_3.out perlcritic_2.out perlcritic_1.out: imapsync perlcritic -1 imapsync > perlcritic_1.out || : @@ -174,8 +174,8 @@ test_imapsync_exe: dosify_bat time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' .prereq_win32: examples/install_modules.bat .dosify_bat - scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' - ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat' + scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/examples/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/examples/install_modules.bat' touch .prereq_win32 imapsync.exe: imapsync .prereq_win32 @@ -321,7 +321,7 @@ publish: dist upload_ks ksa PUBLIC_FILES = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \ ./index.shtml ./INSTALL \ ./VERSION ./VERSION_EXE \ -./README ./TODO +./README ./TODO ./TUTORIAL.html ./GOOD_PRACTICES.html PUBLIC_FILES_W = ./W/style.css \ ./W/TIME \ @@ -345,10 +345,10 @@ upload_lfo: /home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess sh ~/memo/lfo-rsync -upload_index: FAQ LICENSE CREDITS W/*.bat examples/*.bat examples/sync_loop_unix.sh index.shtml +upload_index: FAQ LICENSE CREDITS TUTORIAL.html GOOD_PRACTICES.html W/*.bat examples/*.bat examples/sync_loop_unix.sh index.shtml rcsdiff index.shtml FAQ LICENSE CREDITS W/*.bat examples/*.bat index.shtml validate --verbose index.shtml - rsync -avH index.shtml FAQ NOLIMIT LICENSE CREDITS root@ks.lamiral.info:/var/www/imapsync/ + rsync -avH index.shtml FAQ NOLIMIT LICENSE CREDITS TUTORIAL.html GOOD_PRACTICES.html root@ks.lamiral.info:/var/www/imapsync/ rsync -avH W/*.bat root@ks.lamiral.info:/var/www/imapsync/W/ rsync -avH examples/*.bat examples/sync_loop_unix.sh root@ks.lamiral.info:/var/www/imapsync/examples/ diff --git a/README b/README index d4c24f7..c7a06c7 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME More than 52 different IMAP server softwares supported with success, few failures. - $Revision: 1.567 $ + $Revision: 1.569 $ SYNOPSIS To synchronize imap account "foo" on "imap.truc.org" to imap account @@ -317,7 +317,7 @@ IMAP SERVERS - Hotmail since hotmail.com does not provide IMAP access - Outlook.com since outlook.com does not provide IMAP access - Success stories reported with the following 55 imap servers (software + Success stories reported with the following 57 imap servers (software names are in alphabetic order): - 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1] @@ -354,6 +354,7 @@ IMAP SERVERS - GMX IMAP4 StreamProxy. - Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ. - hMailServer 5.3.3 [host2], 4.4.1 [host1] (see FAQ) + - IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/) - iPlanet Messaging server 4.15, 5.1, 5.2 - IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] - Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1] @@ -374,6 +375,7 @@ IMAP SERVERS - OpenMail IMAP server B.07.00.k0 (Samsung Contact ?) - OpenWave - Oracle Beehive [host1] + - Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/) - Qualcomm Worldmail (NT) - QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/ - RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/ @@ -469,5 +471,5 @@ SIMILAR SOFTWARES Feedback (good or bad) will often be welcome. - $Id: imapsync,v 1.567 2013/09/18 20:38:10 gilles Exp gilles $ + $Id: imapsync,v 1.569 2013/10/16 21:58:17 gilles Exp gilles $ diff --git a/VERSION b/VERSION index 5d90355..d01ef83 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.567 +1.569 diff --git a/VERSION_EXE b/VERSION_EXE index 5d90355..d01ef83 100644 --- a/VERSION_EXE +++ b/VERSION_EXE @@ -1 +1 @@ -1.567 +1.569 diff --git a/W/.BUILD_EXE_TIME b/W/.BUILD_EXE_TIME index 0aa68f2..22d4e3a 100644 --- a/W/.BUILD_EXE_TIME +++ b/W/.BUILD_EXE_TIME @@ -246,3 +246,15 @@ 1379550371 END 1.567 : jeudi 19 septembre 2013, 02:26:11 (UTC+0200) 1379803429 BEGIN 1.567 : dimanche 22 septembre 2013, 00:43:49 (UTC+0200) 1379804324 END 1.567 : dimanche 22 septembre 2013, 00:58:44 (UTC+0200) +1380337279 BEGIN 1.568 : samedi 28 septembre 2013, 05:01:20 (UTC+0200) +1380337867 END 1.568 : samedi 28 septembre 2013, 05:11:07 (UTC+0200) +1380340560 BEGIN 1.568 : samedi 28 septembre 2013, 05:56:00 (UTC+0200) +1380341166 END 1.568 : samedi 28 septembre 2013, 06:06:06 (UTC+0200) +1380369597 BEGIN 1.568 : samedi 28 septembre 2013, 13:59:57 (UTC+0200) +1380370230 END 1.568 : samedi 28 septembre 2013, 14:10:30 (UTC+0200) +1381964425 BEGIN 1.569 : jeudi 17 octobre 2013, 01:00:25 (UTC+0200) +1381964810 BEGIN 1.569 : jeudi 17 octobre 2013, 01:06:50 (UTC+0200) +1381969720 BEGIN 1.569 : jeudi 17 octobre 2013, 02:28:40 (UTC+0200) +1381970545 END 1.569 : jeudi 17 octobre 2013, 02:42:25 (UTC+0200) +1381974866 BEGIN 1.569 : jeudi 17 octobre 2013, 03:54:26 (UTC+0200) +1381975685 END 1.569 : jeudi 17 octobre 2013, 04:08:05 (UTC+0200) diff --git a/W/Mail-IMAPClient-3.33/Changes b/W/Mail-IMAPClient-3.34/Changes similarity index 99% rename from W/Mail-IMAPClient-3.33/Changes rename to W/Mail-IMAPClient-3.34/Changes index 44dadc6..3b98562 100644 --- a/W/Mail-IMAPClient-3.33/Changes +++ b/W/Mail-IMAPClient-3.34/Changes @@ -5,6 +5,20 @@ Changes from 2.99_01 to 3.16 made by Mark Overmeer Changes from 0.09 to 2.99_01 made by David Kernen - Potential compatibility issues from 3.17+ highlighted with '*' +version 3.34: Fri, Sep 27, 2013 12:50:17 AM + - make Makefile.PL use non-interactive and document test.txt usage + - new attribute: Socketargs => [ (IO::Socket::.. args) ] + + cleanup connect() to more flexible with IO::Socket::* args + - untagged server data during send literal may cause client to hang + [Arthur Wolfe, Josh Hillman] + + _send_line() needs '+' only to know it is OK to send LITERAL data + + created _response_code_sub() to simplify _get_response() + - remove internal "Folders" cache + - Allow for RFC 6154 "IMAP LIST Extension for Special-Use Mailboxes" + [Mathias Reitinger] + + new method: folders_hash() + + deprecate: xlist_folders(), xlist() + version 3.33: Tue, May 14, 2013 10:12:43 AM - more cleanup on use of $@ and $! - cleanup get_bodystructure / get_envelope diff --git a/W/Mail-IMAPClient-3.33/MANIFEST b/W/Mail-IMAPClient-3.34/MANIFEST similarity index 100% rename from W/Mail-IMAPClient-3.33/MANIFEST rename to W/Mail-IMAPClient-3.34/MANIFEST diff --git a/W/Mail-IMAPClient-3.33/META.yml b/W/Mail-IMAPClient-3.34/META.yml similarity index 98% rename from W/Mail-IMAPClient-3.33/META.yml rename to W/Mail-IMAPClient-3.34/META.yml index bd86a12..9bad9bc 100644 --- a/W/Mail-IMAPClient-3.33/META.yml +++ b/W/Mail-IMAPClient-3.34/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Mail-IMAPClient -version: 3.33 +version: 3.34 abstract: IMAP4 client library author: - Phil Pearl (Lobbes) diff --git a/W/Mail-IMAPClient-3.34/Makefile b/W/Mail-IMAPClient-3.34/Makefile new file mode 100644 index 0000000..7a7f626 --- /dev/null +++ b/W/Mail-IMAPClient-3.34/Makefile @@ -0,0 +1,874 @@ +# This Makefile is for the Mail::IMAPClient extension to perl. +# +# It was generated automatically by MakeMaker version +# 6.55_02 (Revision: 65502) from the contents of +# Makefile.PL. Don't edit this file, edit Makefile.PL instead. +# +# ANY CHANGES MADE HERE WILL BE LOST! +# +# MakeMaker ARGV: () +# + +# MakeMaker Parameters: + +# ABSTRACT => q[IMAP4 client library] +# AUTHOR => q[Phil Pearl (Lobbes) ] +# BUILD_REQUIRES => { } +# LICENSE => q[perl] +# META_MERGE => { resources=>{ repository=>{ web=>q[http://sourceforge.net/p/mail-imapclient/git/], url=>q[git://git.code.sf.net/p/mail-imapclient/git], type=>q[git] }, homepage=>q[http://sourceforge.net/projects/mail-imapclient/], bugtracker=>{ web=>q[http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient], mailto=>q[bug-Mail-IMAPClient@rt.cpan.org] } } } +# MIN_PERL_VERSION => q[5.008] +# NAME => q[Mail::IMAPClient] +# PREREQ_PM => { IO::File=>q[0], Fcntl=>q[0], IO::Socket::INET=>q[1.26], Carp=>q[0], Parse::RecDescent=>q[1.94], List::Util=>q[0], Test::More=>q[0], MIME::Base64=>q[0], IO::Socket=>q[0], IO::Select=>q[0], File::Temp=>q[0], Errno=>q[0] } +# VERSION_FROM => q[lib/Mail/IMAPClient.pm] +# clean => { FILES=>q[test.txt] } + +# --- MakeMaker post_initialize section: + + +# --- MakeMaker const_config section: + +# These definitions are from config.sh (via /usr/lib/perl/5.10/Config.pm). +# They may have been overridden via Makefile.PL or on the command line. +AR = ar +CC = cc +CCCDLFLAGS = -fPIC +CCDLFLAGS = -Wl,-E +DLEXT = so +DLSRC = dl_dlopen.xs +EXE_EXT = +FULL_AR = /usr/bin/ar +LD = cc +LDDLFLAGS = -shared -O2 -g -L/usr/local/lib -fstack-protector +LDFLAGS = -fstack-protector -L/usr/local/lib +LIBC = /lib/libc-2.11.1.so +LIB_EXT = .a +OBJ_EXT = .o +OSNAME = linux +OSVERS = 2.6.42-37-generic +RANLIB = : +SITELIBEXP = /usr/local/share/perl/5.10.1 +SITEARCHEXP = /usr/local/lib/perl/5.10.1 +SO = so +VENDORARCHEXP = /usr/lib/perl5 +VENDORLIBEXP = /usr/share/perl5 + + +# --- MakeMaker constants section: +AR_STATIC_ARGS = cr +DIRFILESEP = / +DFSEP = $(DIRFILESEP) +NAME = Mail::IMAPClient +NAME_SYM = Mail_IMAPClient +VERSION = 3.34 +VERSION_MACRO = VERSION +VERSION_SYM = 3_34 +DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" +XS_VERSION = 3.34 +XS_VERSION_MACRO = XS_VERSION +XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" +INST_ARCHLIB = blib/arch +INST_SCRIPT = blib/script +INST_BIN = blib/bin +INST_LIB = blib/lib +INST_MAN1DIR = blib/man1 +INST_MAN3DIR = blib/man3 +MAN1EXT = 1p +MAN3EXT = 3pm +INSTALLDIRS = site +DESTDIR = +PREFIX = /usr +PERLPREFIX = $(PREFIX) +SITEPREFIX = $(PREFIX)/local +VENDORPREFIX = $(PREFIX) +INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.10 +DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) +INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.10.1 +DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) +INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5 +DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) +INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.10 +DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) +INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.10.1 +DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) +INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5 +DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) +INSTALLBIN = $(PERLPREFIX)/bin +DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) +INSTALLSITEBIN = $(SITEPREFIX)/bin +DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) +INSTALLVENDORBIN = $(VENDORPREFIX)/bin +DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) +INSTALLSCRIPT = $(PERLPREFIX)/bin +DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) +INSTALLSITESCRIPT = $(SITEPREFIX)/bin +DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT) +INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin +DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT) +INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1 +DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) +INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1 +DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) +INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1 +DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) +INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3 +DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) +INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3 +DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) +INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3 +DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) +PERL_LIB = /usr/share/perl/5.10 +PERL_ARCHLIB = /usr/lib/perl/5.10 +LIBPERL_A = libperl.a +FIRST_MAKEFILE = Makefile +MAKEFILE_OLD = Makefile.old +MAKE_APERL_FILE = Makefile.aperl +PERLMAINCC = $(CC) +PERL_INC = /usr/lib/perl/5.10/CORE +PERL = /usr/bin/perl +FULLPERL = /usr/bin/perl +ABSPERL = $(PERL) +PERLRUN = $(PERL) +FULLPERLRUN = $(FULLPERL) +ABSPERLRUN = $(ABSPERL) +PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" +PERL_CORE = 0 +PERM_DIR = 755 +PERM_RW = 644 +PERM_RWX = 755 + +MAKEMAKER = /usr/share/perl/5.10/ExtUtils/MakeMaker.pm +MM_VERSION = 6.55_02 +MM_REVISION = 65502 + +# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). +# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) +# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) +# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. +MAKE = make +FULLEXT = Mail/IMAPClient +BASEEXT = IMAPClient +PARENT_NAME = Mail +DLBASE = $(BASEEXT) +VERSION_FROM = lib/Mail/IMAPClient.pm +OBJECT = +LDFROM = $(OBJECT) +LINKTYPE = dynamic +BOOTDEP = + +# Handy lists of source code files: +XS_FILES = +C_FILES = +O_FILES = +H_FILES = +MAN1PODS = +MAN3PODS = lib/Mail/IMAPClient.pod \ + lib/Mail/IMAPClient/BodyStructure.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + lib/Mail/IMAPClient/MessageSet.pm \ + lib/Mail/IMAPClient/Thread.pod + +# Where is the Config information that we are using/depend on +CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h + +# Where to build things +INST_LIBDIR = $(INST_LIB)/Mail +INST_ARCHLIBDIR = $(INST_ARCHLIB)/Mail + +INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) +INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) + +INST_STATIC = +INST_DYNAMIC = +INST_BOOT = + +# Extra linker info +EXPORT_LIST = +PERL_ARCHIVE = +PERL_ARCHIVE_AFTER = + + +TO_INST_PM = lib/Mail/IMAPClient.pm \ + lib/Mail/IMAPClient.pod \ + lib/Mail/IMAPClient/BodyStructure.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.grammar \ + lib/Mail/IMAPClient/BodyStructure/Parse.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + lib/Mail/IMAPClient/MessageSet.pm \ + lib/Mail/IMAPClient/Thread.grammar \ + lib/Mail/IMAPClient/Thread.pm \ + lib/Mail/IMAPClient/Thread.pod + +PM_TO_BLIB = lib/Mail/IMAPClient/BodyStructure/Parse.pm \ + blib/lib/Mail/IMAPClient/BodyStructure/Parse.pm \ + lib/Mail/IMAPClient/Thread.pm \ + blib/lib/Mail/IMAPClient/Thread.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.grammar \ + blib/lib/Mail/IMAPClient/BodyStructure/Parse.grammar \ + lib/Mail/IMAPClient.pod \ + blib/lib/Mail/IMAPClient.pod \ + lib/Mail/IMAPClient/Thread.pod \ + blib/lib/Mail/IMAPClient/Thread.pod \ + lib/Mail/IMAPClient/MessageSet.pm \ + blib/lib/Mail/IMAPClient/MessageSet.pm \ + lib/Mail/IMAPClient/Thread.grammar \ + blib/lib/Mail/IMAPClient/Thread.grammar \ + lib/Mail/IMAPClient/BodyStructure.pm \ + blib/lib/Mail/IMAPClient/BodyStructure.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + blib/lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + lib/Mail/IMAPClient.pm \ + blib/lib/Mail/IMAPClient.pm + + +# --- MakeMaker platform_constants section: +MM_Unix_VERSION = 6.55_02 +PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc + + +# --- MakeMaker tool_autosplit section: +# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto +AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' -- + + + +# --- MakeMaker tool_xsubpp section: + + +# --- MakeMaker tools_other section: +SHELL = /bin/sh +CHMOD = chmod +CP = cp +MV = mv +NOOP = $(TRUE) +NOECHO = @ +RM_F = rm -f +RM_RF = rm -rf +TEST_F = test -f +TOUCH = touch +UMASK_NULL = umask 0 +DEV_NULL = > /dev/null 2>&1 +MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' -- +EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' -- +FALSE = false +TRUE = true +ECHO = echo +ECHO_N = echo -n +UNINST = 0 +VERBINST = 0 +MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' -- +DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' -- +UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' -- +WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' -- +MACROSTART = +MACROEND = +USEMAKEFILE = -f +FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' -- + + +# --- MakeMaker makemakerdflt section: +makemakerdflt : all + $(NOECHO) $(NOOP) + + +# --- MakeMaker dist section: +TAR = tar +TARFLAGS = cvf +ZIP = zip +ZIPFLAGS = -r +COMPRESS = gzip --best +SUFFIX = .gz +SHAR = shar +PREOP = $(NOECHO) $(NOOP) +POSTOP = $(NOECHO) $(NOOP) +TO_UNIX = $(NOECHO) $(NOOP) +CI = ci -u +RCS_LABEL = rcs -Nv$(VERSION_SYM): -q +DIST_CP = best +DIST_DEFAULT = tardist +DISTNAME = Mail-IMAPClient +DISTVNAME = Mail-IMAPClient-3.34 + + +# --- MakeMaker macro section: + + +# --- MakeMaker depend section: + + +# --- MakeMaker cflags section: + + +# --- MakeMaker const_loadlibs section: + + +# --- MakeMaker const_cccmd section: + + +# --- MakeMaker post_constants section: + + +# --- MakeMaker pasthru section: + +PASTHRU = LIBPERL_A="$(LIBPERL_A)"\ + LINKTYPE="$(LINKTYPE)"\ + PREFIX="$(PREFIX)" + + +# --- MakeMaker special_targets section: +.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) + +.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir + + + +# --- MakeMaker c_o section: + + +# --- MakeMaker xs_c section: + + +# --- MakeMaker xs_o section: + + +# --- MakeMaker top_targets section: +all :: pure_all manifypods + $(NOECHO) $(NOOP) + + +pure_all :: config pm_to_blib subdirs linkext + $(NOECHO) $(NOOP) + +subdirs :: $(MYEXTLIB) + $(NOECHO) $(NOOP) + +config :: $(FIRST_MAKEFILE) blibdirs + $(NOECHO) $(NOOP) + +help : + perldoc ExtUtils::MakeMaker + + +# --- MakeMaker blibdirs section: +blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists + $(NOECHO) $(NOOP) + +# Backwards compat with 6.18 through 6.25 +blibdirs.ts : blibdirs + $(NOECHO) $(NOOP) + +$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_LIBDIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR) + $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists + +$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_ARCHLIB) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB) + $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists + +$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_AUTODIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR) + $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists + +$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR) + $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists + +$(INST_BIN)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_BIN) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN) + $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists + +$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_SCRIPT) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT) + $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists + +$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_MAN1DIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR) + $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists + +$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_MAN3DIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR) + $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists + + + +# --- MakeMaker linkext section: + +linkext :: $(LINKTYPE) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dlsyms section: + + +# --- MakeMaker dynamic section: + +dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dynamic_bs section: + +BOOTSTRAP = + + +# --- MakeMaker dynamic_lib section: + + +# --- MakeMaker static section: + +## $(INST_PM) has been moved to the all: target. +## It remains here for awhile to allow for old usage: "make static" +static :: $(FIRST_MAKEFILE) $(INST_STATIC) + $(NOECHO) $(NOOP) + + +# --- MakeMaker static_lib section: + + +# --- MakeMaker manifypods section: + +POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" +POD2MAN = $(POD2MAN_EXE) + + +manifypods : pure_all \ + lib/Mail/IMAPClient/Thread.pod \ + lib/Mail/IMAPClient/MessageSet.pm \ + lib/Mail/IMAPClient/BodyStructure.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + lib/Mail/IMAPClient.pod + $(NOECHO) $(POD2MAN) --section=$(MAN3EXT) --perm_rw=$(PERM_RW) \ + lib/Mail/IMAPClient/Thread.pod $(INST_MAN3DIR)/Mail::IMAPClient::Thread.$(MAN3EXT) \ + lib/Mail/IMAPClient/MessageSet.pm $(INST_MAN3DIR)/Mail::IMAPClient::MessageSet.$(MAN3EXT) \ + lib/Mail/IMAPClient/BodyStructure.pm $(INST_MAN3DIR)/Mail::IMAPClient::BodyStructure.$(MAN3EXT) \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod $(INST_MAN3DIR)/Mail::IMAPClient::BodyStructure::Parse.$(MAN3EXT) \ + lib/Mail/IMAPClient.pod $(INST_MAN3DIR)/Mail::IMAPClient.$(MAN3EXT) + + + + +# --- MakeMaker processPL section: + + +# --- MakeMaker installbin section: + + +# --- MakeMaker subdirs section: + +# none + +# --- MakeMaker clean_subdirs section: +clean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker clean section: + +# Delete temporary files but do not touch installed files. We don't delete +# the Makefile here so a later make realclean still has a makefile to use. + +clean :: clean_subdirs + - $(RM_F) \ + *$(LIB_EXT) core \ + core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \ + core.[0-9][0-9] $(BASEEXT).bso \ + pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \ + $(BASEEXT).x $(BOOTSTRAP) \ + perl$(EXE_EXT) tmon.out \ + *$(OBJ_EXT) pm_to_blib \ + $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \ + core.[0-9][0-9][0-9][0-9][0-9] *perl.core \ + core.*perl.*.? $(MAKE_APERL_FILE) \ + perl $(BASEEXT).def \ + core.[0-9][0-9][0-9] mon.out \ + lib$(BASEEXT).def perlmain.c \ + perl.exe so_locations \ + $(BASEEXT).exp + - $(RM_RF) \ + test.txt blib + - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) + + +# --- MakeMaker realclean_subdirs section: +realclean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker realclean section: +# Delete temporary files (via clean) and also delete dist files +realclean purge :: clean realclean_subdirs + - $(RM_F) \ + $(MAKEFILE_OLD) $(FIRST_MAKEFILE) + - $(RM_RF) \ + $(DISTVNAME) + + +# --- MakeMaker metafile section: +metafile : create_distdir + $(NOECHO) $(ECHO) Generating META.yml + $(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml + $(NOECHO) $(ECHO) 'name: Mail-IMAPClient' >> META_new.yml + $(NOECHO) $(ECHO) 'version: 3.34' >> META_new.yml + $(NOECHO) $(ECHO) 'abstract: IMAP4 client library' >> META_new.yml + $(NOECHO) $(ECHO) 'author:' >> META_new.yml + $(NOECHO) $(ECHO) ' - Phil Pearl (Lobbes) ' >> META_new.yml + $(NOECHO) $(ECHO) 'license: perl' >> META_new.yml + $(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml + $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml + $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml + $(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml + $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml + $(NOECHO) $(ECHO) 'requires:' >> META_new.yml + $(NOECHO) $(ECHO) ' Carp: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' Errno: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' Fcntl: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' File::Temp: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' IO::File: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' IO::Select: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' IO::Socket: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' IO::Socket::INET: 1.26' >> META_new.yml + $(NOECHO) $(ECHO) ' List::Util: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' MIME::Base64: 0' >> META_new.yml + $(NOECHO) $(ECHO) ' Parse::RecDescent: 1.94' >> META_new.yml + $(NOECHO) $(ECHO) ' perl: 5.008' >> META_new.yml + $(NOECHO) $(ECHO) ' Test::More: 0' >> META_new.yml + $(NOECHO) $(ECHO) 'resources:' >> META_new.yml + $(NOECHO) $(ECHO) ' bugtracker:' >> META_new.yml + $(NOECHO) $(ECHO) ' mailto: bug-Mail-IMAPClient@rt.cpan.org' >> META_new.yml + $(NOECHO) $(ECHO) ' web: http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient' >> META_new.yml + $(NOECHO) $(ECHO) ' homepage: http://sourceforge.net/projects/mail-imapclient/' >> META_new.yml + $(NOECHO) $(ECHO) ' repository:' >> META_new.yml + $(NOECHO) $(ECHO) ' type: git' >> META_new.yml + $(NOECHO) $(ECHO) ' url: git://git.code.sf.net/p/mail-imapclient/git' >> META_new.yml + $(NOECHO) $(ECHO) ' web: http://sourceforge.net/p/mail-imapclient/git/' >> META_new.yml + $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml + $(NOECHO) $(ECHO) ' directory:' >> META_new.yml + $(NOECHO) $(ECHO) ' - t' >> META_new.yml + $(NOECHO) $(ECHO) ' - inc' >> META_new.yml + $(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.55_02' >> META_new.yml + $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml + $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml + $(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml + -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml + + +# --- MakeMaker signature section: +signature : + cpansign -s + + +# --- MakeMaker dist_basics section: +distclean :: realclean distcheck + $(NOECHO) $(NOOP) + +distcheck : + $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck + +skipcheck : + $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck + +manifest : + $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest + +veryclean : realclean + $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old + + + +# --- MakeMaker dist_core section: + +dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) + $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ + -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' -- + +tardist : $(DISTVNAME).tar$(SUFFIX) + $(NOECHO) $(NOOP) + +uutardist : $(DISTVNAME).tar$(SUFFIX) + uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu + +$(DISTVNAME).tar$(SUFFIX) : distdir + $(PREOP) + $(TO_UNIX) + $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(COMPRESS) $(DISTVNAME).tar + $(POSTOP) + +zipdist : $(DISTVNAME).zip + $(NOECHO) $(NOOP) + +$(DISTVNAME).zip : distdir + $(PREOP) + $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(POSTOP) + +shdist : distdir + $(PREOP) + $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar + $(RM_RF) $(DISTVNAME) + $(POSTOP) + + +# --- MakeMaker distdir section: +create_distdir : + $(RM_RF) $(DISTVNAME) + $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ + -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" + +distdir : create_distdir distmeta + $(NOECHO) $(NOOP) + + + +# --- MakeMaker dist_test section: +disttest : distdir + cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL + cd $(DISTVNAME) && $(MAKE) $(PASTHRU) + cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) + + + +# --- MakeMaker dist_ci section: + +ci : + $(PERLRUN) "-MExtUtils::Manifest=maniread" \ + -e "@all = keys %{ maniread() };" \ + -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ + -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" + + +# --- MakeMaker distmeta section: +distmeta : create_distdir metafile + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \ + -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' -- + + + +# --- MakeMaker distsignature section: +distsignature : create_distdir + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \ + -e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' -- + $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE + cd $(DISTVNAME) && cpansign -s + + + +# --- MakeMaker install section: + +install :: pure_install doc_install + $(NOECHO) $(NOOP) + +install_perl :: pure_perl_install doc_perl_install + $(NOECHO) $(NOOP) + +install_site :: pure_site_install doc_site_install + $(NOECHO) $(NOOP) + +install_vendor :: pure_vendor_install doc_vendor_install + $(NOECHO) $(NOOP) + +pure_install :: pure_$(INSTALLDIRS)_install + $(NOECHO) $(NOOP) + +doc_install :: doc_$(INSTALLDIRS)_install + $(NOECHO) $(NOOP) + +pure__install : pure_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +doc__install : doc_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +pure_perl_install :: all + $(NOECHO) umask 022; $(MOD_INSTALL) \ + $(INST_LIB) $(DESTINSTALLPRIVLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ + $(INST_BIN) $(DESTINSTALLBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(SITEARCHEXP)/auto/$(FULLEXT) + + +pure_site_install :: all + $(NOECHO) umask 02; $(MOD_INSTALL) \ + read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLSITELIB) \ + $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ + $(INST_BIN) $(DESTINSTALLSITEBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(PERL_ARCHLIB)/auto/$(FULLEXT) + +pure_vendor_install :: all + $(NOECHO) umask 022; $(MOD_INSTALL) \ + $(INST_LIB) $(DESTINSTALLVENDORLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ + $(INST_BIN) $(DESTINSTALLVENDORBIN) \ + $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) + +doc_perl_install :: all + +doc_site_install :: all + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod + -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH) + -$(NOECHO) umask 02; $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLSITELIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLSITEARCH)/perllocal.pod + +doc_vendor_install :: all + + +uninstall :: uninstall_from_$(INSTALLDIRS)dirs + $(NOECHO) $(NOOP) + +uninstall_from_perldirs :: + +uninstall_from_sitedirs :: + $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist + +uninstall_from_vendordirs :: + + + +# --- MakeMaker force section: +# Phony target to force checking subdirectories. +FORCE : + $(NOECHO) $(NOOP) + + +# --- MakeMaker perldepend section: + + +# --- MakeMaker makefile section: +# We take a very conservative approach here, but it's worth it. +# We move Makefile to Makefile.old here to avoid gnu make looping. +$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) + $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" + $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." + -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) + -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) + - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL) + $(PERLRUN) Makefile.PL + $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" + $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <==" + $(FALSE) + + + +# --- MakeMaker staticmake section: + +# --- MakeMaker makeaperl section --- +MAP_TARGET = perl +FULLPERL = /usr/bin/perl + +$(MAP_TARGET) :: static $(MAKE_APERL_FILE) + $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@ + +$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib + $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) + $(NOECHO) $(PERLRUNINST) \ + Makefile.PL DIR= \ + MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ + MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= + + +# --- MakeMaker test section: + +TEST_VERBOSE=0 +TEST_TYPE=test_$(LINKTYPE) +TEST_FILE = test.pl +TEST_FILES = t/*.t +TESTDB_SW = -d + +testdb :: testdb_$(LINKTYPE) + +test :: $(TEST_TYPE) subdirs-test + +subdirs-test :: + $(NOECHO) $(NOOP) + + +test_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) + +testdb_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) + +test_ : test_dynamic + +test_static :: test_dynamic +testdb_static :: testdb_dynamic + + +# --- MakeMaker ppd section: +# Creates a PPD (Perl Package Description) for a binary distribution. +ppd : + $(NOECHO) $(ECHO) '' > $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' IMAP4 client library' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' Phil Pearl (Lobbes) <phil@zimbra.com>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) '' >> $(DISTNAME).ppd + + +# --- MakeMaker pm_to_blib section: + +pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) + $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \ + lib/Mail/IMAPClient/BodyStructure/Parse.pm blib/lib/Mail/IMAPClient/BodyStructure/Parse.pm \ + lib/Mail/IMAPClient/Thread.pm blib/lib/Mail/IMAPClient/Thread.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.grammar blib/lib/Mail/IMAPClient/BodyStructure/Parse.grammar \ + lib/Mail/IMAPClient.pod blib/lib/Mail/IMAPClient.pod \ + lib/Mail/IMAPClient/Thread.pod blib/lib/Mail/IMAPClient/Thread.pod \ + lib/Mail/IMAPClient/MessageSet.pm blib/lib/Mail/IMAPClient/MessageSet.pm \ + lib/Mail/IMAPClient/Thread.grammar blib/lib/Mail/IMAPClient/Thread.grammar \ + lib/Mail/IMAPClient/BodyStructure.pm blib/lib/Mail/IMAPClient/BodyStructure.pm \ + lib/Mail/IMAPClient/BodyStructure/Parse.pod blib/lib/Mail/IMAPClient/BodyStructure/Parse.pod \ + lib/Mail/IMAPClient.pm blib/lib/Mail/IMAPClient.pm + $(NOECHO) $(TOUCH) pm_to_blib + + +# --- MakeMaker selfdocument section: + + +# --- MakeMaker postamble section: + + +# End. diff --git a/W/Mail-IMAPClient-3.33/Makefile.PL b/W/Mail-IMAPClient-3.34/Makefile.PL similarity index 59% rename from W/Mail-IMAPClient-3.33/Makefile.PL rename to W/Mail-IMAPClient-3.34/Makefile.PL index 1d0f5bb..0e75465 100644 --- a/W/Mail-IMAPClient-3.33/Makefile.PL +++ b/W/Mail-IMAPClient-3.34/Makefile.PL @@ -104,87 +104,35 @@ exit 0; sub set_test_data { unless ( -f "lib/Mail/IMAPClient.pm" ) { - warn "ERROR: not in installation directory\n"; + warn("ERROR: not in installation directory\n"); return; } - return if -s "./test.txt"; - - print <<'__INTRO'; -You have the option of running an extended suite of tests during -'make test'. This requires an IMAP server name, user account, and -password to test with. - -Note: this prompt will automatically timeout after 60 seconds. - -__INTRO - - # HACK: alarm() allows broken interfaces to timeout gracefully... - # - rt.cpan.org#57659: install fails when using cPanel GUI - my $yes; - eval { - local $SIG{ALRM} = sub { die "alarm\n" }; - alarm(60); - $yes = prompt "Do you want to run the extended tests? (n/y)"; - alarm(0); - }; - print "\n" if $@; - return unless ( $yes and $yes =~ /^y(?:es)?$/i ); - - unless ( open TST, '>', "./test.txt" ) { - warn "ERROR: couldn't open ./test.txt: $!\n"; + if ( -s "./test.txt" ) { + print("The file test.txt will be used for extended tests.\n"); return; } - my $server = ""; - until ($server) { - $server = - prompt "\nPlease provide the hostname or IP address of " - . "a host running an\nIMAP server (or QUIT to skip " - . "the extended tests)"; - chomp $server; - return if $server =~ /^\s*quit\s*$/i; - } + print < 1 ) } qw( # modules require(d) during runtime when applicable my %Load_Module = ( "Compress-Zlib" => "Compress::Zlib", + "INET" => "IO::Socket::INET", "SSL" => "IO::Socket::SSL", + "UNIX" => "IO::Socket::UNIX", "BodyStructure" => "Mail::IMAPClient::BodyStructure", "Envelope" => "Mail::IMAPClient::BodyStructure::Envelope", "Thread" => "Mail::IMAPClient::Thread", @@ -92,8 +94,8 @@ BEGIN { Debug Debug_fh Domain Folder Ignoresizeerrors Keepalive Maxappendstringlength Maxcommandlength Maxtemperrors Password Peek Port Prewritemethod Proxy Ranges Readmethod - Readmoremethod Reconnectretry Server Showcredentials Ssl Starttls - Supportedflags Timeout Uid User) + Readmoremethod Reconnectretry Server Showcredentials + Socketargs Ssl Starttls Supportedflags Timeout Uid User) ) { no strict 'refs'; @@ -253,7 +255,7 @@ sub Transaction { shift->Count } # remove doubles from list sub _remove_doubles(@) { my %seen; - grep { !$seen{$_}++ } @_; + grep { !$seen{ $_->{name} }++ } @_; } # the constructor: @@ -322,46 +324,45 @@ sub connect(@) { # BUG? We should restrict which keys can be passed/set here. %$self = ( %$self, @_ ) if @_; - my $server = $self->Server; - my $port = $self->Port || $self->Port( $self->Ssl ? "993" : "143" ); - my @timeout = $self->Timeout ? ( Timeout => $self->Timeout ) : (); - my $sock; + my @sockargs = $self->Timeout ? ( Timeout => $self->Timeout ) : (); + push( @sockargs, $self->Debug ? ( Debug => $self->Debug ) : () ); + + # give caller control of IO::Socket::... args to new if desired + if ( $self->Socketargs and ref $self->Socketargs eq "ARRAY" ) { + push( @sockargs, @{ $self->Socketargs } ); + } + + my $server = $self->Server; + my $port = $self->Port || $self->Port( $self->Ssl ? "993" : "143" ); + my ( $ioclass, $sock ); if ( File::Spec->file_name_is_absolute($server) ) { - $self->_debug("Connecting to unix socket $server @timeout"); - $sock = IO::Socket::UNIX->new( - Peer => $server, - Debug => $self->Debug, - @timeout - ); + $ioclass = $self->_load_module("UNIX"); + unshift( @sockargs, Peer => $server ); } else { - my $ioclass = "IO::Socket::INET"; - my @args; + unshift( + @sockargs, + PeerAddr => $server, + PeerPort => $port, + Proto => "tcp", + ); + # extra control of SSL args is supported if ( $self->Ssl ) { $ioclass = $self->_load_module("SSL"); - - # give caller control of args to new if desired - @args = - ( ref( $self->Ssl ) eq "ARRAY" ) - ? ( @{ $self->Ssl } ) - : (); + push( @sockargs, @{ $self->Ssl } ) if ref $self->Ssl eq "ARRAY"; } - - if ($ioclass) { - $self->_debug("Connecting via $ioclass to $server:$port @timeout"); - $sock = $ioclass->new( - PeerAddr => $server, - PeerPort => $port, - Proto => 'tcp', - Debug => $self->Debug, - @timeout, - @args - ); + else { + $ioclass = $self->_load_module("INET"); } } + if ($ioclass) { + $self->_debug("Connecting with $ioclass @sockargs"); + $sock = $ioclass->new(@sockargs); + } + if ($sock) { $self->_debug( "Connected to $server" . ( $! ? " errno($!)" : "" ) ); return $self->Socket($sock); @@ -668,6 +669,7 @@ sub _list_or_lsub { sub list { shift->_list_or_lsub( "LIST", @_ ) } sub lsub { shift->_list_or_lsub( "LSUB", @_ ) } +# deprecated 3.34 sub xlist { my ($self) = @_; return undef unless $self->has_capability("XLIST"); @@ -710,7 +712,7 @@ sub _folders_or_subscribed { foreach my $resp (@list) { my $rec = $self->_list_or_lsub_response_parse($resp); next unless defined $rec->{name}; - push @folders, $rec->{name}; + push @folders, $rec; } } }; @@ -722,14 +724,19 @@ sub _folders_or_subscribed { sub folders { my ( $self, $what ) = @_; - return wantarray ? @{ $self->{Folders} } : $self->{Folders} - if !$what && $self->{Folders}; - - my @folders = $self->_folders_or_subscribed( "list", $what ); - $self->{Folders} = \@folders unless $what; + my @folders = + map( $_->{name}, $self->_folders_or_subscribed( "list", $what ) ); return wantarray ? @folders : \@folders; } +sub folders_hash { + my ( $self, $what ) = @_; + + my @folders_hash = $self->_folders_or_subscribed( "list", $what ); + return wantarray ? @folders_hash : \@folders_hash; +} + +# deprecated 3.34 sub xlist_folders { my ($self) = @_; my $xlist = $self->xlist; @@ -751,7 +758,8 @@ sub xlist_folders { sub subscribed { my ( $self, $what ) = @_; - my @folders = $self->_folders_or_subscribed( "lsub", $what ); + my @folders = + map( $_->{name}, $self->_folders_or_subscribed( "lsub", $what ) ); return wantarray ? @folders : \@folders; } @@ -1328,6 +1336,44 @@ sub _imap_command_do { } } +sub _response_code_sub { + my ( $self, $tag, $good ) = @_; + + # tag/good can be a ref (compiled regex) otherwise quote it + my $qtag = ref($tag) ? $tag : defined($tag) ? quotemeta($tag) : undef; + my $qgood = ref($good) ? $good : defined($good) ? quotemeta($good) : undef; + + # using closure, a variable alias, and sub returns on first match + # - $_[0] is $o->[DATA] + # - returns list ( $code, $byemsg ) + my $getcodesub = sub { + if ( defined $qgood ) { + if ( $good eq '+' and $_[0] =~ /^$qgood/ ) { + return ($good); + } + if ( defined $qtag and $_[0] =~ /^$qtag\s+($qgood)/i ) { + return ( ref($qgood) ? $1 : uc($1) ); + } + } + if ( defined $qtag ) { + if ( $tag eq '+' and $_[0] =~ /^$qtag/ ) { + return ($tag); + } + if ( $_[0] =~ /^$qtag\s+(OK|BAD|NO)\b/i ) { + my $code = uc($1); + $self->LastError( $_[0] ) unless ( $code eq 'OK' ); + return ($code); + } + } + if ( $_[0] =~ /^\*\s+(BYE)\b/i ) { + return ( uc($1), $_[0] ); # ( 'BYE', $byemsg ) + } + return (undef); + }; + + return $getcodesub; +} + # _get_response get IMAP response optionally send data somewhere # options: # outref => GLOB|CODE - reference to send output to (see _read_line) @@ -1337,15 +1383,12 @@ sub _get_response { my $tag = shift; my $good = shift; - # tag can be a ref (compiled regex) or we quote it or default to \S+ - my $qtag = ref($tag) ? $tag : defined($tag) ? quotemeta($tag) : qr/\S+/; - my $qgood = ref($good) ? $good : defined($good) ? quotemeta($good) : undef; - - my $outref = $opt->{outref}; + my $outref = $opt->{outref}; my @readopt = defined($outref) ? ($outref) : (); + my $getcode = $self->_response_code_sub( $tag, $good ); my ( $count, $out, $code, $byemsg ) = ( $self->Count, [], undef, undef ); - until ( defined($code) ) { + until ( defined $code ) { my $output = $self->_read_line(@readopt) or return undef; $out = $output; # keep last response just in case @@ -1354,30 +1397,13 @@ sub _get_response { foreach my $o (@$output) { $self->_record( $count, $o ); $self->_is_output($o) or next; - - my $data = $o->[DATA]; - if ( $good and $good ne '+' and $data =~ /^$qtag\s+($qgood)/i ) { - $code = $1; - $code = uc($code) unless ref($good); - } - elsif ( $good and $good eq '+' and $data =~ /^$qgood/ ) { - $code = $good; - } - elsif ( $tag eq '+' and $data =~ /^$qtag/ ) { - $code = $tag; - } - elsif ( $data =~ /^$qtag\s+(OK|BAD|NO)\b/i ) { - $code = uc($1); - $self->LastError($data) unless ( $code eq 'OK' ); - } - elsif ( $data =~ /^\*\s+(BYE)\b/i ) { - $code = uc($1); - $byemsg = $data; - } + my ( $tcode, $tbyemsg ) = $getcode->( $o->[DATA] ); + $code = $tcode if ( defined $tcode ); + $byemsg = $tbyemsg if ( defined $tbyemsg ); } } - if ( defined($code) ) { + if ( defined $code ) { $code =~ s/$CR?$LF?$//o; $code = uc($code) unless ( $good and $code eq $good ); @@ -1452,8 +1478,8 @@ sub _send_line { $self->_debug("Sending literal: $first\tthen: $string"); $self->_send_line($first) or return undef; - # look for " OK|NO|BAD" or "+..." - my $code = $self->_get_response( qr(\S+), '+' ) or return undef; + # look for "+..." + my $code = $self->_get_response('+') or return undef; return undef unless $code eq '+'; } @@ -1898,7 +1924,6 @@ sub _disconnect { my $self = shift; delete $self->{CAPABILITY}; - delete $self->{Folders}; delete $self->{_IMAP4REV1}; $self->State(Unconnected); if ( my $sock = delete $self->{Socket} ) { @@ -2270,7 +2295,6 @@ sub fetch_hash { sub store { my ( $self, @a ) = @_; - delete $self->{Folders}; $self->_imap_uid_command( STORE => @a ) or return undef; return wantarray ? $self->History : $self->Results; @@ -2278,7 +2302,6 @@ sub store { sub _imap_folder_command($$@) { my ( $self, $command ) = ( shift, shift ); - delete $self->{Folders}; my $folder = $self->Massage(shift); $self->_imap_command( join ' ', $command, $folder, @_ ) @@ -2303,7 +2326,6 @@ sub myrights($) { $_[0]->_imap_folder_command( MYRIGHTS => $_[1] ) } sub close { my $self = shift; - delete $self->{Folders}; $self->_imap_command('CLOSE') or return undef; return wantarray ? $self->History : $self->Results; diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient.pod similarity index 98% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient.pod index e3dfe1e..5dce129 100644 --- a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod +++ b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient.pod @@ -1154,7 +1154,7 @@ The B method returns an array listing the available folders. It will only be successful if the object is in the I or I states. -The B argument accepts one optional argument, which is a +The B method accepts one optional argument, which is a prefix. If a prefix is supplied to the B method, then only folders beginning with the prefix will be returned. @@ -1177,7 +1177,41 @@ the L method). However, this does not match the behavior of the existing implementation, so you will need to manually exclude the parent folder from the results. -=head2 xlist_folders +=head2 folders_hash + + my @fhashes = $imap->folders_hash + or die "Could not get list of folder hashes.\n"; + +The B method accepts one optional argument, which is a +prefix. If a prefix is supplied to the B method, then +only folders beginning with the prefix will be returned. + +An array(ref) of hashes is returned that contain information about the +requested folders. Each hash contains three keys (name, attrs, delim) +and looks like the following: + + { + name => 'Mail/Box/Name', + attrs => '\Marked \HasNoChildren', + delim => '/', + } + +IMAP servers implementing RFC6154 return attributes to be used to +identify special-use mailboxes (folders). + + my $sattr_re = /\b\\(?:All|Archive|Drafts|Flagged|Junk|Sent|Trash)\b/; + foreach my $fhash (@fhashes) { + next unless ( $fhash->{attrs} =~ $sattr_re ); + print("special: $fhash->{name} : $fhash->{attrs}\n"); + } + +Version note: method added in Mail::IMAPClient 3.34 + +=head2 xlist_folders (DEPRECATED) + +This method is deprecated as of version 3.34. Please use folders_hash +instead. See RFC6154 for attributes to be used to identify +special-use mailboxes (folders). Example: @@ -3454,6 +3488,23 @@ containing the desired arguments. Version note: attribute added in Mail::IMAPClient 3.22 +=head2 Socketargs + +The arguments used in the call to IO::Socket::{UNIX|INET|SSL}->new can +be controlled by setting this attribute to an ARRAY reference +containing the desired arguments. + +For example, to always pass MultiHomed => 1 to IO::Socket::...->new +the following can be used: + + $imap = Mail::IMAPClient->new( + ..., Socketargs => [ MultiHomed => 1 ], ... + ); + +See also L for specific control of the args to IO::Socket::SSL. + +Version note: attribute added in Mail::IMAPClient 3.34 + =head2 Ssl If an IMAP connection requires SSL you can set the Ssl attribute to diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure.pm b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure.pm similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure.pm rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure.pm diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.grammar b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.grammar similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.grammar rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.grammar diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pm b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.pm similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pm rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.pm diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pod b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.pod similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pod rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/BodyStructure/Parse.pod diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/MessageSet.pm b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/MessageSet.pm similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/MessageSet.pm rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/MessageSet.pm diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.grammar b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.grammar similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.grammar rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.grammar diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pm b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.pm similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pm rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.pm diff --git a/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pod b/W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.pod similarity index 100% rename from W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pod rename to W/Mail-IMAPClient-3.34/blib/lib/Mail/IMAPClient/Thread.pod diff --git a/W/Mail-IMAPClient-3.34/blib/lib/auto/Mail/IMAPClient/.exists b/W/Mail-IMAPClient-3.34/blib/lib/auto/Mail/IMAPClient/.exists new file mode 100644 index 0000000..e69de29 diff --git a/W/Mail-IMAPClient-3.34/blib/man1/.exists b/W/Mail-IMAPClient-3.34/blib/man1/.exists new file mode 100644 index 0000000..e69de29 diff --git a/W/Mail-IMAPClient-3.34/blib/man3/.exists b/W/Mail-IMAPClient-3.34/blib/man3/.exists new file mode 100644 index 0000000..e69de29 diff --git a/W/Mail-IMAPClient-3.34/blib/script/.exists b/W/Mail-IMAPClient-3.34/blib/script/.exists new file mode 100644 index 0000000..e69de29 diff --git a/W/Mail-IMAPClient-3.33/examples/build_dist.pl b/W/Mail-IMAPClient-3.34/examples/build_dist.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/build_dist.pl rename to W/Mail-IMAPClient-3.34/examples/build_dist.pl diff --git a/W/Mail-IMAPClient-3.33/examples/build_ldif.pl b/W/Mail-IMAPClient-3.34/examples/build_ldif.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/build_ldif.pl rename to W/Mail-IMAPClient-3.34/examples/build_ldif.pl diff --git a/W/Mail-IMAPClient-3.33/examples/cleanTest.pl b/W/Mail-IMAPClient-3.34/examples/cleanTest.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/cleanTest.pl rename to W/Mail-IMAPClient-3.34/examples/cleanTest.pl diff --git a/W/Mail-IMAPClient-3.33/examples/copy_folder.pl b/W/Mail-IMAPClient-3.34/examples/copy_folder.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/copy_folder.pl rename to W/Mail-IMAPClient-3.34/examples/copy_folder.pl diff --git a/W/Mail-IMAPClient-3.33/examples/cyrus_expire.pl b/W/Mail-IMAPClient-3.34/examples/cyrus_expire.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/cyrus_expire.pl rename to W/Mail-IMAPClient-3.34/examples/cyrus_expire.pl diff --git a/W/Mail-IMAPClient-3.33/examples/cyrus_expunge.pl b/W/Mail-IMAPClient-3.34/examples/cyrus_expunge.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/cyrus_expunge.pl rename to W/Mail-IMAPClient-3.34/examples/cyrus_expunge.pl diff --git a/W/Mail-IMAPClient-3.33/examples/find_dup_msgs.pl b/W/Mail-IMAPClient-3.34/examples/find_dup_msgs.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/find_dup_msgs.pl rename to W/Mail-IMAPClient-3.34/examples/find_dup_msgs.pl diff --git a/W/Mail-IMAPClient-3.33/examples/idle.pl b/W/Mail-IMAPClient-3.34/examples/idle.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/idle.pl rename to W/Mail-IMAPClient-3.34/examples/idle.pl diff --git a/W/Mail-IMAPClient-3.33/examples/imap_to_mbox.pl b/W/Mail-IMAPClient-3.34/examples/imap_to_mbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/imap_to_mbox.pl rename to W/Mail-IMAPClient-3.34/examples/imap_to_mbox.pl diff --git a/W/Mail-IMAPClient-3.33/examples/imtestExample.pl b/W/Mail-IMAPClient-3.34/examples/imtestExample.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/imtestExample.pl rename to W/Mail-IMAPClient-3.34/examples/imtestExample.pl diff --git a/W/Mail-IMAPClient-3.33/examples/migrate_mail2.pl b/W/Mail-IMAPClient-3.34/examples/migrate_mail2.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/migrate_mail2.pl rename to W/Mail-IMAPClient-3.34/examples/migrate_mail2.pl diff --git a/W/Mail-IMAPClient-3.33/examples/migrate_mbox.pl b/W/Mail-IMAPClient-3.34/examples/migrate_mbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/migrate_mbox.pl rename to W/Mail-IMAPClient-3.34/examples/migrate_mbox.pl diff --git a/W/Mail-IMAPClient-3.33/examples/populate_mailbox.pl b/W/Mail-IMAPClient-3.34/examples/populate_mailbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/populate_mailbox.pl rename to W/Mail-IMAPClient-3.34/examples/populate_mailbox.pl diff --git a/W/Mail-IMAPClient-3.33/examples/sharedFolder.pl b/W/Mail-IMAPClient-3.34/examples/sharedFolder.pl similarity index 100% rename from W/Mail-IMAPClient-3.33/examples/sharedFolder.pl rename to W/Mail-IMAPClient-3.34/examples/sharedFolder.pl diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pm b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pm new file mode 100644 index 0000000..7a568b0 --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pm @@ -0,0 +1,3497 @@ + +# _{name} methods are undocumented and meant to be private. + +require 5.008_001; + +use strict; +use warnings; + +package Mail::IMAPClient; +our $VERSION = '3.34'; + +use Mail::IMAPClient::MessageSet; + +use IO::Socket qw(:crlf SOL_SOCKET SO_KEEPALIVE); +use IO::Select (); +use Carp qw(carp); #local $SIG{__WARN__} = \&Carp::cluck; #DEBUG + +use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); +use Errno qw(EAGAIN EBADF ECONNRESET EPIPE); +use List::Util qw(first min max sum); +use MIME::Base64 qw(encode_base64 decode_base64); +use File::Spec (); + +use constant APPEND_BUFFER_SIZE => 1024 * 1024; + +use constant { + Unconnected => 0, + Connected => 1, # connected; not logged in + Authenticated => 2, # logged in; no mailbox selected + Selected => 3, # mailbox selected +}; + +use constant { + INDEX => 0, # Array index for output line number + TYPE => 1, # Array index for line type (OUTPUT, INPUT, or LITERAL) + DATA => 2, # Array index for output line data +}; + +use constant NonFolderArg => 1; # for Massage indicating non-folder arguments + +my %SEARCH_KEYS = map { ( $_ => 1 ) } qw( + ALL ANSWERED BCC BEFORE BODY CC DELETED DRAFT FLAGGED + FROM HEADER KEYWORD LARGER NEW NOT OLD ON OR RECENT + SEEN SENTBEFORE SENTON SENTSINCE SINCE SMALLER SUBJECT + TEXT TO UID UNANSWERED UNDELETED UNDRAFT UNFLAGGED + UNKEYWORD UNSEEN); + +# modules require(d) during runtime when applicable +my %Load_Module = ( + "Compress-Zlib" => "Compress::Zlib", + "INET" => "IO::Socket::INET", + "SSL" => "IO::Socket::SSL", + "UNIX" => "IO::Socket::UNIX", + "BodyStructure" => "Mail::IMAPClient::BodyStructure", + "Envelope" => "Mail::IMAPClient::BodyStructure::Envelope", + "Thread" => "Mail::IMAPClient::Thread", +); + +sub _load_module { + my $self = shift; + my $modkey = shift; + my $module = $Load_Module{$modkey} || $modkey; + + my $err = do { + local ($@); + eval "require $module"; + $@; + }; + if ($err) { + $self->LastError("Unable to load '$module': $err"); + return undef; + } + return $module; +} + +sub _debug { + my $self = shift; + return unless $self->Debug; + + my $text = join '', @_; + $text =~ s/$CRLF/\n /og; + $text =~ s/\s*$/\n/; + + #use POSIX (); $text = POSIX::strftime("%F %T ", localtime).$text; #DEBUG + my $fh = $self->{Debug_fh} || \*STDERR; + print $fh $text; +} + +BEGIN { + + # set-up accessors + foreach my $datum ( + qw(Authcallback Authmechanism Authuser Buffer Count Compress + Debug Debug_fh Domain Folder Ignoresizeerrors Keepalive + Maxappendstringlength Maxcommandlength Maxtemperrors + Password Peek Port Prewritemethod Proxy Ranges Readmethod + Readmoremethod Reconnectretry Server Showcredentials + Socketargs Ssl Starttls Supportedflags Timeout Uid User) + ) + { + no strict 'refs'; + *$datum = sub { + @_ > 1 ? ( $_[0]->{$datum} = $_[1] ) : $_[0]->{$datum}; + }; + } +} + +sub LastError { + my $self = shift; + @_ or return $self->{LastError}; + my $err = shift; + + # allow LastError to be reset with undef + if ( defined $err ) { + $err =~ s/$CRLF$//og; + local ($!); # old versions of Carp could reset $! + $self->_debug( Carp::longmess("ERROR: $err") ); + + # hopefully this is rare... + if ( $err eq "NO not connected" ) { + my $lerr = $self->{LastError} || ""; + my $emsg = "Trying command when NOT connected!"; + $emsg .= " LastError was: $lerr" if $lerr; + Carp::cluck($emsg); + } + } + + # 2.x API support requires setting $@ + $@ = $self->{LastError} = $err; +} + +sub Fast_io(;$) { + my ( $self, $use ) = @_; + defined $use + or return $self->{Fast_io}; + + my $socket = $self->{Socket} + or return undef; + + local ( $@, $! ); # avoid stomping on globals + unless ($use) { + eval { fcntl( $socket, F_SETFL, delete $self->{_fcntl} ) } + if exists $self->{_fcntl}; + $self->{Fast_io} = 0; + return undef; + } + + my $fcntl = eval { fcntl( $socket, F_GETFL, 0 ) }; + if ($@) { + $self->{Fast_io} = 0; + $self->_debug("not using Fast_IO; not available on this platform") + unless $self->{_fastio_warning_}++; + return undef; + } + + $self->{Fast_io} = 1; + my $newflags = $self->{_fcntl} = $fcntl; + $newflags |= O_NONBLOCK; + fcntl( $socket, F_SETFL, $newflags ); +} + +# removed +sub EnableServerResponseInLiteral { undef } + +sub Wrap { shift->Clear(@_) } + +# The following class method is for creating valid dates in appended msgs: +my @dow = qw(Sun Mon Tue Wed Thu Fri Sat); +my @mnt = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); + +sub Rfc822_date { + my $class = shift; + my $date = $class =~ /^\d+$/ ? $class : shift; # method or function? + my @date = gmtime($date); + + #Date: Fri, 09 Jul 1999 13:10:55 -0000 + sprintf( + "%s, %02d %s %04d %02d:%02d:%02d -%04d", + $dow[ $date[6] ], + $date[3], + $mnt[ $date[4] ], + $date[5] + 1900, + $date[2], $date[1], $date[0], $date[8] + ); +} + +# The following methods create valid dates for use in IMAP search strings +# - provide Rfc2060* methods/functions for backwards compatibility +sub Rfc2060_date { + $_[0] =~ /^\d+$/ ? Rfc3501_date(@_) : shift->Rfc3501_date(@_); +} + +sub Rfc3501_date { + my $class = shift; + my $stamp = $class =~ /^\d+$/ ? $class : shift; + my @date = gmtime($stamp); + + # 11-Jan-2000 + sprintf( "%02d-%s-%04d", $date[3], $mnt[ $date[4] ], $date[5] + 1900 ); +} + +sub Rfc2060_datetime($;$) { + $_[0] =~ /^\d+$/ ? Rfc3501_datetime(@_) : shift->Rfc3501_datetime(@_); +} + +sub Rfc3501_datetime($;$) { + my $class = shift; + my $stamp = $class =~ /^\d+$/ ? $class : shift; + my $zone = shift || '+0000'; + my @date = gmtime($stamp); + + # 11-Jan-2000 04:04:04 +0000 + sprintf( + "%02d-%s-%04d %02d:%02d:%02d %s", + $date[3], + $mnt[ $date[4] ], + $date[5] + 1900, + $date[2], $date[1], $date[0], $zone + ); +} + +# Change CRLF into \n +sub Strip_cr { + my $class = shift; + if ( !ref $_[0] && @_ == 1 ) { + ( my $string = $_[0] ) =~ s/$CRLF/\n/og; + return $string; + } + + return wantarray + ? map { s/$CRLF/\n/og; $_ } ( ref $_[0] ? @{ $_[0] } : @_ ) + : [ map { s/$CRLF/\n/og; $_ } ( ref $_[0] ? @{ $_[0] } : @_ ) ]; +} + +# The following defines a special method to deal with the Clear parameter: +sub Clear { + my ( $self, $clear ) = @_; + defined $clear or return $self->{Clear}; + + my $oldclear = $self->{Clear}; + $self->{Clear} = $clear; + + my @keys = reverse $self->_trans_index; + + for ( my $i = $clear ; $i < @keys ; $i++ ) { + delete $self->{History}{ $keys[$i] }; + } + + return $oldclear; +} + +# read-only access to the transaction number +sub Transaction { shift->Count } + +# remove doubles from list +sub _remove_doubles(@) { + my %seen; + grep { !$seen{ $_->{name} }++ } @_; +} + +# the constructor: +sub new { + my $class = shift; + my $self = { + LastError => "", + Uid => 1, + Count => 0, + Clear => 2, + Keepalive => 0, + Maxappendstringlength => 1024**2, + Maxcommandlength => 1000, + Maxtemperrors => undef, + State => Unconnected, + Authmechanism => 'LOGIN', + Timeout => 600, + History => {}, + }; + while (@_) { + my $k = ucfirst lc shift; + my $v = shift; + $self->{$k} = $v if defined $v; + } + bless $self, ref($class) || $class; + + # Fast_io is enabled by default when not given a socket + unless ( exists $self->{Fast_io} || $self->{Socket} || $self->{Rawsocket} ) + { + $self->{Fast_io} = 1; + } + + if ( my $sup = $self->{Supportedflags} ) { # unpack into case-less HASH + my %sup = map { m/^\\?(\S+)/ ? lc $1 : () } @$sup; + $self->{Supportedflags} = \%sup; + } + + $self->{Debug_fh} ||= \*STDERR; + CORE::select( ( select( $self->{Debug_fh} ), $|++ )[0] ); + + if ( $self->Debug ) { + $self->_debug( "Started at " . localtime() ); + $self->_debug("Using Mail::IMAPClient version $VERSION on perl $]"); + } + + # BUG? return undef on Socket() failure? + $self->Socket( $self->{Socket} ) + if $self->{Socket}; + + if ( $self->{Rawsocket} ) { + my $sock = delete $self->{Rawsocket}; + + # Ignore Rawsocket if Socket is set. BUG? should we carp/croak? + $self->RawSocket($sock) unless $self->{Socket}; + } + + if ( !$self->{Socket} && $self->{Server} ) { + $self->connect or return undef; + } + return $self; +} + +sub connect(@) { + my $self = shift; + + # BUG? We should restrict which keys can be passed/set here. + %$self = ( %$self, @_ ) if @_; + + my @sockargs = $self->Timeout ? ( Timeout => $self->Timeout ) : (); + push( @sockargs, $self->Debug ? ( Debug => $self->Debug ) : () ); + + # give caller control of IO::Socket::... args to new if desired + if ( $self->Socketargs and ref $self->Socketargs eq "ARRAY" ) { + push( @sockargs, @{ $self->Socketargs } ); + } + + my $server = $self->Server; + my $port = $self->Port || $self->Port( $self->Ssl ? "993" : "143" ); + my ( $ioclass, $sock ); + + if ( File::Spec->file_name_is_absolute($server) ) { + $ioclass = $self->_load_module("UNIX"); + unshift( @sockargs, Peer => $server ); + } + else { + unshift( + @sockargs, + PeerAddr => $server, + PeerPort => $port, + Proto => "tcp", + ); + + # extra control of SSL args is supported + if ( $self->Ssl ) { + $ioclass = $self->_load_module("SSL"); + push( @sockargs, @{ $self->Ssl } ) if ref $self->Ssl eq "ARRAY"; + } + else { + $ioclass = $self->_load_module("INET"); + } + } + + if ($ioclass) { + $self->_debug("Connecting with $ioclass @sockargs"); + $sock = $ioclass->new(@sockargs); + } + + if ($sock) { + $self->_debug( "Connected to $server" . ( $! ? " errno($!)" : "" ) ); + return $self->Socket($sock); + } + else { + my $lasterr = $self->LastError || ""; + $self->LastError("Unable to connect to $server: $lasterr"); + return undef; + } +} + +sub RawSocket(;$) { + my ( $self, $sock ) = @_; + defined $sock + or return $self->{Socket}; + + $self->{Socket} = $sock; + $self->{_select} = IO::Select->new($sock); + + delete $self->{_fcntl}; + $self->Fast_io( $self->Fast_io ); + + return $sock; +} + +sub Socket($) { + my ( $self, $sock ) = @_; + defined $sock + or return $self->{Socket}; + + $self->RawSocket($sock); + $self->State(Connected); + + setsockopt( $sock, SOL_SOCKET, SO_KEEPALIVE, 1 ) if $self->Keepalive; + + # LastError may be set by _read_line via _get_response + # look for "* (OK|BAD|NO|PREAUTH)" + my $code = $self->_get_response( '*', 'PREAUTH' ) or return undef; + + if ( $code eq 'BYE' || $code eq 'NO' ) { + $self->State(Unconnected); + return undef; + } + elsif ( $code eq 'PREAUTH' ) { + $self->State(Authenticated); + return $self; + } + + if ( $self->Starttls ) { + $self->starttls or return undef; + } + + if ( defined $self->User && defined $self->Password ) { + $self->login or return undef; + } + + return $self->{Socket}; +} + +# RFC2595 section 3.1 +sub starttls { + my ($self) = @_; + + # BUG? RFC requirement checks commented out for now... + #if ( $self->IsUnconnected or $self->IsAuthenticated ) { + # $self->LastError("NO must be connected but not authenticated"); + # return undef; + #} + + # BUG? strict check on capability commented out for now... + #return undef unless $self->has_capability("STARTTLS"); + + $self->_imap_command("STARTTLS") or return undef; + + # MUST discard cached capability info; should re-issue capability command + delete $self->{CAPABILITY}; + + my $ioclass = $self->_load_module("SSL") or return undef; + my $sock = $self->RawSocket; + my $blocking = $sock->blocking; + + # BUG: force blocking for now + $sock->blocking(1); + + # give caller control of args to start_SSL if desired + my @sslargs = + ( $self->Starttls and ref( $self->Starttls ) eq "ARRAY" ) + ? ( @{ $self->Starttls } ) + : ( Timeout => 30 ); + + unless ( $ioclass->start_SSL( $sock, @sslargs ) ) { + $self->LastError( "Unable to start TLS: " . $ioclass->errstr ); + return undef; + } + + # return blocking to previous setting + $sock->blocking($blocking); + + return $self; +} + +# RFC4978 COMPRESS +sub compress { + my ($self) = @_; + + # BUG? strict check on capability commented out for now... + #my $can = $self->has_capability("COMPRESS") + #return undef unless $can and $can eq "DEFLATE"; + + $self->_imap_command("COMPRESS DEFLATE") or return undef; + + my $zcl = $self->_load_module("Compress-Zlib") or return undef; + + # give caller control of args if desired + $self->Compress( + [ + -WindowBits => -$zcl->MAX_WBITS(), + -Level => $zcl->Z_BEST_SPEED() + ] + ) unless ( $self->Compress and ref( $self->Compress ) eq "ARRAY" ); + + my ( $rc, $do, $io ); + + ( $do, $rc ) = Compress::Zlib::deflateInit( @{ $self->Compress } ); + unless ( $rc == $zcl->Z_OK ) { + $self->LastError("deflateInit failed (rc=$rc)"); + return undef; + } + + ( $io, $rc ) = + Compress::Zlib::inflateInit( -WindowBits => -$zcl->MAX_WBITS() ); + unless ( $rc == $zcl->Z_OK ) { + $self->LastError("inflateInit failed (rc=$rc)"); + return undef; + } + + $self->{Prewritemethod} = sub { + my ( $imap, $string ) = @_; + + my ( $rc, $out1, $out2 ); + ( $out1, $rc ) = $do->deflate($string); + ( $out2, $rc ) = $do->flush( $zcl->Z_PARTIAL_FLUSH() ) + unless ( $rc != $zcl->Z_OK ); + + unless ( $rc == $zcl->Z_OK ) { + $self->LastError("deflate/flush failed (rc=$rc)"); + return undef; + } + + return $out1 . $out2; + }; + + # need to retain some state for Readmoremethod/Readmethod calls + my ( $Zbuf, $Ibuf ) = ( "", "" ); + + $self->{Readmoremethod} = sub { + my $self = shift; + return 1 if ( length($Zbuf) || length($Ibuf) ); + $self->__read_more(@_); + }; + + $self->{Readmethod} = sub { + my ( $imap, $fh, $buf, $len, $off ) = @_; + + # get more data, but empty $Ibuf first if any data is left + my ( $lz, $li ) = ( length $Zbuf, length $Ibuf ); + if ( $lz || !$li ) { + my $ret = sysread( $fh, $Zbuf, $len, length $Zbuf ); + $lz = length $Zbuf; + return $ret if ( !$ret && !$lz ); # $ret is undef or 0 + } + + # accummulate inflated data in $Ibuf + if ($lz) { + my ( $tbuf, $rc ) = $io->inflate( \$Zbuf ); + unless ( $rc == $zcl->Z_OK ) { + $self->LastError("inflate failed (rc=$rc)"); + return undef; + } + $Ibuf .= $tbuf; + } + + # pull desired length of data from $Ibuf + my $tbuf = substr( $Ibuf, 0, $len ); + substr( $Ibuf, 0, $len ) = ""; + substr( $$buf, $off ) = $tbuf; + + return length $tbuf; + }; + + return $self; +} + +sub login { + my $self = shift; + my $auth = $self->Authmechanism; + + if ( $auth && $auth ne 'LOGIN' ) { + $self->authenticate( $auth, $self->Authcallback ) + or return undef; + } + else { + my $user = $self->User; + my $passwd = $self->Password; + + return undef unless ( defined($passwd) and defined($user) ); + + $user = ( $user eq "" ) ? qq("") : $self->Quote($user); + $passwd = ( $passwd eq "" ) ? qq("") : $self->Quote($passwd); + + $self->_imap_command("LOGIN $user $passwd") + or return undef; + } + + $self->State(Authenticated); + if ( $self->Compress ) { + $self->compress or return undef; + } + return $self; +} + +sub noop { + my ($self) = @_; + $self->_imap_command("NOOP") ? $self->Results : undef; +} + +sub proxyauth { + my ( $self, $user ) = @_; + $user = ( $user eq "" ) ? qq("") : $self->Quote($user); + $self->_imap_command("PROXYAUTH $user") ? $self->Results : undef; +} + +sub separator { + my ( $self, $target ) = @_; + unless ( defined $target ) { + + # separator is namespace's 1st thing's 1st thing's 2nd thing: + my $ns = $self->namespace or return undef; + if ($ns) { + my $sep = $ns->[0][0][1]; + return $sep if $sep; + } + $target = ''; + } + + return $self->{separators}{$target} + if exists $self->{separators}{$target}; + + my $list = $self->list( undef, $target ) or return undef; + + foreach my $line (@$list) { + my $rec = $self->_list_or_lsub_response_parse($line); + next unless defined $rec->{name}; + $self->{separators}{ $rec->{name} } = $rec->{delim}; + } + return $self->{separators}{$target}; +} + +# BUG? caller gets empty list even if Error +# - returning an array with a single undef value seems even worse though +sub sort { + my ( $self, $crit, @a ) = @_; + + $crit =~ /^\(.*\)$/ # wrap criteria in parens + or $crit = "($crit)"; + + my @hits; + if ( $self->_imap_uid_command( SORT => $crit, @a ) ) { + my @results = $self->History; + foreach (@results) { + chomp; + s/$CR$//; + s/^\*\s+SORT\s+// or next; + push @hits, grep /\d/, split; + } + } + return wantarray ? @hits : \@hits; +} + +sub _list_or_lsub { + my ( $self, $cmd, $reference, $target ) = @_; + defined $reference or $reference = ''; + defined $target or $target = '*'; + length $target or $target = '""'; + + $target eq '*' || $target eq '""' + or $target = $self->Massage($target); + + $self->_imap_command(qq($cmd "$reference" $target)) + or return undef; + + # cleanup any literal data that may be returned + my $ret = wantarray ? [ $self->History ] : $self->Results; + if ($ret) { + my $cmd = wantarray ? undef : shift @$ret; + $self->_list_response_preprocess($ret); + unshift( @$ret, $cmd ) if defined($cmd); + } + + #return wantarray ? $self->History : $self->Results; + return wantarray ? @$ret : $ret; +} + +sub list { shift->_list_or_lsub( "LIST", @_ ) } +sub lsub { shift->_list_or_lsub( "LSUB", @_ ) } + +# deprecated 3.34 +sub xlist { + my ($self) = @_; + return undef unless $self->has_capability("XLIST"); + shift->_list_or_lsub( "XLIST", @_ ); +} + +sub _folders_or_subscribed { + my ( $self, $method, $what ) = @_; + my @folders; + + # do BLOCK allowing use of "last if undef/error" and avoiding dup code + do { + { + my @list; + if ($what) { + my $sep = $self->separator($what) || $self->separator(undef); + last unless defined $sep; + + my $whatsub = $what =~ m/\Q${sep}\E$/ ? "$what*" : "$what$sep*"; + + my $tref = $self->$method( undef, $whatsub ) or last; + shift @$tref; # remove command + push @list, @$tref; + + # BUG?: this behavior has been around since 2.x, why? + my $cansel = $self->selectable($what); + last unless defined $cansel; + if ($cansel) { + $tref = $self->$method( undef, $what ) or last; + shift @$tref; # remove command + push @list, @$tref; + } + } + else { + my $tref = $self->$method( undef, undef ) or last; + shift @$tref; # remove command + push @list, @$tref; + } + + foreach my $resp (@list) { + my $rec = $self->_list_or_lsub_response_parse($resp); + next unless defined $rec->{name}; + push @folders, $rec; + } + } + }; + + my @clean = _remove_doubles @folders; + return wantarray ? @clean : \@clean; +} + +sub folders { + my ( $self, $what ) = @_; + + my @folders = + map( $_->{name}, $self->_folders_or_subscribed( "list", $what ) ); + return wantarray ? @folders : \@folders; +} + +sub folders_hash { + my ( $self, $what ) = @_; + + my @folders_hash = $self->_folders_or_subscribed( "list", $what ); + return wantarray ? @folders_hash : \@folders_hash; +} + +# deprecated 3.34 +sub xlist_folders { + my ($self) = @_; + my $xlist = $self->xlist; + return undef unless defined $xlist; + + my %xlist; + my $xlist_re = qr/\A\\(Inbox|AllMail|Trash|Drafts|Sent|Spam|Starred)\Z/; + + for my $resp (@$xlist) { + my $rec = $self->_list_or_lsub_response_parse($resp); + next unless defined $rec->{name}; + for my $attr ( @{ $rec->{attrs} } ) { + $xlist{$1} = $rec->{name} if ( $attr =~ $xlist_re ); + } + } + + return wantarray ? %xlist : \%xlist; +} + +sub subscribed { + my ( $self, $what ) = @_; + my @folders = + map( $_->{name}, $self->_folders_or_subscribed( "lsub", $what ) ); + return wantarray ? @folders : \@folders; +} + +sub deleteacl { + my ( $self, $target, $user ) = @_; + $target = $self->Massage($target); + $user = ( $user eq "" ) ? qq("") : $self->Quote($user); + + $self->_imap_command(qq(DELETEACL $target $user)) + or return undef; + + return wantarray ? $self->History : $self->Results; +} + +sub setacl { + my ( $self, $target, $user, $acl ) = @_; + $target ||= $self->Folder; + $target = $self->Massage($target); + + $user ||= $self->User; + $user = ( $user eq "" ) ? qq("") : $self->Quote($user); + $acl = ( $acl eq "" ) ? qq("") : $self->Quote($acl); + + $self->_imap_command(qq(SETACL $target $user $acl)) + or return undef; + + return wantarray ? $self->History : $self->Results; +} + +sub getacl { + my ( $self, $target ) = @_; + defined $target or $target = $self->Folder; + my $mtarget = $self->Massage($target); + $self->_imap_command(qq(GETACL $mtarget)) + or return undef; + + my @history = $self->History; + my $hash; + for ( my $x = 0 ; $x < @history ; $x++ ) { + next if $history[$x] !~ /^\* ACL/; + + my $perm = + $history[$x] =~ /^\* ACL $/ + ? $history[ ++$x ] . $history[ ++$x ] + : $history[$x]; + + $perm =~ s/\s?$CRLF$//o; + until ( $perm =~ /\Q$target\E"?$/ || !$perm ) { + $perm =~ s/\s([^\s]+)\s?$// or last; + my $p = $1; + $perm =~ s/\s([^\s]+)\s?$// or last; + my $u = $1; + $hash->{$u} = $p; + $self->_debug("Permissions: $u => $p"); + } + } + return $hash; +} + +sub listrights { + my ( $self, $target, $user ) = @_; + $target ||= $self->Folder; + $target = $self->Massage($target); + + $user ||= $self->User; + $user = ( $user eq "" ) ? qq("") : $self->Quote($user); + + $self->_imap_command(qq(LISTRIGHTS $target $user)) + or return undef; + + my $resp = first { /^\* LISTRIGHTS/ } $self->History; + my @rights = split /\s/, $resp; + my $rights = join '', @rights[ 4 .. $#rights ]; + $rights =~ s/"//g; + return wantarray ? split( //, $rights ) : $rights; +} + +sub select { + my ( $self, $target ) = @_; + defined $target or return undef; + + my $qqtarget = $self->Massage($target); + my $old = $self->Folder; + + $self->_imap_command("SELECT $qqtarget") + or return undef; + + $self->State(Selected); + $self->Folder($target); + return $old || $self; # ??$self?? +} + +sub message_string { + my ( $self, $msg ) = @_; + + return undef unless defined $self->imap4rev1; + my $peek = $self->Peek ? '.PEEK' : ''; + my $cmd = $self->imap4rev1 ? "BODY$peek\[]" : "RFC822$peek"; + + my $string; + $self->message_to_file( \$string, $msg ); + + unless ( $self->Ignoresizeerrors ) { # Check size with expected size + my $expected_size = $self->size($msg); + return undef unless defined $expected_size; + + # RFC822.SIZE may be wrong, see RFC2683 3.4.5 "RFC822.SIZE" + if ( length($string) != $expected_size ) { + $self->LastError( "message_string() " + . "expected $expected_size bytes but received " + . length($string) + . " you may need the IgnoreSizeErrors option" ); + return undef; + } + } + + return $string; +} + +sub bodypart_string { + my ( $self, $msg, $partno, $bytes, $offset ) = @_; + + unless ( $self->imap4rev1 ) { + $self->LastError( "Unable to get body part; server " + . $self->Server + . " does not support IMAP4REV1" ) + unless $self->LastError; + return undef; + } + + $offset ||= 0; + my $cmd = "BODY" + . ( $self->Peek ? '.PEEK' : '' ) + . "[$partno]" + . ( $bytes ? "<$offset.$bytes>" : '' ); + + $self->fetch( $msg, $cmd ) + or return undef; + + $self->_transaction_literals; +} + +# message_to_file( $self, $file, @msgs ) +sub message_to_file { + my ( $self, $file, @msgs ) = @_; + + # $file can be a name or a scalar reference (for in memory file) + # avoid IO::File bug handling scalar refs in perl <= 5.8.8? + # - buggy: $fh = IO::File->new( $file, 'r' ) + my $fh; + if ( ref $file and ref $file ne "SCALAR" ) { + $fh = $file; + } + else { + $$file = "" if ( ref $file eq "SCALAR" and !defined $$file ); + local ($!); + open( $fh, ">>", $file ); + unless ( defined($fh) ) { + $self->LastError("Unable to open file '$file': $!"); + return undef; + } + } + + binmode($fh); + + unless (@msgs) { + $self->LastError("message_to_file: NO messages specified!"); + return undef; + } + + my $peek = $self->Peek ? '.PEEK' : ''; + $peek = sprintf( $self->imap4rev1 ? "BODY%s\[]" : "RFC822%s", $peek ); + + my @args = ( join( ",", @msgs ), $peek ); + + return $self->_imap_uid_command( { outref => $fh }, "FETCH" => @args ) + ? $self + : undef; +} + +sub message_uid { + my ( $self, $msg ) = @_; + + my $ref = $self->fetch( $msg, "UID" ) or return undef; + foreach (@$ref) { + return $1 if m/\(UID\s+(\d+)\s*\)$CR?$/o; + } + return undef; +} + +# cleaned up and simplified but see TODO in code... +sub migrate { + my ( $self, $peer, $msgs, $folder ) = @_; + + unless ( $peer and $peer->IsConnected ) { + $self->LastError( ( $peer ? "Invalid" : "Unconnected" ) + . " target " + . ref($self) + . " object in migrate()" + . ( $peer ? ( ": " . $peer->LastError ) : "" ) ); + return undef; + } + + # sanity check to see if $self is same object as $peer + if ( $self eq $peer ) { + $self->LastError("dest must not be the same object as self"); + return undef; + } + + $folder = $self->Folder unless ( defined $folder ); + unless ($folder) { + $self->LastError("No folder selected on source mailbox."); + return undef; + } + + unless ( $peer->exists($folder) or $peer->create($folder) ) { + $self->LastError( "Create folder '$folder' on target host failed: " + . $peer->LastError ); + return undef; + } + + if ( !defined $msgs or uc($msgs) eq "ALL" ) { + $msgs = $self->search("ALL") or return undef; + } + + # message size and (internal) date + my @headers = qw(RFC822.SIZE INTERNALDATE FLAGS); + my $range = $self->Range($msgs); + + $self->_debug("Messages to migrate from '$folder': $range"); + + foreach my $mid ( $range->unfold ) { + + # fetch size internaldate and flags of original message + # - TODO: add flags here... + my $minfo = $self->fetch_hash( $mid, @headers ) + or return undef; + + my ( $size, $date ) = @{ $minfo->{$mid} }{@headers}; + return undef unless ( defined $size and defined $date ); + + $self->_debug("Copy message $mid (sz=$size,dt=$date) from '$folder'"); + + my @flags = grep !/\\Recent/i, $self->flags($mid); + my $flags = join ' ', $peer->supported_flags(@flags); + + # TODO: - use File::Temp tempfile if $msg > bufferSize? + # read message to $msg + my $msg; + $self->message_to_file( \$msg, $mid ) + or return undef; + + my $newid = $peer->append_file( $folder, \$msg, undef, $flags, $date ); + + unless ( defined $newid ) { + $self->LastError( + "Append to '$folder' on target failed: " . $peer->LastError ); + return undef; + } + + $self->_debug("Copied UID $mid in '$folder' to target UID $newid"); + } + + return $self; +} + +# Optimization of wait time between syswrite calls only runs if syscalls +# run too fast and fill the buffer causing "EAGAIN: Resource Temp. Unavail" +# errors. The premise is that $maxwrite will be approx. the same as the +# smallest buffer between the sending and receiving side. Waiting time +# between syscalls should ideally be exactly as long as it takes the +# receiving side to empty that buffer, minus a little bit to prevent it +# from emptying completely and wasting time in the select call. + +sub _optimal_sleep($$$) { + my ( $self, $maxwrite, $waittime, $last5writes ) = @_; + + push @$last5writes, $waittime; + shift @$last5writes if @$last5writes > 5; + + my $bufferavail = ( sum @$last5writes ) / @$last5writes; + + if ( $bufferavail < .4 * $maxwrite ) { + + # Buffer is staying pretty full; we should increase the wait + # period to reduce transmission overhead/number of packets sent + $waittime *= 1.3; + } + elsif ( $bufferavail > .9 * $maxwrite ) { + + # Buffer is nearly or totally empty; we're wasting time in select + # call that could be used to send data, so reduce the wait period + $waittime *= .5; + } + + CORE::select( undef, undef, undef, $waittime ); + $waittime; +} + +sub body_string { + my ( $self, $msg ) = @_; + my $ref = + $self->fetch( $msg, "BODY" . ( $self->Peek ? ".PEEK" : "" ) . "[TEXT]" ) + or return undef; + + my $string = join '', map { $_->[DATA] } + grep { $self->_is_literal($_) } @$ref; + + return $string + if $string; + + my $head; + while ( $head = shift @$ref ) { + $self->_debug("body_string: head = '$head'"); + + last + if $head =~ + /(?:.*FETCH .*\(.*BODY\[TEXT\])|(?:^\d+ BAD )|(?:^\d NO )/i; + } + + unless (@$ref) { + $self->LastError( + "Unable to parse server response from " . $self->LastIMAPCommand ); + return undef; + } + + my $popped; + $popped = pop @$ref + until ( $popped && $popped =~ /^\)$CRLF$/o ) + || !grep /^\)$CRLF$/o, @$ref; + + if ( $head =~ /BODY\[TEXT\]\s*$/i ) { # Next line is a literal + $string .= shift @$ref while @$ref; + $self->_debug("String is now $string") + if $self->Debug; + } + + $string; +} + +sub examine { + my ( $self, $target ) = @_; + defined $target or return undef; + + $self->_imap_command( 'EXAMINE ' . $self->Massage($target) ) + or return undef; + + my $old = $self->Folder; + $self->Folder($target); + $self->State(Selected); + $old || $self; +} + +sub idle { + my $self = shift; + my $good = '+'; + my $count = $self->Count + 1; + $self->_imap_command( "IDLE", $good ) ? $count : undef; +} + +sub idle_data { + my $self = shift; + my $timeout = scalar(@_) ? shift : 0; + my $socket = $self->Socket; + + # current index in Results array + my $trans_c1 = $self->_next_index; + + # look for all untagged responses + my ( $rc, $ret ); + + do { + $ret = + $self->_read_more( { error_on_timeout => 0 }, $socket, $timeout ); + + # set rc on first pass or on errors + $rc = $ret if ( !defined($rc) or $ret < 0 ); + + # not using /\S+/ because that can match 0 in "* 0 RECENT" + # leading the library to act as if things failed + if ( $ret > 0 ) { + $self->_get_response( '*', qr/(?!BAD|BYE|NO)(?:\d+\s+\w+|\S+)/ ) + or return undef; + $timeout = 0; # check for more data without blocking! + } + } while $ret > 0; + + # select returns -1 on errors + return undef if $rc < 0; + + my $trans_c2 = $self->_next_index; + + # if current index in Results array has changed return data + my @res; + if ( $trans_c1 < $trans_c2 ) { + @res = $self->Results; + @res = @res[ $trans_c1 .. ( $trans_c2 - 1 ) ]; + } + return wantarray ? @res : \@res; +} + +sub done { + my $self = shift; + my $count = shift || $self->Count; + $self->_imap_command( { addtag => 0, tag => $count }, "DONE" ) + or return undef; + return $self->Results; +} + +# tag_and_run( $self, $string, $good ) +sub tag_and_run { + my $self = shift; + $self->_imap_command(@_) or return undef; + return $self->Results; +} + +sub reconnect { + my $self = shift; + + if ( $self->IsAuthenticated ) { + $self->_debug("reconnect called but already authenticated"); + return 1; + } + + # safeguard from deep recursion via connect + if ( $self->{_doing_reconnect} ) { + $self->_debug("recursive call to reconnect, returning 0\n"); + $self->LastError("unexpected reconnect recursion") + unless $self->LastError; + return 0; + } + + my $einfo = $self->LastError || ""; + $self->_debug( "reconnecting to ", $self->Server, ", last error: $einfo" ); + $self->{_doing_reconnect} = 1; + + # reconnect and select appropriate folder + my $ret; + if ( $self->connect ) { + $ret = 1; + if ( defined $self->Folder ) { + $ret = defined( $self->select( $self->Folder ) ) ? 1 : undef; + } + } + + delete $self->{_doing_reconnect}; + return $ret ? 1 : $ret; +} + +# wrapper for _imap_command_do to enable retrying on lost connections +sub _imap_command { + my $self = shift; + + my $tries = 0; + my $retry = $self->Reconnectretry || 0; + my ( $rc, @err ); + + # LastError (if set) will be overwritten masking any earlier errors + while ( $tries++ <= $retry ) { + + # do command on the first try or if Connected (reconnect ongoing) + if ( $tries == 1 or $self->IsConnected ) { + $rc = $self->_imap_command_do(@_); + push( @err, $self->LastError ) if $self->LastError; + } + + if ( !defined($rc) and $retry and $self->IsUnconnected ) { + last + unless ( + $! == EPIPE + or $! == ECONNRESET + or $self->LastError =~ /(?:error\(.*?\)|timeout) waiting\b/ + or $self->LastError =~ /(?:socket closed|\* BYE)\b/ + + # BUG? reconnect if caller ignored/missed earlier errors? + # or $self->LastError =~ /NO not connected/ + ); + my $ret = $self->reconnect; + if ($ret) { + $self->_debug("reconnect success($ret) on try #$tries/$retry"); + } + elsif ( defined $ret and $ret == 0 ) { # escaping recursion + return undef; + } + else { + $self->_debug("reconnect failure on try #$tries/$retry"); + push( @err, $self->LastError ) if $self->LastError; + } + } + else { + last; + } + } + + unless ($rc) { + my ( %seen, @keep, @info ); + + foreach my $str (@err) { + my ( $sz, $len ) = ( 96, length($str) ); + $str =~ s/$CR?$LF$/\\n/omg; + if ( !$self->Debug and $len > $sz * 2 ) { + my $beg = substr( $str, 0, $sz ); + my $end = substr( $str, -$sz, $sz ); + $str = $beg . "..." . $end; + } + next if $seen{$str}++; + push( @keep, $str ); + } + foreach my $msg (@keep) { + push( @info, $msg . ( $seen{$msg} > 1 ? " ($seen{$msg}x)" : "" ) ); + } + $self->LastError( join( "; ", @info ) ); + } + + return $rc; +} + +# _imap_command_do runs a command, inserting a tag and CRLF as requested +# options: +# addcrlf => 0|1 - suppress adding CRLF to $string +# addtag => 0|1 - suppress adding $tag to $string +# tag => $tag - use this $tag instead of incrementing $self->Count +# outref => ... - see _get_response() +sub _imap_command_do { + my $self = shift; + my $opt = ref( $_[0] ) eq "HASH" ? shift : {}; + my $string = shift or return undef; + my $good = shift; + + my @gropt = ( $opt->{outref} ? { outref => $opt->{outref} } : () ); + + $opt->{addcrlf} = 1 unless exists $opt->{addcrlf}; + $opt->{addtag} = 1 unless exists $opt->{addtag}; + + # reset error in case the last error was non-fatal but never cleared + if ( $self->LastError ) { + + #DEBUG $self->_debug( "Reset LastError: " . $self->LastError ); + $self->LastError(undef); + } + + my $clear = $self->Clear; + $self->Clear($clear) + if $self->Count >= $clear && $clear > 0; + + my $count = $self->Count( $self->Count + 1 ); + my $tag = $opt->{tag} || $count; + $string = "$tag $string" if $opt->{addtag}; + + # for APPEND (append_string) only log first line of command + my $logstr = ( $string =~ /^($tag\s+APPEND\s+.*?)$CR?$LF/ ) ? $1 : $string; + + # BUG? use $self->_next_index($tag) ? or 0 ??? + # $self->_record($tag, [$self->_next_index($tag), "INPUT", $logstr] ); + $self->_record( $count, [ 0, "INPUT", $logstr ] ); + + # $suppress (adding CRLF) set to 0 if $opt->{addcrlf} is TRUE + unless ( $self->_send_line( $string, $opt->{addcrlf} ? 0 : 1 ) ) { + $self->LastError( "Error sending '$logstr': " . $self->LastError ); + return undef; + } + + # look for " (OK|BAD|NO|$good)" (or "+..." if $good is '+') + my $code = $self->_get_response( @gropt, $tag, $good ) or return undef; + + if ( $code eq 'OK' ) { + return $self; + } + elsif ( $good and $code eq $good ) { + return $self; + } + else { + return undef; + } +} + +sub _response_code_sub { + my ( $self, $tag, $good ) = @_; + + # tag/good can be a ref (compiled regex) otherwise quote it + my $qtag = ref($tag) ? $tag : defined($tag) ? quotemeta($tag) : undef; + my $qgood = ref($good) ? $good : defined($good) ? quotemeta($good) : undef; + + # using closure, a variable alias, and sub returns on first match + # - $_[0] is $o->[DATA] + # - returns list ( $code, $byemsg ) + my $getcodesub = sub { + if ( defined $qgood ) { + if ( $good eq '+' and $_[0] =~ /^$qgood/ ) { + return ($good); + } + if ( defined $qtag and $_[0] =~ /^$qtag\s+($qgood)/i ) { + return ( ref($qgood) ? $1 : uc($1) ); + } + } + if ( defined $qtag ) { + if ( $tag eq '+' and $_[0] =~ /^$qtag/ ) { + return ($tag); + } + if ( $_[0] =~ /^$qtag\s+(OK|BAD|NO)\b/i ) { + my $code = uc($1); + $self->LastError( $_[0] ) unless ( $code eq 'OK' ); + return ($code); + } + } + if ( $_[0] =~ /^\*\s+(BYE)\b/i ) { + return ( uc($1), $_[0] ); # ( 'BYE', $byemsg ) + } + return (undef); + }; + + return $getcodesub; +} + +# _get_response get IMAP response optionally send data somewhere +# options: +# outref => GLOB|CODE - reference to send output to (see _read_line) +sub _get_response { + my $self = shift; + my $opt = ref( $_[0] ) eq "HASH" ? shift : {}; + my $tag = shift; + my $good = shift; + + my $outref = $opt->{outref}; + my @readopt = defined($outref) ? ($outref) : (); + my $getcode = $self->_response_code_sub( $tag, $good ); + + my ( $count, $out, $code, $byemsg ) = ( $self->Count, [], undef, undef ); + until ( defined $code ) { + my $output = $self->_read_line(@readopt) or return undef; + $out = $output; # keep last response just in case + + # not using last on first match? paranoia or right thing? + # only uc() when match is not on case where $tag|$good is a ref() + foreach my $o (@$output) { + $self->_record( $count, $o ); + $self->_is_output($o) or next; + my ( $tcode, $tbyemsg ) = $getcode->( $o->[DATA] ); + $code = $tcode if ( defined $tcode ); + $byemsg = $tbyemsg if ( defined $tbyemsg ); + } + } + + if ( defined $code ) { + $code =~ s/$CR?$LF?$//o; + $code = uc($code) unless ( $good and $code eq $good ); + + # RFC 3501 7.1.5: $code on successful LOGOUT is OK not BYE + # sometimes we may fail to wait long enough to read a tagged + # OK so don't be strict about setting an error on LOGOUT! + if ( $code eq 'BYE' ) { + $self->State(Unconnected); + if ($byemsg) { + $self->LastError($byemsg) + unless ( $good and $code eq $good ); + } + } + } + elsif ( !$self->LastError ) { + my $info = "unexpected response: " . join( " ", @$out ); + $self->LastError($info); + } + + return $code; +} + +sub _imap_uid_command { + my $self = shift; + my @opt = ref( $_[0] ) eq "HASH" ? (shift) : (); + my $cmd = shift; + + my $args = @_ ? join( " ", '', @_ ) : ''; + my $uid = $self->Uid ? 'UID ' : ''; + $self->_imap_command( @opt, "$uid$cmd$args" ); +} + +sub run { + my $self = shift; + my $string = shift or return undef; + + my $tag = $string =~ /^(\S+) / ? $1 : undef; + unless ($tag) { + $self->LastError("No tag found in string passed to run(): $string"); + return undef; + } + + $self->_imap_command( { addtag => 0, addcrlf => 0, tag => $tag }, $string ) + or return undef; + + $self->{History}{$tag} = $self->{History}{ $self->Count } + unless $tag eq $self->Count; + + return $self->Results; +} + +# _record saves the conversation into the History structure: +sub _record { + my ( $self, $count, $array ) = @_; + if ( $array->[DATA] =~ /^\d+ LOGIN/i && !$self->Showcredentials ) { + $array->[DATA] =~ s/LOGIN.*/LOGIN XXXXXXXX XXXXXXXX/i; + } + + push @{ $self->{History}{$count} }, $array; +} + +# _send_line handles literal data and supports the Prewritemethod +sub _send_line { + my ( $self, $string, $suppress ) = @_; + + $string =~ s/$CR?$LF?$/$CRLF/o + unless $suppress; + + # handle case where string contains a literal + if ( $string =~ s/^([^$LF\{]*\{\d+\}$CRLF)(?=.)//o ) { + my $first = $1; + $self->_debug("Sending literal: $first\tthen: $string"); + $self->_send_line($first) or return undef; + + # look for "+..." + my $code = $self->_get_response('+') or return undef; + return undef unless $code eq '+'; + } + + # non-literal part continues... + unless ( $self->IsConnected ) { + $self->LastError("NO not connected"); + return undef; + } + + if ( my $prew = $self->Prewritemethod ) { + $string = $prew->( $self, $string ); + } + + $self->_debug("Sending: $string"); + $self->_send_bytes( \$string ); +} + +sub _send_bytes($) { + my ( $self, $byteref ) = @_; + my ( $total, $temperrs, $maxwrite ) = ( 0, 0, 0 ); + my $waittime = .02; + my @previous_writes; + + my $maxagain = $self->Maxtemperrors; + undef $maxagain if $maxagain and lc($maxagain) eq 'unlimited'; + + local $SIG{PIPE} = 'IGNORE'; # handle SIGPIPE as normal error + + my $socket = $self->Socket; + while ( $total < length $$byteref ) { + my $written = + syswrite( $socket, $$byteref, length($$byteref) - $total, $total ); + + if ( defined $written ) { + $temperrs = 0; + $total += $written; + next; + } + + if ( $! == EAGAIN ) { + if ( defined $maxagain && $temperrs++ > $maxagain ) { + $self->LastError("Persistent error '$!'"); + return undef; + } + + $waittime = + $self->_optimal_sleep( $maxwrite, $waittime, \@previous_writes ); + next; + } + + # Unconnected might be apropos for more than just these? + my $emsg = $! ? "$!" : "no error caught"; + $self->State(Unconnected) + if ( $! == EPIPE or $! == ECONNRESET or $! == EBADF ); + $self->LastError("Write failed '$emsg'"); + + return undef; # no luck + } + + $self->_debug("Sent $total bytes"); + return $total; +} + +# _read_line: read one line from the socket +# +# $output = $self->_read_line($literal_callback) +# literal_callback is optional, but if supplied it must be either +# be a filehandle, coderef, or undef. +# +# Returns a reference to an array of arrays, i.e.: +# $output = [ +# [ $index, 'OUTPUT|LITERAL', $output_line ], +# [ $index, 'OUTPUT|LITERAL', $output_line ], +# ... +# \]; + +# BUG?: make memory more efficient +sub _read_line { + my ( $self, $literal_callback ) = @_; + + my $socket = $self->Socket; + unless ( $self->IsConnected && $socket ) { + $self->LastError("NO not connected"); + return undef; + } + + my $iBuffer = ""; + my $oBuffer = []; + my $index = $self->_next_index; + my $timeout = $self->Timeout; + my $readlen = $self->Buffer || 4096; + my $transno = $self->Transaction; + + my $literal_cbtype = ""; + if ($literal_callback) { + if ( UNIVERSAL::isa( $literal_callback, "GLOB" ) ) { + $literal_cbtype = "GLOB"; + } + elsif ( UNIVERSAL::isa( $literal_callback, "CODE" ) ) { + $literal_cbtype = "CODE"; + } + else { + $self->LastError( "'$literal_callback' is an " + . "invalid callback; must be a filehandle or CODE" ); + return undef; + } + } + + my $temperrs = 0; + my $maxagain = $self->Maxtemperrors; + undef $maxagain if $maxagain and lc($maxagain) eq 'unlimited'; + + until ( + @$oBuffer # there's stuff in output buffer: + && $oBuffer->[-1][TYPE] eq 'OUTPUT' # that thing is an output line: + && $oBuffer->[-1][DATA] =~ + /$CR?$LF$/o # the last thing there has cr-lf: + && !length $iBuffer # and the input buffer has been MT'ed: + ) + { + + if ($timeout) { + my $rc = $self->_read_more( $socket, $timeout ); + return undef unless ( $rc > 0 ); + } + + my $emsg; + my $ret = + $self->_sysread( $socket, \$iBuffer, $readlen, length $iBuffer ); + + if ($timeout) { + if ( defined $ret ) { + $temperrs = 0; + } + else { + $emsg = "error while reading data from server: $!"; + if ( $! == ECONNRESET ) { + $self->State(Unconnected); + } + elsif ( $! == EAGAIN ) { + if ( defined $maxagain && $temperrs++ >= $maxagain ) { + $emsg .= " ($temperrs)"; + } + else { + next; # try again + } + } + } + } + + if ( defined $ret && $ret == 0 ) { # Caught EOF... + $emsg = "socket closed while reading data from server"; + $self->State(Unconnected); + } + + # save errors and return + if ($emsg) { + $self->LastError($emsg); + $self->_record( + $transno, + [ + $self->_next_index($transno), "ERROR", "$transno * NO $emsg" + ] + ); + return undef; + } + + while ( $iBuffer =~ s/^(.*?$CR?$LF)//o ) # consume line + { + my $current_line = $1; + if ( $current_line !~ s/\s*\{(\d+)\}$CR?$LF$//o ) { + push @$oBuffer, [ $index++, 'OUTPUT', $current_line ]; + next; + } + + push @$oBuffer, [ $index++, 'OUTPUT', $current_line ]; + + ## handle LITERAL + # BLAH BLAH {nnn}$CRLF + # [nnn bytes of literally transmitted stuff] + # [part of line that follows literal data]$CRLF + + my $expected_size = $1; + + $self->_debug( "LITERAL: received literal in line " + . "$current_line of length $expected_size; attempting to " + . "retrieve from the " + . length($iBuffer) + . " bytes in: $iBuffer" ); + + my $litstring; + if ( length $iBuffer >= $expected_size ) { + + # already received all data + $litstring = substr $iBuffer, 0, $expected_size, ''; + } + else { # literal data still to arrive + $litstring = $iBuffer; + $iBuffer = ''; + + my $litreadb = length($litstring); + my $temperrs = 0; + my $maxagain = $self->Maxtemperrors; + undef $maxagain if $maxagain and lc($maxagain) eq 'unlimited'; + + while ( $expected_size > $litreadb ) { + if ($timeout) { + my $rc = $self->_read_more( $socket, $timeout ); + return undef unless ( $rc > 0 ); + } + else { # 25 ms before retry + CORE::select( undef, undef, undef, 0.025 ); + } + + # $litstring is emptied when $literal_cbtype is GLOB + my $ret = + $self->_sysread( $socket, \$litstring, + $expected_size - $litreadb, + length($litstring) ); + + if ($timeout) { + if ( defined $ret ) { + $temperrs = 0; + } + else { + $emsg = "error while reading data from server: $!"; + if ( $! == ECONNRESET ) { + $self->State(Unconnected); + } + elsif ( $! == EAGAIN ) { + if ( defined $maxagain + && $temperrs++ >= $maxagain ) + { + $emsg .= " ($temperrs)"; + } + else { + undef $emsg; + next; # try again + } + } + } + } + + # EOF: note IO::Socket::SSL does not support eof() + if ( defined $ret and $ret == 0 ) { + $emsg = "socket closed while reading data from server"; + $self->State(Unconnected); + } + elsif ( defined $ret and $ret > 0 ) { + $litreadb += $ret; + + # conserve memory when using literal_callback GLOB + if ( $literal_cbtype eq "GLOB" ) { + print $literal_callback $litstring; + $litstring = "" unless ($emsg); + } + } + + $self->_debug( "Received ret=" + . ( defined($ret) ? $ret : "" ) + . " $litreadb of $expected_size" ); + + # save errors and return + if ($emsg) { + $self->LastError($emsg); + $self->_record( + $transno, + [ + $self->_next_index($transno), "ERROR", + "$transno * NO $emsg" + ] + ); + $litstring = "" unless defined $litstring; + $self->_debug( "ERROR while processing LITERAL, " + . " buffer=\n" + . $litstring + . "\n" ); + return undef; + } + } + } + + if ( defined $litstring ) { + if ( $literal_cbtype eq "GLOB" ) { + print $literal_callback $litstring; + } + elsif ( $literal_cbtype eq "CODE" ) { + $literal_callback->($litstring); + } + } + + push @$oBuffer, [ $index++, 'LITERAL', $litstring ] + if ( $literal_cbtype ne "GLOB" ); + } + } + + $self->_debug( "Read: " . join "", map { "\t" . $_->[DATA] } @$oBuffer ) + if ( $self->Debug ); + + @$oBuffer ? $oBuffer : undef; +} + +sub _sysread { + my ( $self, $fh, $buf, $len, $off ) = @_; + my $rm = $self->Readmethod; + $rm ? $rm->(@_) : sysread( $fh, $$buf, $len, $off ); +} + +sub _read_more { + my $self = shift; + my $rm = $self->Readmoremethod; + $rm ? $rm->( $self, @_ ) : $self->__read_more(@_); +} + +sub __read_more { + my $self = shift; + my $opt = ref( $_[0] ) eq "HASH" ? shift : {}; + my ( $socket, $timeout ) = @_; + + # IO::Socket::SSL buffers some data internally, so there might be some + # data available from the previous sysread of which the file-handle + # (used by select()) doesn't know of. + return 1 if $socket->isa("IO::Socket::SSL") && $socket->pending; + + my $rvec = ''; + vec( $rvec, fileno($socket), 1 ) = 1; + + my $rc = CORE::select( $rvec, undef, $rvec, $timeout ); + + # fast track success + return $rc if $rc > 0; + + # by default set an error on timeout + my $err_on_timeout = + exists $opt->{error_on_timeout} ? $opt->{error_on_timeout} : 1; + + # $rc is 0 then we timed out + return $rc if !$rc and !$err_on_timeout; + + # set the appropriate error and return + my $transno = $self->Transaction; + my $msg = + ( $rc ? "error($rc)" : "timeout" ) + . " waiting ${timeout}s for data from server" + . ( $! ? ": $!" : "" ); + $self->LastError($msg); + $self->_record( $transno, + [ $self->_next_index($transno), "ERROR", "$transno * NO $msg" ] ); + $self->_disconnect; # BUG: can not handle timeouts gracefully + return $rc; +} + +sub _trans_index() { + sort { $a <=> $b } keys %{ $_[0]->{History} }; +} + +# all default to last transaction +sub _transaction(;$) { + @{ $_[0]->{History}{ $_[1] || $_[0]->Transaction } || [] }; +} + +sub _trans_data(;$) { + map { $_->[DATA] } $_[0]->_transaction( $_[1] ); +} + +sub Report { + my $self = shift; + map { $self->_trans_data($_) } $self->_trans_index; +} + +sub LastIMAPCommand(;$) { + my ( $self, $trans ) = @_; + my $msg = ( $self->_transaction($trans) )[0]; + $msg ? $msg->[DATA] : undef; +} + +sub History(;$) { + my ( $self, $trans ) = @_; + my ( $cmd, @a ) = $self->_trans_data($trans); + return wantarray ? @a : \@a; +} + +sub Results(;$) { + my ( $self, $trans ) = @_; + my @a = $self->_trans_data($trans); + return wantarray ? @a : \@a; +} + +sub _transaction_literals() { + my $self = shift; + join '', map { $_->[DATA] } + grep { $self->_is_literal($_) } $self->_transaction; +} + +sub Escaped_results { + my ( $self, $trans ) = @_; + my @a; + my $prevwasliteral = 0; + foreach my $line ( grep defined, $self->_transaction($trans) ) { + my $data = $line->[DATA]; + + # literal is appended to previous data + if ( $self->_is_literal($line) ) { + $data = $self->Escape($data); + $a[-1] .= qq( "$data"); + $prevwasliteral = 1; + } + else { + if ($prevwasliteral) { + $a[-1] .= $data; + } + else { + push( @a, $data ); + } + $prevwasliteral = 0; + } + } + + return wantarray ? @a : \@a; +} + +sub Escape { + my $data = $_[1]; + $data =~ s/([\\\"])/\\$1/og; + return $data; +} + +sub Unescape { + my $data = $_[1]; + $data =~ s/\\([\\\"])/$1/og; + return $data; +} + +sub logout { + my $self = shift; + my $rc = $self->_imap_command( "LOGOUT", "BYE" ); + $self->_disconnect; + return $rc; +} + +sub _disconnect { + my $self = shift; + + delete $self->{CAPABILITY}; + delete $self->{_IMAP4REV1}; + $self->State(Unconnected); + if ( my $sock = delete $self->{Socket} ) { + local ($@); + eval { $sock->close }; + } + return $self; +} + +# LIST/XLIST/LSUB Response +# Contents: name attributes, hierarchy delimiter, name +# Example: * LIST (\Noselect) "/" ~/Mail/foo +# NOTE: in _list_response_preprocess we append literal data so we need +# to be liberal about our matching of folder name data +sub _list_or_lsub_response_parse { + my ( $self, $resp ) = @_; + + return undef unless defined $resp; + my %info; + + $resp =~ s/\015?\012$//; + if ( + $resp =~ / ^\* \s+ (?:LIST|XLIST|LSUB) \s+ # * LIST|XLIST|LSUB + \( ([^\)]*) \) \s+ # (attrs) + (?: \" ([^"]*) \" | NIL ) \s # "delimiter" or NIL + (?:\s*\" (.*) \" | (.*) ) # "name" or name + /ix + ) + { + @info{qw(attrs delim name)} = + ( [ split( / /, $1 ) ], $2, defined($3) ? $self->Unescape($3) : $4 ); + } + return wantarray ? %info : \%info; +} + +# handle listeral data returned in list/lsub responses +# some example responses: +# * LIST () "/" "My Folder" # nothing to do here... +# * LIST () "/" {9} # the {9} is already removed by _read_line() +# Special % # we append this to the previous line +sub _list_response_preprocess { + my ( $self, $data ) = @_; + return undef unless defined $data; + + for ( my $m = 0 ; $m < @$data ; $m++ ) { + if ( $data->[$m] && $data->[$m] !~ /$CR?$LF$/o ) { + $self->_debug("concatenating '$data->[$m]' and '$data->[$m+1]'"); + $data->[$m] .= " " . $data->[ $m + 1 ]; + splice @$data, $m + 1, 1; + } + } + return $data; +} + +sub exists { + my ( $self, $folder ) = @_; + $self->status($folder) ? $self : undef; +} + +# Updated to handle embedded literal strings +sub get_bodystructure { + my ( $self, $msg ) = @_; + + my $class = $self->_load_module("BodyStructure") or return undef; + + my $out = $self->fetch( $msg, "BODYSTRUCTURE" ) or return undef; + + my $bs = ""; + my $output = first { /BODYSTRUCTURE\s+\(/i } @$out; + + unless ( $output =~ /$CRLF$/o ) { + $output = ''; + $self->_debug("get_bodystructure: reassembling original response"); + my $started = 0; + foreach my $o ( $self->_transaction ) { + next unless $self->_is_output_or_literal($o); + $started++ if $o->[DATA] =~ /BODYSTRUCTURE \(/i; + $started or next; + + if ( length($output) && $self->_is_literal($o) ) { + my $data = $o->[DATA]; + $data =~ s/"/\\"/g; + $data =~ s/\(/\\\(/g; + $data =~ s/\)/\\\)/g; + $output .= qq("$data"); + } + else { + $output .= $o->[DATA]; + } + } + $self->_debug("get_bodystructure: reassembled output=$output"); + } + + { + local ($@); + $bs = eval { $class->new($output) }; + } + + $self->_debug( + "get_bodystructure: msg $msg returns: " . ( $bs || "UNDEF" ) ); + $bs; +} + +# Updated to handle embedded literal strings +sub get_envelope { + my ( $self, $msg ) = @_; + + # Envelope class is defined within BodyStructure + my $class = $self->_load_module("BodyStructure") or return undef; + $class .= "::Envelope"; + + my $out = $self->fetch( $msg, 'ENVELOPE' ) or return undef; + + my $bs = ""; + my $output = first { /ENVELOPE \(/i } @$out; + + unless ( $output =~ /$CRLF$/o ) { + $output = ''; + $self->_debug("get_envelope: reassembling original response"); + my $started = 0; + foreach my $o ( $self->_transaction ) { + next unless $self->_is_output_or_literal($o); + $started++ if $o->[DATA] =~ /ENVELOPE \(/i; + $started or next; + + if ( length($output) && $self->_is_literal($o) ) { + my $data = $o->[DATA]; + $data =~ s/"/\\"/g; + $data =~ s/\(/\\\(/g; + $data =~ s/\)/\\\)/g; + $output .= qq("$data"); + } + else { + $output .= $o->[DATA]; + } + } + $self->_debug("get_envelope: reassembled output=$output"); + } + + { + local ($@); + $bs = eval { $class->new($output) }; + } + + $self->_debug( "get_envelope: msg $msg returns: " . ( $bs || "UNDEF" ) ); + $bs; +} + +# fetch( [{option},] [$seq_set|ALL], @msg_data_items ) +# options: +# escaped => 0|1 # return Results or Escaped_results +sub fetch { + my $self = shift; + my $opt = ref( $_[0] ) eq "HASH" ? shift : {}; + my $what = shift || "ALL"; + + my $take = $what; + if ( $what eq 'ALL' ) { + my $msgs = $self->messages or return undef; + $take = $self->Range($msgs); + } + elsif ( ref $what || $what =~ /^[,:\d]+\w*$/ ) { + $take = $self->Range($what); + } + + my ( @data, $cmd ); + my ( $seq_set, @fetch_att ) = $self->_split_sequence( $take, "FETCH", @_ ); + + for ( my $x = 0 ; $x <= $#$seq_set ; $x++ ) { + my $seq = $seq_set->[$x]; + $self->_imap_uid_command( FETCH => $seq, @fetch_att, @_ ) + or return undef; + my $res = $opt->{escaped} ? $self->Escaped_results : $self->Results; + + # only keep last command and last response (* OK ...) + $cmd = shift(@$res); + pop(@$res) if ( $x != $#{$seq_set} ); + push( @data, @$res ); + } + + if ( $cmd and !wantarray ) { + $cmd =~ s/^(\d+\s+.*?FETCH\s+)\S+(\s*)/$1$take$2/; + unshift( @data, $cmd ); + } + + #wantarray ? $self->History : $self->Results; + return wantarray ? @data : \@data; +} + +# Some servers have a maximum command length. If Maxcommandlength is +# set, split a sequence to fit within the length restriction. +sub _split_sequence { + my ( $self, $take, @args ) = @_; + + # split take => sequence-set and (optional) fetch-att + my ( $seq, @att ) = split( / /, $take, 2 ); + + # use the entire sequence unless Maxcommandlength is set + my @seqs; + my $maxl = $self->Maxcommandlength; + if ($maxl) { + + # estimate command length, the sum of the lengths of: + # tag, command, fetch-att + $CRLF + push @args, $self->Transaction, $self->Uid ? "UID" : (), "\015\012"; + + # do not split on anything smaller than 64 chars + my $clen = length join( " ", @att, @args ); + my $diff = $maxl - $clen; + my $most = $diff > 64 ? $diff : 64; + + @seqs = ( $seq =~ m/(.{1,$most})(?:,|$)/g ) if defined $seq; + $self->_debug( "split_sequence: length($maxl-$clen) parts: ", + $#seqs + 1 ) + if ( $#seqs != 0 ); + } + else { + push( @seqs, $seq ) if defined $seq; + } + return \@seqs, @att; +} + +# fetch_hash( [$seq_set|ALL], @msg_data_items, [\%msg_by_ids] ) +# - TODO: make more efficient use of memory on large fetch results +sub fetch_hash { + my $self = shift; + my $uids = ref $_[-1] ? pop @_ : {}; + my @words = @_; + + # take an optional leading list of messages argument or default to + # ALL let fetch turn that list of messages into a msgref as needed + # fetch has similar logic for dealing with message list + my $msgs = 'ALL'; + if ( $words[0] ) { + if ( ref $words[0] ) { + $msgs = shift @words; + } + elsif ( $#words > 0 ) { + if ( $words[0] eq 'ALL' ) { + $msgs = shift @words; + } + elsif ( $words[0] =~ s/^([,:\d]+)\s*// ) { + $msgs = $1; + shift @words if $words[0] eq ""; + } + } + } + + # message list (if any) is now removed from @words + my $what = join( " ", @words ); + + # RFC 3501: + # fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" / + # fetch-att / "(" fetch-att *(SP fetch-att) ")") + my %macro = ( + "ALL" => [qw(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)], + "FULL" => [qw(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY)], + "FAST" => [qw(FLAGS INTERNALDATE RFC822.SIZE)], + ); + + if ( $macro{$what} ) { + @words = @{ $macro{$what} }; + } + else { + $what = "($what)"; + my @twords; + foreach my $word (@words) { + $word = uc($word); + + # server response to BODY[]<10.20> is a field named BODY[]<10> + if ( $word =~ /^BODY/ ) { + $word =~ s/<(\d+)\.\d+>$/<$1>/; + + # server response to BODY.PEEK[] is a field named BODY[] + # BUG? allow for BODY.PEEK in response (historical behavior) + if ( $word =~ /^BODY\.PEEK/ ) { + push( @twords, $word ); + $word =~ s/^BODY\.PEEK/BODY/; + } + } + unshift( @twords, $word ); + } + @words = @twords; + } + + my %words = map { $_ => 1 } @words; + + my $output = $self->fetch( $msgs, $what ) + or return undef; + + while ( my $l = shift @$output ) { + next if $l !~ m/^\*\s(\d+)\sFETCH\s\(/g; + my ( $mid, $entry ) = ( $1, {} ); + my ( $key, $value ); + ATTR: + while ( $l and $l !~ m/\G\s*\)\s*$/gc ) { + if ( $l =~ m/\G\s*([^\s\[]+(?:\[[^\]]*\])?(?:<[^>]*>)?)\s*/gc ) { + $key = uc($1); + } + elsif ( !defined $key ) { + + # some kind of malformed response + $self->LastError("Invalid item name in FETCH response: $l"); + return undef; + } + if ( $l =~ m/\G\s*$/gc ) { + $value = shift @$output; + $entry->{$key} = $value; + $l = shift @$output; + next ATTR; + } + elsif ( $l =~ m/\G(?:"(.*?)(?:(?{$key} = $value; + next ATTR; + } + elsif ( $l =~ m/\G\(/gc ) { + my $depth = 1; + $value = ""; + while ( $l =~ m/\G(\(|\)|[^()]+)/gc ) { + my $stuff = $1; + if ( $stuff eq "(" ) { + $depth++; + $value .= "("; + } + elsif ( $stuff eq ")" ) { + $depth--; + if ( $depth == 0 ) { + $entry->{$key} = $value; + next ATTR; + } + $value .= ")"; + } + else { + $value .= $stuff; + } + + # consume literal data if any + if ( $l =~ m/\G\s*$/gc and scalar(@$output) ) { + my $elit = $self->Escape( shift @$output ); + $l = shift @$output; + $value .= ( length($value) ? " " : "" ) . qq{"$elit"}; + } + } + $l =~ m/\G\s*/gc; + } + else { + $self->LastError("Invalid item value in FETCH response: $l"); + return undef; + } + } + + if ( $self->Uid ) { + $uids->{ $entry->{UID} } = $entry; + } + else { + $uids->{$mid} = $entry; + } + + # remove things not asked for (i.e. UID/$mid) + for my $word ( keys %$entry ) { + next if ( exists $words{$word} ); + delete $entry->{$word}; + } + } + + return wantarray ? %$uids : $uids; +} + +sub store { + my ( $self, @a ) = @_; + $self->_imap_uid_command( STORE => @a ) + or return undef; + return wantarray ? $self->History : $self->Results; +} + +sub _imap_folder_command($$@) { + my ( $self, $command ) = ( shift, shift ); + my $folder = $self->Massage(shift); + + $self->_imap_command( join ' ', $command, $folder, @_ ) + or return undef; + + return wantarray ? $self->History : $self->Results; +} + +sub subscribe($) { shift->_imap_folder_command( SUBSCRIBE => @_ ) } +sub unsubscribe($) { shift->_imap_folder_command( UNSUBSCRIBE => @_ ) } +sub create($) { shift->_imap_folder_command( CREATE => @_ ) } + +sub delete($) { + my $self = shift; + $self->_imap_folder_command( DELETE => @_ ) or return undef; + $self->Folder(undef); + return wantarray ? $self->History : $self->Results; +} + +# rfc2086 +sub myrights($) { $_[0]->_imap_folder_command( MYRIGHTS => $_[1] ) } + +sub close { + my $self = shift; + $self->_imap_command('CLOSE') + or return undef; + return wantarray ? $self->History : $self->Results; +} + +sub expunge { + my ( $self, $folder ) = @_; + + return undef unless ( defined $folder or defined $self->Folder ); + + my $old = defined $self->Folder ? $self->Folder : ''; + + if ( !defined($folder) || $folder eq $old ) { + $self->_imap_command('EXPUNGE') + or return undef; + } + else { + $self->select($folder) or return undef; + my $succ = $self->_imap_command('EXPUNGE'); + + # if $old eq '' IMAP4 select should close $folder without EXPUNGE + return undef unless ( $self->select($old) and $succ ); + } + + return wantarray ? $self->History : $self->Results; +} + +sub uidexpunge { + my ( $self, $msgspec ) = ( shift, shift ); + + return undef unless $self->has_capability("UIDPLUS"); + + my $msg = + UNIVERSAL::isa( $msgspec, 'Mail::IMAPClient::MessageSet' ) + ? $msgspec + : $self->Range($msgspec); + + $msg->cat(@_) if @_; + + if ( $self->Uid ) { + $self->_imap_command("UID EXPUNGE $msg") + or return undef; + } + else { + $self->LastError("Uid must be enabled for uidexpunge"); + return undef; + } + + return wantarray ? $self->History : $self->Results; +} + +sub rename { + my ( $self, $from, $to ) = @_; + + $from = ( $from eq "" ) ? qq("") : $self->Massage($from); + $to = ( $to eq "" ) ? qq("") : $self->Massage($to); + + $self->_imap_command(qq(RENAME $from $to)) ? $self : undef; +} + +sub status { + my ( $self, $folder ) = ( shift, shift ); + defined $folder or return undef; + + my $which = @_ ? join( " ", @_ ) : 'MESSAGES'; + + my $box = $self->Massage($folder); + $self->_imap_command("STATUS $box ($which)") + or return undef; + + return wantarray ? $self->History : $self->Results; +} + +sub flags { + my ( $self, $msgspec ) = ( shift, shift ); + my $msg = + UNIVERSAL::isa( $msgspec, 'Mail::IMAPClient::MessageSet' ) + ? $msgspec + : $self->Range($msgspec); + + $msg->cat(@_) if @_; + + # Send command + my $ref = $self->fetch( $msg, "FLAGS" ) or return undef; + + my $u_f = $self->Uid; + my $flagset = {}; + + # Parse results, setting entry in result hash for each line + foreach my $line (@$ref) { + $self->_debug("flags: line = '$line'"); + if ( + $line =~ /\* \s+ (\d+) \s+ FETCH \s+ # * nnn FETCH + \( + (?:\s* UID \s+ (\d+) \s* )? # optional: UID nnn + FLAGS \s* \( (.*?) \) \s* # FLAGS (\Flag1 \Flag2) + (?:\s* UID \s+ (\d+) \s* )? # optional: UID nnn + \) + /x + ) + { + my $mailid = $u_f ? ( $2 || $4 ) : $1; + $flagset->{$mailid} = [ split " ", $3 ]; + } + } + + # Or did he want a hash from msgid to flag array? + return $flagset + if ref $msgspec; + + # or did the guy want just one response? Return it if so + my $flagsref = $flagset->{$msgspec}; + return wantarray ? @$flagsref : $flagsref; +} + +# reduce a list, stripping undeclared flags. Flags with or without +# leading backslash. +sub supported_flags(@) { + my $self = shift; + my $sup = $self->Supportedflags + or return @_; + + return map { $sup->($_) } @_ + if ref $sup eq 'CODE'; + + grep { $sup->{ /^\\(\S+)/ ? lc $1 : () } } @_; +} + +sub parse_headers { + my ( $self, $msgspec, @fields ) = @_; + my $fields = join ' ', @fields; + my $msg = ref $msgspec eq 'ARRAY' ? $self->Range($msgspec) : $msgspec; + my $peek = !defined $self->Peek || $self->Peek ? '.PEEK' : ''; + + my $string = "$msg BODY$peek" + . ( $fields eq 'ALL' ? '[HEADER]' : "[HEADER.FIELDS ($fields)]" ); + + my $raw = $self->fetch($string) or return undef; + my $cmd = shift @$raw; + + my %headers; # message ids to headers + my $h; # fields for current msgid + my $field; # previous field name, for unfolding + my %fieldmap = map { ( lc($_) => $_ ) } @fields; + my $msgid; + + # BUG: parsing this way is prone to be buggy but works most of the time + # some example responses: + # * OK Message 1 no longer exists + # * 1 FETCH (UID 26535 BODY[HEADER] "") + # * 5 FETCH (UID 30699 BODY[HEADER] {1711} + # header: value... + foreach my $header ( map { split /$CR?$LF/o } @$raw ) { + + # Windows2003/Maillennium/others? have UID after headers + if ( + $header =~ s/^\* \s+ (\d+) \s+ FETCH \s+ + \( (.*?) BODY\[HEADER (?:\.FIELDS)? .*? \]\s*//ix + ) + { # start new message header + ( $msgid, my $msgattrs ) = ( $1, $2 ); + $h = {}; + if ( $self->Uid ) # undef when win2003 + { + $msgid = $msgattrs =~ m/\b UID \s+ (\d+)/x ? $1 : undef; + } + $headers{$msgid} = $h if $msgid; + } + $header =~ /\S/ or next; # skip empty lines. + + # ( for vi + if ( $header =~ /^\)/ ) { # end of this message + undef $h; # inbetween headers + next; + } + elsif ( !$msgid && $header =~ /^\s*UID\s+(\d+).*\)$/ ) { + $headers{$1} = $h; # found UID win2003/Maillennium + + undef $h; + next; + } + + unless ( defined $h ) { + $self->_debug("found data between fetch headers: $header"); + next; + } + + if ( $header and $header =~ s/^(\S+)\:\s*// ) { + $field = $fieldmap{ lc $1 } || $1; + push @{ $h->{$field} }, $header; + } + elsif ( $field and ref $h->{$field} eq 'ARRAY' ) { # folded header + $h->{$field}[-1] .= $header; + } + else { + + # show data if it is not like '"")' or '{123}' + $self->_debug("non-header data between fetch headers: $header") + if ( $header !~ /^(?:\s*\"\"\)|\{\d+\})$CR?$LF$/o ); + } + } + + # if we asked for one message, just return its hash, + # otherwise, return hash of numbers => header hash + ref $msgspec eq 'ARRAY' ? \%headers : $headers{$msgspec}; +} + +sub subject { $_[0]->get_header( $_[1], "Subject" ) } +sub date { $_[0]->get_header( $_[1], "Date" ) } +sub rfc822_header { shift->get_header(@_) } + +sub get_header { + my ( $self, $msg, $field ) = @_; + my $headers = $self->parse_headers( $msg, $field ); + $headers ? $headers->{$field}[0] : undef; +} + +sub recent_count { + my ( $self, $folder ) = ( shift, shift ); + + $self->status( $folder, 'RECENT' ) + or return undef; + + my $r = + first { s/\*\s+STATUS\s+.*\(RECENT\s+(\d+)\s*\)/$1/ } $self->History; + chomp $r; + $r; +} + +sub message_count { + my $self = shift; + my $folder = shift || $self->Folder; + + $self->status( $folder, 'MESSAGES' ) + or return undef; + + foreach my $result ( $self->Results ) { + return $1 if $result =~ /\(MESSAGES\s+(\d+)\s*\)/i; + } + + undef; +} + +sub recent() { shift->search('recent') } +sub seen() { shift->search('seen') } +sub unseen() { shift->search('unseen') } +sub messages() { shift->search('ALL') } + +sub sentbefore($$) { shift->_search_date( sentbefore => @_ ) } +sub sentsince($$) { shift->_search_date( sentsince => @_ ) } +sub senton($$) { shift->_search_date( senton => @_ ) } +sub since($$) { shift->_search_date( since => @_ ) } +sub before($$) { shift->_search_date( before => @_ ) } +sub on($$) { shift->_search_date( on => @_ ) } + +sub _search_date($$$) { + my ( $self, $how, $time ) = @_; + my $imapdate; + + if ( $time =~ /\d\d-\D\D\D-\d\d\d\d/ ) { + $imapdate = $time; + } + elsif ( $time =~ /^\d+$/ ) { + my @ltime = localtime $time; + $imapdate = sprintf( "%2.2d-%s-%4.4d", + $ltime[3], + $mnt[ $ltime[4] ], + $ltime[5] + 1900 ); + } + else { + $self->LastError("Invalid date format supplied for '$how': $time"); + return undef; + } + + $self->_imap_uid_command( SEARCH => $how, $imapdate ) + or return undef; + + my @hits; + foreach ( $self->History ) { + chomp; + s/$CR?$LF$//o; + s/^\*\s+SEARCH\s+//i or next; + push @hits, grep /\d/, split; + } + $self->_debug("Hits are: @hits"); + return wantarray ? @hits : \@hits; +} + +sub or { + my ( $self, @what ) = @_; + if ( @what < 2 ) { + $self->LastError("Invalid number of arguments passed to or()"); + return undef; + } + + my $or = "OR " + . $self->Massage( shift @what ) . " " + . $self->Massage( shift @what ); + + $or = "OR $or " . $self->Massage($_) for @what; + + $self->_imap_uid_command( SEARCH => $or ) + or return undef; + + my @hits; + foreach ( $self->History ) { + chomp; + s/$CR?$LF$//o; + s/^\*\s+SEARCH\s+//i or next; + push @hits, grep /\d/, split; + } + $self->_debug("Hits are now: @hits"); + + return wantarray ? @hits : \@hits; +} + +sub disconnect { shift->logout } + +sub _quote_search { + my ( $self, @args ) = @_; + my @ret; + foreach my $v (@args) { + if ( ref($v) eq "SCALAR" ) { + push( @ret, $$v ); + } + elsif ( exists $SEARCH_KEYS{ uc($v) } ) { + push( @ret, $v ); + } + elsif ( @args == 1 ) { + push( @ret, $v ); # <3.17 compat: caller responsible for quoting + } + else { + push( @ret, $self->Quote($v) ); + } + } + return @ret; +} + +sub search { + my ( $self, @args ) = @_; + + @args = $self->_quote_search(@args); + + $self->_imap_uid_command( SEARCH => @args ) + or return undef; + + my @hits; + foreach ( $self->History ) { + chomp; + s/$CR?$LF$//o; + s/^\*\s+SEARCH\s+(?=.*?\d)// or next; + push @hits, grep /^\d+$/, split; + } + + @hits + or $self->_debug("Search successful but found no matching messages"); + + # return empty list + return + wantarray ? @hits + : !@hits ? \@hits + : $self->Ranges ? $self->Range( \@hits ) + : \@hits; +} + +# returns a Thread data structure +my $thread_parser; + +sub thread { + my $self = shift; + + return undef unless defined $self->has_capability("THREAD=REFERENCES"); + my $algorythm = shift + || ( + $self->has_capability("THREAD=REFERENCES") + ? 'REFERENCES' + : 'ORDEREDSUBJECT' + ); + + my $charset = shift || 'UTF-8'; + my @a = @_ ? @_ : 'ALL'; + + $a[-1] = $self->Massage( $a[-1], 1 ) + if @a > 1 && !exists $SEARCH_KEYS{ uc $a[-1] }; + + $self->_imap_uid_command( THREAD => $algorythm, $charset, @a ) + or return undef; + + unless ($thread_parser) { + return if ( defined($thread_parser) and $thread_parser == 0 ); + + my $class = $self->_load_module("Thread"); + unless ($class) { + $thread_parser = 0; + return undef; + } + $thread_parser = $class->new; + } + + my $thread; + foreach ( $self->History ) { + /^\*\s+THREAD\s+/ or next; + s/$CR?$LF|$LF+/ /og; + $thread = $thread_parser->start($_); + } + + unless ($thread) { + $self->LastError( +"Thread search completed successfully but found no matching messages" + ); + return undef; + } + + $thread; +} + +sub delete_message { + my $self = shift; + my @msgs = map { ref $_ eq 'ARRAY' ? @$_ : split /\,/ } @_; + + $self->store( join( ',', @msgs ), '+FLAGS.SILENT', '(\Deleted)' ) + ? scalar @msgs + : undef; +} + +sub restore_message { + my $self = shift; + my $msgs = join ',', map { ref $_ eq 'ARRAY' ? @$_ : split /\,/ } @_; + + $self->store( $msgs, '-FLAGS', '(\Deleted)' ) or return undef; + scalar grep /^\*\s\d+\sFETCH\s\(.*FLAGS.*(?!\\Deleted)/, $self->Results; +} + +sub uidvalidity { + my ( $self, $folder ) = @_; + $self->status( $folder, "UIDVALIDITY" ) or return undef; + my $line = first { /UIDVALIDITY/i } $self->History; + defined $line && $line =~ /\(UIDVALIDITY\s+([^\)]+)/ ? $1 : undef; +} + +sub uidnext { + my ( $self, $folder ) = @_; + $self->status( $folder, "UIDNEXT" ) or return undef; + my $line = first { /UIDNEXT/i } $self->History; + defined $line && $line =~ /\(UIDNEXT\s+([^\)]+)/ ? $1 : undef; +} + +sub capability { + my $self = shift; + + if ( $self->{CAPABILITY} ) { + my @caps = keys %{ $self->{CAPABILITY} }; + return wantarray ? @caps : \@caps; + } + + $self->_imap_command('CAPABILITY') + or return undef; + + my @caps = map { split } grep s/^\*\s+CAPABILITY\s+//, $self->History; + foreach (@caps) { + $self->{CAPABILITY}{ uc $_ }++; + $self->{ uc $1 } = uc $2 if /(.*?)\=(.*)/; + } + + return wantarray ? @caps : \@caps; +} + +# use "" not undef when lookup fails to differentiate imap command +# failure vs lack of capability +sub has_capability { + my ( $self, $which ) = @_; + $self->capability or return undef; + $which ? $self->{CAPABILITY}{ uc $which } : ""; +} + +sub imap4rev1 { + my $self = shift; + return $self->{_IMAP4REV1} if exists $self->{_IMAP4REV1}; + $self->{_IMAP4REV1} = $self->has_capability('IMAP4REV1'); +} + +#??? what a horror! +sub namespace { + + # Returns a nested list as follows: + # [ + # [ + # [ $user_prefix, $user_delim ] (,[$user_prefix2 ,$user_delim ],...), + # ], + # [ + # [ $shared_prefix,$shared_delim] (,[$shared_prefix2,$shared_delim],... ), + # ], + # [ + # [$public_prefix, $public_delim] (,[$public_prefix2,$public_delim],...), + # ], + # ]; + + my $self = shift; + unless ( $self->has_capability("NAMESPACE") ) { + $self->LastError( "NO NAMESPACE not supported by " . $self->Server ) + unless $self->LastError; + return undef; + } + + my $got = $self->_imap_command("NAMESPACE") or return undef; + my @namespaces = map { /^\* NAMESPACE (.*)/ ? $1 : () } $got->Results; + + my $namespace = shift @namespaces; + $namespace =~ s/$CR?$LF$//o; + + my ( $personal, $shared, $public ) = $namespace =~ m# + (NIL|\((?:\([^\)]+\)\s*)+\))\s + (NIL|\((?:\([^\)]+\)\s*)+\))\s + (NIL|\((?:\([^\)]+\)\s*)+\)) + #xi; + + my @ns; + $self->_debug("NAMESPACE: pers=$personal, shared=$shared, pub=$public"); + foreach ( $personal, $shared, $public ) { + uc $_ ne 'NIL' or next; + s/^\((.*)\)$/$1/; + + my @pieces = m#\(([^\)]*)\)#g; + $self->_debug("NAMESPACE pieces: @pieces"); + + push @ns, [ map { [m#"([^"]*)"\s*#g] } @pieces ]; + } + + return wantarray ? @ns : \@ns; +} + +sub internaldate { + my ( $self, $msg ) = @_; + $self->_imap_uid_command( FETCH => $msg, 'INTERNALDATE' ) + or return undef; + my $hist = join '', $self->History; + return $hist =~ /\bINTERNALDATE "([^"]*)"/i ? $1 : undef; +} + +sub is_parent { + my ( $self, $folder ) = ( shift, shift ); + my $list = $self->list( undef, $folder ) or return undef; + + my $attrs; + foreach my $resp (@$list) { + my $rec = $self->_list_or_lsub_response_parse($resp); + next unless defined $rec->{attrs}; + return 0 if $rec->{attrs} =~ /\bNoInferior\b/i; + $attrs = $rec->{attrs}; + } + + if ($attrs) { + return 1 if $attrs =~ /HasChildren/i; + return 0 if $attrs =~ /HasNoChildren/i; + } + else { + $self->_debug( join( "\n\t", "no attrs for '$folder' in:", @$list ) ); + } + + # BUG? This may be overkill for normal use cases... + # flag not supported or not returned for some reason, try via folders() + my $sep = $self->separator($folder) || $self->separator(undef); + return undef unless defined $sep; + + my $lead = $folder . $sep; + my $len = length $lead; + scalar grep { $lead eq substr( $_, 0, $len ) } $self->folders; +} + +sub selectable { + my ( $self, $f ) = @_; + my $info = $self->list( "", $f ) or return undef; + return not( grep /\b\\Noselect\b/i, @$info ); +} + +# append( $self, $folder, $text [, $optmsg] ) +# - conserve memory and use $_[0] to avoid copying $text (it may be huge!) +# - BUG?: should deprecate this method in favor of append_string +sub append { + my $self = shift; + my $folder = shift; + + # $message_string is whatever is left in @_ + $self->append_string( $folder, ( @_ > 1 ? join( $CRLF, @_ ) : $_[0] ) ); +} + +sub _clean_flags { + my ( $self, $flags ) = @_; + $flags =~ s/^\s+//; + $flags =~ s/\s+$//; + $flags = "($flags)" if $flags !~ /^\(.*\)$/; + return $flags; +} + +# RFC 3501: date-day-fixed = (SP DIGIT) / 2DIGIT +sub _clean_date { + my ( $self, $date ) = @_; + $date =~ s/^\s+// if $date !~ /^\s\d/; + $date =~ s/\s+$//; + $date = qq("$date") if $date !~ /^"/; + return $date; +} + +sub _append_command { + my ( $self, $folder, $flags, $date, $length ) = @_; + return join( " ", + "APPEND $folder", + ( $flags ? $flags : () ), + ( $date ? $date : () ), + "{" . $length . "}", + ); +} + +# append_string( $self, $folder, $text, $flags, $date ) +# - conserve memory and use $_[2] to avoid copying $text (it may be huge!) +sub append_string($$$;$$) { + my ( $self, $folder, $flags, $date ) = @_[ 0, 1, 3, 4 ]; + + #my $text = $_[2]; # conserve memory and use $_[2] instead! + my $maxl = $self->Maxappendstringlength; + + # on "large" strings use append_file to conserve memory + if ( $_[2] and $maxl and length( $_[2] ) > $maxl ) { + $self->_debug("append_string: using in memory file"); + return $self->append_file( $folder, \( $_[2] ), undef, $flags, $date ); + } + + my $text = defined( $_[2] ) ? $_[2] : ''; + + $folder = $self->Massage($folder); + $flags = $self->_clean_flags($flags) if ( defined $flags ); + $date = $self->_clean_date($date) if ( defined $date ); + $text =~ s/\r?\n/$CRLF/og; + + my $cmd = $self->_append_command( $folder, $flags, $date, length($text) ); + $cmd .= $CRLF . $text . $CRLF; + + $self->_imap_command( { addcrlf => 0 }, $cmd ) or return undef; + + my $data = join '', $self->Results; + + # look for something like return size or self if no size found: + # OK [APPENDUID ] APPEND completed + my $ret = $data =~ m#\s+(\d+)\]# ? $1 : $self; + + return $ret; +} + +# BUG?: not much/any savings on cygwin perl 5.10 when using in memory file +# BUG?: we do not retry if sending data fails after getting the OK to send +sub append_file { + my ( $self, $folder, $file, $control, $flags, $date ) = @_; + + my @err; + push( @err, "folder not specified" ) + unless ( defined($folder) and $folder ne "" ); + + my $fh; + if ( !defined($file) ) { + push( @err, "file not specified" ); + } + elsif ( ref($file) and ref($file) ne "SCALAR" ) { + $fh = $file; # let the caller pass in their own file handle directly + } + elsif ( !ref($file) and !-f $file ) { + push( @err, "file '$file' not found" ); + } + else { + + # $file can be a name or a scalar reference (for in memory file) + # avoid IO::File bug handling scalar refs in perl <= 5.8.8? + # - buggy: $fh = IO::File->new( $file, 'r' ) + local ($!); + open( $fh, "<", $file ) + or push( @err, "Unable to open file '$file': $!" ); + } + + if (@err) { + $self->LastError( join( ", ", @err ) ); + return undef; + } + + binmode($fh); + + $folder = $self->Massage($folder) if ( defined $folder ); + $flags = $self->_clean_flags($flags) if ( defined $flags ); + + # allow the date to be specified or even use mtime on file + if ($date) { + $date = $self->Rfc3501_datetime( ( stat($fh) )[9] ) if ( $date eq "1" ); + $date = $self->_clean_date($date); + } + + # BUG? seems wasteful to do this always, provide a "fast path" option? + my $length = 0; + { + local $/ = "\n"; # just in case global is not default + while ( my $line = <$fh> ) { # do no read the whole file at once! + $line =~ s/\r?\n$/$CRLF/; + $length += length($line); + } + seek( $fh, 0, 0 ); + } + + my $cmd = $self->_append_command( $folder, $flags, $date, $length ); + my $rc = $self->_imap_command( $cmd, '+' ); + unless ($rc) { + $self->LastError( "Error sending '$cmd': " . $self->LastError ); + return undef; + } + + # Now send the message itself + my ( $buffer, $buflen ) = ( "", 0 ); + until ( !$buflen and eof($fh) ) { + + if ( $buflen < APPEND_BUFFER_SIZE ) { + FILLBUFF: + while ( my $line = <$fh> ) { + $line =~ s/\r?\n$/$CRLF/; + $buffer .= $line; + $buflen = length($buffer); + last FILLBUFF if ( $buflen >= APPEND_BUFFER_SIZE ); + } + } + + # exit loop entirely if we are out of data + last unless $buflen; + + # save anything over desired buffer size for next iteration + my $savebuff = + ( $buflen > APPEND_BUFFER_SIZE ) + ? substr( $buffer, APPEND_BUFFER_SIZE ) + : undef; + + # reduce buffer to desired size + $buffer = substr( $buffer, 0, APPEND_BUFFER_SIZE ); + + my $bytes_written = $self->_send_bytes( \$buffer ); + unless ($bytes_written) { + $self->LastError( "Error appending message: " . $self->LastError ); + return undef; + } + + # retain any saved data and continue loop + $buffer = defined($savebuff) ? $savebuff : ""; + $buflen = length($buffer); + } + + # finish off append + unless ( $self->_send_bytes( \$CRLF ) ) { + $self->LastError( "Error appending CRLF: " . $self->LastError ); + return undef; + } + + # Now for the crucial test: Did the append work or not? + # look for " (OK|BAD|NO)" + my $code = $self->_get_response( $self->Count ) or return undef; + + if ( $code eq 'OK' ) { + my $data = join '', $self->Results; + + # look for something like return size or self if no size found: + # OK [APPENDUID ] APPEND completed + my $ret = $data =~ m#\s+(\d+)\]# ? $1 : $self; + + return $ret; + } + else { + return undef; + } +} + +# BUG? we should retry if "socket closed while..." but do not currently +sub authenticate { + my ( $self, $scheme, $response ) = @_; + $scheme ||= $self->Authmechanism; + $response ||= $self->Authcallback; + my $clear = $self->Clear; + $self->Clear($clear) + if $self->Count >= $clear && $clear > 0; + + if ( !$scheme ) { + $self->LastError("Authmechanism not set"); + return undef; + } + elsif ( $scheme eq 'LOGIN' ) { + $self->LastError("Authmechanism LOGIN is invalid, use login()"); + return undef; + } + + my $string = "AUTHENTICATE $scheme"; + + # use _imap_command for retry mechanism... + $self->_imap_command( $string, '+' ) or return undef; + + my $count = $self->Count; + my $code; + + # look for "+ " or just "+" + foreach my $line ( $self->Results ) { + if ( $line =~ /^\+\s*(.*?)\s*$/ ) { + $code = $1; + last; + } + } + + # BUG? use _load_module for these too? + if ( $scheme eq 'CRAM-MD5' ) { + $response ||= sub { + my ( $code, $client ) = @_; + require Digest::HMAC_MD5; + my $hmac = + Digest::HMAC_MD5::hmac_md5_hex( decode_base64($code), + $client->Password ); + encode_base64( $client->User . " " . $hmac, '' ); + }; + } + elsif ( $scheme eq 'DIGEST-MD5' ) { + $response ||= sub { + my ( $code, $client ) = @_; + require Authen::SASL; + require Digest::MD5; + + my $authname = + defined $client->Authuser ? $client->Authuser : $client->User; + + my $sasl = Authen::SASL->new( + mechanism => 'DIGEST-MD5', + callback => { + user => $client->User, + pass => $client->Password, + authname => $authname + } + ); + + # client_new is an empty function for DIGEST-MD5 + my $conn = $sasl->client_new( 'imap', 'localhost', '' ); + my $answer = $conn->client_step( decode_base64 $code); + + encode_base64( $answer, '' ) + if defined $answer; + }; + } + elsif ( $scheme eq 'PLAIN' ) { # PLAIN SASL + $response ||= sub { + my ( $code, $client ) = @_; + encode_base64( # [authname] user password + join( + chr(0), + defined $client->Proxy + ? ( $client->User, $client->Proxy ) + : ( "", $client->User ), + defined $client->Password ? $client->Password : "", + ), + '' + ); + }; + } + elsif ( $scheme eq 'NTLM' ) { + $response ||= sub { + my ( $code, $client ) = @_; + + require Authen::NTLM; + Authen::NTLM::ntlm_user( $client->User ); + Authen::NTLM::ntlm_password( $client->Password ); + Authen::NTLM::ntlm_domain( $client->Domain ) if $client->Domain; + Authen::NTLM::ntlm($code); + }; + } + + my $resp = $response->( $code, $self ); + unless ( defined($resp) ) { + $self->LastError( "Error getting $scheme data: " . $self->LastError ); + return undef; + } + unless ( $self->_send_line($resp) ) { + $self->LastError( "Error sending $scheme data: " . $self->LastError ); + return undef; + } + + # this code may be a little too custom to try and use _get_response() + # look for "+ " (not just "+") otherwise " (OK|BAD|NO)" + undef $code; + until ($code) { + my $output = $self->_read_line or return undef; + foreach my $o (@$output) { + $self->_record( $count, $o ); + $code = $o->[DATA] =~ /^\+\s+(.*?)\s*$/ ? $1 : undef; + + if ($code) { + unless ( $self->_send_line( $response->( $code, $self ) ) ) { + $self->LastError( + "Error sending $scheme data: " . $self->LastError ); + return undef; + } + undef $code; # clear code as we are not finished yet + } + + if ( $o->[DATA] =~ /^$count\s+(OK|NO|BAD)\b/i ) { + $code = uc($1); + $self->LastError( $o->[DATA] ) unless ( $code eq 'OK' ); + } + elsif ( $o->[DATA] =~ /^\*\s+BYE/ ) { + $self->State(Unconnected); + $self->LastError( $o->[DATA] ); + return undef; + } + } + } + + return undef unless $code eq 'OK'; + + Authen::NTLM::ntlm_reset() + if $scheme eq 'NTLM'; + + $self->State(Authenticated); + return $self; +} + +# UIDPLUS response from a copy: [COPYUID (uidvalidity) (origuid) (newuid)] +sub copy { + my ( $self, $target, @msgs ) = @_; + + my $msgs = + $self->Ranges + ? $self->Range(@msgs) + : join ',', map { ref $_ ? @$_ : $_ } @msgs; + + $self->_imap_uid_command( COPY => $msgs, $self->Massage($target) ) + or return undef; + + my @results = $self->History; + + my @uids; + foreach (@results) { + chomp; + s/$CR?$LF$//o; + s/^.*\[COPYUID\s+\d+\s+[\d:,]+\s+([\d:,]+)\].*/$1/ or next; + push @uids, /(\d+):(\d+)/ ? ( $1 ... $2 ) : ( split /\,/ ); + + } + return @uids ? join( ",", @uids ) : $self; +} + +sub move { + my ( $self, $target, @msgs ) = @_; + + $self->exists($target) + or $self->create($target) && $self->subscribe($target); + + my $uids = + $self->copy( $target, map { ref $_ eq 'ARRAY' ? @$_ : $_ } @msgs ) + or return undef; + + unless ( $self->delete_message(@msgs) ) { + local ($!); # old versions of Carp could reset $! + carp $self->LastError; + } + + return $uids; +} + +sub set_flag { + my ( $self, $flag, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + $flag = "\\$flag" + if $flag =~ /^(?:Answered|Flagged|Deleted|Seen|Draft)$/i; + + my $which = $self->Ranges ? $self->Range(@msgs) : join( ',', @msgs ); + return $self->store( $which, '+FLAGS.SILENT', "($flag)" ); +} + +sub see { + my ( $self, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + return $self->set_flag( '\\Seen', @msgs ); +} + +sub mark { + my ( $self, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + return $self->set_flag( '\\Flagged', @msgs ); +} + +sub unmark { + my ( $self, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + return $self->unset_flag( '\\Flagged', @msgs ); +} + +sub unset_flag { + my ( $self, $flag, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + + $flag = "\\$flag" + if $flag =~ /^(?:Answered|Flagged|Deleted|Seen|Draft)$/i; + + return $self->store( join( ",", @msgs ), "-FLAGS.SILENT ($flag)" ); +} + +sub deny_seeing { + my ( $self, @msgs ) = @_; + @msgs = @{ $msgs[0] } if ref $msgs[0] eq 'ARRAY'; + return $self->unset_flag( '\\Seen', @msgs ); +} + +sub size { + my ( $self, $msg ) = @_; + my $data = $self->fetch( $msg, "(RFC822.SIZE)" ) or return undef; + + # beware of response like: * NO Cannot open message $msg + my $cmd = shift @$data; + my $err; + foreach my $line (@$data) { + return $1 if ( $line =~ /RFC822\.SIZE\s+(\d+)/ ); + $err = $line if ( $line =~ /\* NO\b/ ); + } + + if ($err) { + my $info = "$err was returned for $cmd"; + $info =~ s/$CR?$LF//og; + $self->LastError($info); + } + elsif ( !$self->LastError ) { + my $info = "no RFC822.SIZE found in: " . join( " ", @$data ); + $self->LastError($info); + } + return undef; +} + +sub getquotaroot { + my ( $self, $what ) = @_; + my $who = $what ? $self->Massage($what) : "INBOX"; + return $self->_imap_command("GETQUOTAROOT $who") ? $self->Results : undef; +} + +# BUG? using user/$User here and INBOX in quota/quota_usage +sub getquota { + my ( $self, $what ) = @_; + my $who = $what ? $self->Massage($what) : "user/" . $self->User; + return $self->_imap_command("GETQUOTA $who") ? $self->Results : undef; +} + +# usage: $self->setquota($quotaroot, storage => 512, ...) +sub setquota(@) { + my ( $self, $what ) = ( shift, shift ); + my $who = $what ? $self->Massage($what) : "user/" . $self->User; + my @limits; + while (@_) { + my ( $k, $v ) = ( $self->Quote( uc( shift @_ ) ), shift @_ ); + push( @limits, "($k $v)" ); + } + my $limits = join( ' ', @limits ); + $self->_imap_command("SETQUOTA $who $limits") ? $self->Results : undef; +} + +sub quota { + my ( $self, $what ) = ( shift, shift || "INBOX" ); + my $tref = $self->getquota($what) or return undef; + shift @$tref; # pop off command + return ( map { /.*STORAGE\s+\d+\s+(\d+).*\n$/ ? $1 : () } @$tref )[0]; +} + +sub quota_usage { + my ( $self, $what ) = ( shift, shift || "INBOX" ); + my $tref = $self->getquota($what) or return undef; + shift @$tref; # pop off command + return ( map { /.*STORAGE\s+(\d+)\s+\d+.*\n$/ ? $1 : () } @$tref )[0]; +} + +sub Quote($) { $_[0]->Massage( $_[1], NonFolderArg ) } + +# rfc3501: +# atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / +# quoted-specials / resp-specials +# list-wildcards = "%" / "*" +# quoted-specials = DQUOTE / "\" +# resp-specials = "]" +# rfc2060: +# CTL ::= +# Paranoia/safety: +# encode strings with "}" / "[" / "]" / non-ascii chars +sub Massage($;$) { + my ( $self, $name, $notFolder ) = @_; + $name =~ s/^\"(.*)\"$/$1/s unless $notFolder; + + if ( $name =~ /["\\[:^ascii:][:cntrl:]]/s ) { + return "{" . length($name) . "}" . $CRLF . $name; + } + elsif ( $name =~ /[(){}\s%*\[\]]/s ) { + return qq("$name"); + } + else { + return $name; + } +} + +sub unseen_count { + my ( $self, $folder ) = ( shift, shift ); + $folder ||= $self->Folder; + $self->status( $folder, 'UNSEEN' ) or return undef; + + my $r = + first { s/\*\s+STATUS\s+.*\(UNSEEN\s+(\d+)\s*\)/$1/ } $self->History; + + $r =~ s/\D//g; + return $r; +} + +sub State($) { + my ( $self, $state ) = @_; + + if ( defined $state ) { + $self->{State} = $state; + + # discard cached capability info after authentication + delete $self->{CAPABILITY} if ( $state == Authenticated ); + } + + return defined( $self->{State} ) ? $self->{State} : Unconnected; +} + +sub Status { shift->State } +sub IsUnconnected { shift->State == Unconnected } +sub IsConnected { shift->State >= Connected } +sub IsAuthenticated { shift->State >= Authenticated } +sub IsSelected { shift->State == Selected } + +# The following private methods all work on an output line array. +# _data returns the data portion of an output array: +sub _data { ref $_[1] && defined $_[1]->[TYPE] ? $_[1]->[DATA] : undef } + +# _index returns the index portion of an output array: +sub _index { ref $_[1] && defined $_[1]->[TYPE] ? $_[1]->[INDEX] : undef } + +# _type returns the type portion of an output array: +sub _type { ref $_[1] && $_[1]->[TYPE] } + +# _is_literal returns true if this is a literal: +sub _is_literal { ref $_[1] && $_[1]->[TYPE] && $_[1]->[TYPE] eq 'LITERAL' } + +# _is_output_or_literal returns true if this is an +# output line (or the literal part of one): + +sub _is_output_or_literal { + ref $_[1] + && defined $_[1]->[TYPE] + && ( $_[1]->[TYPE] eq "OUTPUT" || $_[1]->[TYPE] eq "LITERAL" ); +} + +# _is_output returns true if this is an output line: +sub _is_output { ref $_[1] && $_[1]->[TYPE] && $_[1]->[TYPE] eq "OUTPUT" } + +# _is_input returns true if this is an input line: +sub _is_input { ref $_[1] && $_[1]->[TYPE] && $_[1]->[TYPE] eq "INPUT" } + +# _next_index returns next_index for a transaction; may legitimately +# return 0 when successful. +sub _next_index { my $r = $_[0]->_transaction( $_[1] ); $r } + +sub Range { + my ( $self, $targ ) = ( shift, shift ); + + UNIVERSAL::isa( $targ, 'Mail::IMAPClient::MessageSet' ) + ? $targ->cat(@_) + : Mail::IMAPClient::MessageSet->new( $targ, @_ ); +} + +1; diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pod b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pod new file mode 100644 index 0000000..5dce129 --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient.pod @@ -0,0 +1,3938 @@ +=head1 NAME + +Mail::IMAPClient - An IMAP Client API + +=head1 SYNOPSIS + + use Mail::IMAPClient; + + my $imap = Mail::IMAPClient->new( + Server => 'localhost', + User => 'username', + Password => 'password', + Ssl => 1, + Uid => 1, + ); + + my $folders = $imap->folders + or die "List folders error: ", $imap->LastError, "\n"; + print "Folders: @$folders\n"; + + $imap->select( $Opt{folder} ) + or die "Select '$Opt{folder}' error: ", $imap->LastError, "\n"; + + $imap->fetch_hash("FLAGS", "INTERNALDATE", "RFC822.SIZE") + or die "Fetch hash '$Opt{folder}' error: ", $imap->LastError, "\n"; + + $imap->logout + or die "Logout error: ", $imap->LastError, "\n"; + +=head1 DESCRIPTION + +This module provides methods implementing the IMAP protocol to support +interacting with IMAP message stores. + +The module is used by constructing or instantiating a new IMAPClient +object via the L constructor method. Once the object has been +instantiated, the L method is either implicitly or +explicitly called. At that point methods are available that implement +the IMAP client commands as specified in B. When processing +is complete, the L object method should be called. + +This documentation is not meant to be a replacement for RFC3501 nor +any other IMAP related RFCs. + +Note that this documentation uses the term I in place of +RFC3501's use of I. This documentation reserves the use of +the term I to refer to the set of folders owned by a specific +IMAP id. + +=head2 Connection State + +RFC3501 defines four possible states for an IMAP connection: not +authenticated, authenticated, selected, and logged out. These +correspond to the IMAPClient constants C, C, +C, and C, respectively. These constants can be +used in conjunction with the L method to determine the status +of an IMAPClient object and its underlying IMAP session. + +Note that an IMAPClient object can be in the C state both +before a server connection is made and after it has ended. This +differs slightly from RFC3501, which does not define a pre-connection +status. For a discussion of the methods available for examining the +IMAPClient object's status, see the section labeled +L, below. + +=head2 Advanced Authentication Mechanisms + +RFC3501 defines two commands for authenticating to an IMAP server: + +=over 4 + +=item LOGIN + +LOGIN is for plain text authentication. + +=item AUTHENTICATE + +AUTHENTICATE for more advanced and/or secure authentication mechanisms. + +=back + +Mail::IMAPClient supports the following AUTHENTICATE mechanisms: + +=over 4 + +=item DIGEST-MD5 + +DIGEST-MD5 authentication requires the L and +L modules. See also L. + +=item CRAM-MD5 + +CRAM-MD5 requires the L module. + +=item PLAIN (SASL) + +PLAIN (SASL) authentication allows the optional use of the L +parameter. RFC 4616 documents this syntax for SASL PLAIN: + + message = [authzid] UTF8NUL authcid UTF8NUL passwd + +When L is defined, L is used as 'authzid' and L +is used as 'authcid'. Otherwise, L is used as 'authcid'. + +=item NTLM + +NTLM authentication requires the L module. See also +L. + +=back + +=head2 Errors + +If you attempt an operation that results in an error, then you can +retrieve the text of the error message by using the L +method. However, the L method is an object method (not a +class method) and can only be used once an object is successfully +created. In cases where an object is not successfully created the +C<$@> variable is set with an error message. + +Mail::IMAPClient resets C<$@> and L to undef before most +IMAP requests, so the values only have a short lifespan. +L will always contain error info from the last error, +until another error is encountered, another IMAP command is issued or +it is explicitly cleared. + +Please note that the use of C<$@> is subject to change in the future +release so it is best to use L for error checking once a +Mail::IMAPClient object has been created. + +Errors in the L method can prevent your object from ever being +created. If the L, L, and L parameters are +supplied to L, it will attempt to call L and +L. Any of these methods could fail and cause the L +method call to return C and leaving the variable C<$@> is set +to an error message. + +WARNING: (due to historical API behavior) on errors, many methods may +return undef regardless of LIST/SCALAR context. Therefore, it may be +wise to use most methods in a scalar context. Regardless, check +L for details on errors. + +=head2 Transactions + +RFC3501 requires that each line in an IMAP conversation be prefixed +with a tag. A typical conversation consists of the client issuing a +tag-prefixed command string, and the server replying with one of more +lines of output. Those lines of output will include a command +completion status code prefixed by the same tag as the original +command string. + +The IMAPClient module uses a simple counter to ensure that each client +command is issued with a unique tag value. This tag value is referred +to by the IMAPClient module as the transaction number. A history is +maintained by the IMAPClient object documenting each transaction. The +L method returns the number of the last transaction, and +can be used to retrieve lines of text from the object's history. + +The L parameter is used to control the size of the session +history so that long-running sessions do not eat up unreasonable +amounts of memory. See the discussion of L parameter for more +information. + +The L transaction returns the history of the entire IMAP +session since the initial connection or for the last L +transactions. This provides a record of the entire conversation, +including client command strings and server responses, and is a +wonderful debugging tool as well as a useful source of raw data for +custom parsing. + +=head1 CLASS METHODS + +There are a couple of methods that can be invoked as class methods. +Generally they can be invoked as an object method as well. Note that +if the L method is called as an object method, the object +returned is identical to what have would been returned if L had +been called as a class method. It doesn't give you a copy of the +original object. + +=head2 new + +Example: + + my $imap = Mail::IMAPClient->new(%args) + or die "new failed: $@\n"; + +The L method creates a new instance of an IMAPClient object. + +If the L parameter is passed as an argument to B, then +B will implicitly call the L method, placing the new +object in the I state. If L and L values +are also provided, then L will in turn call L, and +the resulting object will be returned from B in the +I state. + +If the L parameter is not supplied then the IMAPClient +object is created in the I state. + +If the B method is passed arguments then those arguments will be +treated as a list of key=>value pairs. The key should be one of the +parameters as documented under L below. + +Here are some examples: + + use Mail::IMAPClient; + + # returns an unconnected Mail::IMAPClient object: + my $imap = Mail::IMAPClient->new; + # ... + # intervening code using the 1st object, then: + # (returns a new, authenticated Mail::IMAPClient object) + $imap = Mail::IMAPClient->new( + Server => $host, + User => $id, + Password => $pass, + Clear => 5, # Unnecessary since '5' is the default + # ... # Other key=>value pairs go here + ) + or die "Cannot connect to $host as $id: $@"; + +See also L, L and L for more +information on how to manually connect and login after B. + +=head2 Quote + +Example: + + $imap->search( HEADER => 'Message-id' => \$imap->Quote($msg_id) ); + +The B method accepts a value as an argument and returns its +argument as a correctly quoted string or a literal string. Since +version 3.17 Mail::IMAPClient automatically quotes search arguments we +use a SCALARREF so search will not modify or re-quote the value +returned by B. + +Note this method should not be used on folder names for +Mail::IMAPClient methods, since methods that accept folder names as an +argument will quote the folder name arguments appropriately +automatically. + +If you are getting unexpected results when running methods with values +that have (or might have) embedded spaces, double quotes, braces, or +parentheses, then calling B may be necessary. This method +should B be used with arguments that are wrapped in quotes or +parens if those quotes or parens are required by RFC3501. For +example, if the RFC requires an argument in this format: + + ( argument ) + +and the argument is (or might be) "pennies (from heaven)", then one +could use: + + $argument = "(" . $imap->Quote($argument) . ")" + +Of course, the fact that sometimes these characters are sometimes +required delimiters is precisely the reason you must quote them when +they are I delimiting. + +However, there are times when a method fails unexpectedly and may +require the use of B to work. Should this happen, you can +probably file a bug/enhancement request for Mail::IMAPClient to +safeguard the particular call/case better. + +An example is RFC822 Message-id's, which I don't contain +quotes or parens. When dealing with these it is usually best to take +proactive, defensive measures from the very start and use B. + +=head2 Range + +Example: + + my $parsed = $imap->parse_headers( + $imap->Range( $imap->messages ), "Date", "Subject" + ); + +The B method will condense a list of message sequence numbers +or message UID's into the most compact format supported by RFC3501. +It accepts one or more arguments, each of which can be: + +=over 4 + +=item a) a message number, + +=item b) a comma-separated list of message numbers, + +=item c) a colon-separated range of message numbers (i.e. "$begin:$end") + +=item d) a combination of messages and message ranges, separated by commas +(i.e. 1,3,5:8,10), or + +=item e) a reference to an array whose elements are like I through I. + +=back + +The B method returns a L object. +The object uses L and if treated as a string it will act +like a string. This means you can ignore its objectivity and just +treat it like a string whose value is your message set expressed in +compact format. + +This method provides an easy way to add or remove messages from a +message set. + +For more information see L. + +=head2 Rfc3501_date + +Example: + + $Rfc3501_date = $imap->Rfc3501_date($seconds); + # or: + $Rfc3501_date = Mail::IMAPClient->Rfc3501_date($seconds); + +The B method accepts one input argument, a number of +seconds since the epoch date. It returns an RFC3501 compliant date +string for that date (as required in date-related arguments to SEARCH, +such as "since", "before", etc.). + +=head2 Rfc3501_datetime + +Example: + + $date = $imap->Rfc3501_datetime($seconds); + # or: + $date = Mail::IMAPClient->Rfc3501_datetime($seconds); + +The B method accepts one or two arguments: a +obligatory timestamp and an optional zone. The zone shall be +formatted as C<< [+-]\d{4} >>, and defaults to C<< +0000 >>. The +timestamp follows the definition of the output of the platforms +specific C +method and cannot be invoked as class methods. + +There object methods typically fall into one of two categories. There +are mailbox methods which participate in the IMAP session's +conversation (i.e. they issue IMAP client commands) and object control +methods which do not result in IMAP commands but which may affect +later commands or provide details of previous ones. + +This object control methods can be further broken down into two +types, Parameter accessor methods, which affect the behavior of future +mailbox methods, and L, which report on the affects +of previous mailbox methods. + +Methods that do not result in new IMAP client commands being issued +(such as the L, L, and L methods) all +begin with an uppercase letter, to distinguish them from methods that +do correspond to IMAP client commands. Class methods and eponymous +parameter methods likewise begin with an uppercase letter because they +also do not correspond to an IMAP client command. + +As a general rule, mailbox control methods return C on failure +and something besides C when they succeed. This rule is +modified in the case of methods that return search results. When +called in a list context, searches that do not find matching results +return an empty list. When called in a scalar context, searches with +no hits return 'undef' instead of an array reference. If you want to +know why you received no hits, you should check L or +C<$@>, which will be empty if the search was successful but had no +matching results but populated with an error message if the search +encountered a problem (such as invalid parameters). + +A number of IMAP commands do not have corresponding Mail::IMAPClient +methods. Patches are welcome. In the pre-2.99 releases of this +module, they were automatically created (AUTOLOAD), but that was very +error-prone and stalled the progress of this module. + +=head1 Mailbox Control Methods + +=head2 append + +Example: + + my $uid_or_true = $imap->append( $folder, $msgtext ) + or die "Could not append: ", $imap->LastError; + +WARNING: This method may be deprecated in the future, consider using +L instead of this method. + +The B method adds a message to the specified folder. See +L for details as it is effectively an alias for that +method. + +DEPRECATED BEHAVIOR: Additional arguments are added to the message +text, separated with . + +=head2 append_string + +Example: + + # brackets indicate optional arguments (not array refs): + my $uidort = $imap->append_string( $folder, $msgtext [,$flags [,$date ] ] ) + or die "Could not append_string: ", $imap->LastError; + +Arguments: + +=over 4 + +=item $folder + +the name of the folder to append the message to + +=item $msgtext + +the message text (including headers) of the message + +=item $flags + +An optional list of flags to set. The list must be specified as +a space-separated list of flags, including any backslashes that may be +necessary and optionally enclosed by parenthesis. + +=item $date + +An optional RFC3501 date argument to set as the internal date. It +should be in the format described for I fields in RFC3501, +i.e. "dd-Mon-yyyy hh:mm:ss +0000". + +If you want to specify a date/time but you don't want any flags then +specify I as the third ($flags) argument. + +=back + +Returns: + +=over 4 + +=item error: undef + +On error, undef can be returned regardless of LIST/SCALAR context. +Check L for details. + +=item success: UID or $imap + +With UIDPLUS the UID of the new message is returned otherwise a true +value (currently $self) is returned. + +=back + +To protect against "bare newlines", B will insert a carriage +return before any newline that is "bare". + +=head2 append_file + +Example: + + my $new_msg_uid = $imap->append_file( + $folder, + $file, + [ undef, $flags, $date ] # optional + ) or die "Could not append_file: ", $imap->LastError; + +The B method adds a message to the specified folder. +Note: The brackets in the example indicate optional arguments; they do +not mean that the argument should be an array reference. + +Arguments: + +=over 4 + +=item $folder + +the name of the folder to append the message to + +=item $file + +a filename, filehandle or SCALAR reference which holds an +RFC822-formatted message + +=item undef + +a deprecated argument used as a place holder for backwards +compatibility + +=item $flags + +The optional argument is handled the same as append_string. + +=item $date + +The optional argument is handled the same as append_string (RFC3501 +date), with the exception that if $date is "1" (one) then the +modification time (mtime) of the file will be used. + +=back + +Returns: + +=over 4 + +=item error: undef + +On error, undef can be returned regardless of LIST/SCALAR context. +Check L for details. + +=item success: UID or $imap + +With UIDPLUS the UID of the new message is returned otherwise a true +value (currently $self) is returned. + +=back + +To protect against "bare newlines", B will insert a +carriage return before any newline that is "bare". + +The B method provides a mechanism for allowing large +messages to be appended without holding the whole file in memory. + +Version note: In 2.x an optional third argument to use for +C was allowed, however this argument is +ignored/not supported as of 3.x. + +=head2 authenticate + +Example: + + $imap->authenticate( $authentication_mechanism, $coderef ) + or die "Could not authenticate: ", $imap->LastError; + +This method implements the AUTHENTICATE IMAP client command. It can +be called directly or may be called by L if the +L parameter is set to anything except 'LOGIN'. + +The B method accepts two arguments, an authentication +type to be used (ie CRAM-MD5) and a code or subroutine reference to +execute to obtain a response. The B method assumes that +the authentication type specified in the first argument follows a +challenge-response flow. The B method issues the IMAP +Client AUTHENTICATE command and receives a challenge from the server. +That challenge (minus any tag prefix or enclosing '+' characters but +still in the original base64 encoding) is passed as the only argument +to the code or subroutine referenced in the second argument. The +return value from the 2nd argument's code is written to the server as +is, except that a sequence is appended if necessary. + +If one or both of the arguments are not specified in the call to +B but their corresponding parameters have been set +(L and L, respectively) then the parameter +values are used. Arguments provided to the method call however will +override parameter settings. + +If you do not specify a second argument and you have not set the +L parameter, then the first argument must be +one of the authentication mechanisms for which Mail::IMAPClient +has built in support. + +See also the L method, which is the simplest form of +authentication defined by RFC3501. + +=head2 before + +Example: + + my @msgs = $imap->before($Rfc3501_date) + or warn "No messages found before $Rfc3501_date.\n"; + +The B method works just like the L method, below, +except it returns a list of messages whose internal system dates are +before the date supplied as the argument to the B method. + +=head2 body_string + +Example: + + my $string = $imap->body_string($msgId) + or die "Could not body_string: ", $imap->LastError; + +The B method accepts a message sequence number (or a +message UID, if the L parameter is set to true) as an argument +and returns the message body as a string. The returned value contains +the entire message in one scalar variable, without the message +headers. + +=head2 bodypart_string + +Example: + + my $string = $imap->bodypart_string( + $msgid, $part_number, $length, $offset + ) or die "Could not get bodypart string: ", $imap->LastError; + +The B method accepts a message sequence number (or a +message UID, if the L parameter is set to true) and a body part +as arguments and returns the message part as a string. The returned +value contains the entire message part (or, optionally, a portion of +the part) in one scalar variable. + +If an optional third argument is provided, that argument is the number +of bytes to fetch. (The default is the whole message part.) If an +optional fourth argument is provided then that fourth argument is the +offset into the part at which the fetch should begin. The default is +offset zero, or the beginning of the message part. + +If you specify an offset without specifying a length then the offset +will be ignored and the entire part will be returned. + +B will return C if it encounters an error. + +=head2 capability + +Example: + + my $features = $imap->capability + or die "Could not determine capability: ", $imap->LastError; + +The B method returns an array of capabilities as returned +by the CAPABILITY IMAP Client command, or a reference to an array of +capabilities if called in scalar context. If the CAPABILITY IMAP +Client command fails for any reason then the B method will +return C. Supported capabilities are cached by the client, +however, this cache is deleted after a connection is set to +I and when L is called. + +See also L. + +=head2 close + +Example: + + $imap->close or die "Could not close: $@\n"; + +The B method is used to close the currently selected folder via +the CLOSE IMAP client command. According to RFC3501, the CLOSE +command performs an implicit EXPUNGE, which means that any messages +that are flagged as I<\Deleted> (i.e. with the L +method) will now be deleted. If you haven't deleted any messages then +B can be thought of as an "unselect". + +Note: this closes the currently selected folder, not the IMAP session. + +See also L, L, and RFC3501. + +=head2 compress + +Example: + + $imap->compress or die "Could not enable RFC4978 compression: $@\n"; + +The B method accepts no arguments. This method is used to +instruct the server to use the DEFLATE (RFC1951) compression +extension. See the L attribute for how to specify arguments for use during the the initialization process. + +Version note: method added in Mail::IMAPClient 3.30 + +=head2 connect + +Example: + + $imap->connect or die "Could not connect: $@\n"; + +The B method connects an imap object to the server. It +returns C if it fails to connect for any reason. If values are +available for the L and L parameters at the time +that B is invoked, then B will call the L +method after connecting and return the result of the L method +to B's caller. If either or both of the L and +L parameters are unavailable but the connection to the +server succeeds then B returns a pointer to the IMAPClient +object. + +The L parameter must be set (either during L method +invocation or via the L object method) before invoking +B. When the parameter is an absolute file path, an UNIX +socket will get opened. If the L parameter is supplied to +the L method then B is implicitly called during object +construction. + +The B method sets the state of the object to C if +it successfully connects to the server. It returns C on +failure. + +=head2 copy + +Example: + + # Here brackets indicate optional arguments: + my $uidList = $imap->copy($folder, $msg_1 [ , ... , $msg_n ]) + or die "Could not copy: $@\n"; + +Or: + + # Now brackets indicate an array ref! + my $uidList = $imap->copy($folder, [ $msg_1, ... , $msg_n ]) + or die "Could not copy: $@\n"; + +The B method requires a folder name as the first argument, and a +list of one or more messages sequence numbers (or messages UID's, if +the I parameter is set to a true value). The message sequence +numbers or UID's should refer to messages in the currently selected +folder. Those messages will be copied into the folder named in the +first argument. + +The B method returns C on failure and a true value if +successful. If the server to which the current Mail::IMAPClient +object is connected supports the UIDPLUS capability then the true +value returned by B will be a comma separated list of UID's, +which are the UID's of the newly copied messages in the target folder. + +=head2 create + +Example: + + $imap->create($new_folder) + or die "Could not create $new_folder: $@\n"; + +The B method accepts one argument, the name of a folder (or +what RFC3501 calls a "mailbox") to create. If you specify additional +arguments to the B method and your server allows additional +arguments to the CREATE IMAP client command then the extra argument(s) +will be passed to your server. + +If you specify additional arguments to the B method and your +server does not allow additional arguments to the CREATE IMAP client +command then the extra argument(s) will still be passed to your server +and the create will fail. + +B returns a true value on success and C on failure. + +=head2 date + +Example: + + my $date = $imap->date($msg); + +The B method accepts one argument, a message sequence number (or +a message UID if the L parameter is set to a true value). It +returns the date of message as specified in the message's RFC822 +"Date: " header, without the "Date: " prefix. + +The B method is a short-cut for: + + my $date = $imap->get_header($msg,"Date"); + +=head2 delete + +Example: + + $imap->delete($folder) or die "Could not delete $folder: $@\n"; + +The B method accepts a single argument, the name of a folder +to delete. It returns a true value on success and C on +failure. + +=head2 deleteacl + +Example: + + $imap->deleteacl( $folder, $userid ) + or die "Could not delete acl: $@\n"; + +The B method accepts two input arguments, a folder name, a +user id (or authentication identifier, to use the terminology of +RFC2086). See RFC2086 for more information. (This is somewhat +experimental and its implementation may change.) + +=head2 delete_message + +Example: + + my @msgs = $imap->seen; + scalar(@msgs) and $imap->delete_message(\@msgs) + or die "Could not delete_message: $@\n"; + +The above could also be rewritten like this: + + # scalar context returns array ref + my $msgs = scalar($imap->seen); + + scalar(@$msgs) and $imap->delete_message($msgs) + or die "Could not delete_message: $@\n"; + +Or, as a one-liner: + + $imap->delete_message( scalar($imap->seen) ) + or warn "Could not delete_message: $@\n"; + # just give warning in case failure is + # due to having no 'seen' msgs in the 1st place! + +The B method accepts a list of arguments. If the +L parameter is not set to a true value, then each item in the +list should be either: + +=over 4 + +=item * + +a message sequence number, + +=item * + +a comma-separated list of message sequence numbers, + +=item * + +a reference to an array of message sequence numbers, or + +=back + +If the L parameter is set to a true value, then each item in the +list should be either: + +=over 4 + +=item * + +a message UID, + +=item * + +a comma-separated list of UID's, or + +=item * + +a reference to an array of message UID's. + +=back + +The messages identified by the sequence numbers or UID's will be +deleted. If successful, B returns the number of +messages it was told to delete. However, since the delete is done by +issuing the I<+FLAGS.SILENT> option of the STORE IMAP client command, +there is no guarantee that the delete was successful for every +message. In this manner the B method sacrifices +accuracy for speed. Generally, though, if a single message in a list +of messages fails to be deleted it's because it was already deleted, +which is what you wanted anyway so why worry about it? If there is a +more severe error, i.e. the server replies "NO", "BAD", or, banish the +thought, "BYE", then B will return C. + +If you must have guaranteed results then use the IMAP STORE client +command (via the default method) and use the +FLAGS (\Deleted) option, +and then parse your results manually. + +Eg: + + $imap->store( $msg_id, '+FLAGS (\Deleted)' ); + my @results = $imap->History( $imap->Transaction ); + ... # code to parse output goes here + +(Frankly I see no reason to bother with any of that; if a message +doesn't get deleted it's almost always because it's already not there, +which is what you want anyway. But 'your mileage may vary' and all +that.) + +The IMAPClient object must be in C status to use the +B method. + +B: All the messages identified in the input argument(s) must be in +the currently selected folder. Failure to comply with this +requirement will almost certainly result in the wrong message(s) being +deleted. + +B: In the grand tradition of the IMAP protocol, +deleting a message doesn't actually delete the message. Really. If +you want to make sure the message has been deleted, you need to +expunge the folder (via the L method, which is implemented +via the default method). Or at least L it. This is generally +considered a feature, since after deleting a message, you can change +your mind and undelete it at any time before your L or +L. + +See also: the L method, to delete a folder, the L +method, to expunge a folder, the L method to +undelete a message, and the L method (implemented here via the +default method) to close a folder. Oh, and don't forget about RFC3501. + +=head2 deny_seeing + +Example: + + # Reset all read msgs to unread + # (produces error if there are no seen msgs): + $imap->deny_seeing( scalar($imap->seen) ) + or die "Could not deny_seeing: $@\n"; + +The B method accepts a list of one or more message +sequence numbers, or a single reference to an array of one or more +message sequence numbers, as its argument(s). It then unsets the +"\Seen" flag for those messages (so that you can "deny" that you ever +saw them). Of course, if the L parameter is set to a true value +then those message sequence numbers should be unique message id's. + +Note that specifying C<$imap-Edeny_seeing(@msgs)> is just a +shortcut for specifying C<$imap-Eunset_flag("Seen",@msgs)>. + +=head2 disconnect + +Example: + + $imap->disconnect or warn "Could not logout: $@\n"; + +This method calls L, see L for details. + +=head2 done + +Example: + + my $tag = $imap->idle or warn "idle failed: $@\n"; + doSomethingA(); + my $idlemsgs = $imap->idle_data() or warn "idle_data error: $@\n"; + doSomethingB(); + my $results = $imap->done($tag) or warn "Error from done: $@\n"; + +The B method tells the IMAP server to terminate the IDLE +command. The only argument is the I (identifier) received from +the previous call to L. If I is not specified a default +I based on the B attribute is assumed to be the I to +look for in the response from the server. + +If an invalid I is specified, or the default I is wrong, +then B will hang indefinitely or until a timeout occurs. + +If B is called when an L command is not active then the +server will likely respond with an error like I<* BAD Invalid tag>. + +On failure is returned and L is set. + +See also L, L and L. + +=head2 examine + +Example: + + $imap->examine($folder) or die "Could not examine: $@\n"; + +The B method selects a folder in read-only mode and changes +the object's state to "Selected". The folder selected via the +B method can be examined but no changes can be made unless it +is first selected via the L method. + +The B method accepts one argument, which is the name of the +folder to select. + +=head2 exists + +Example: + + $imap->exists($folder) or warn "$folder not found: $@\n"; + +Accepts one argument, a folder name. Returns true if the folder +exists or false if it does not exist. + +=head2 expunge + +Example: + + $imap->expunge($folder) or die "Could not expunge: $@\n"; + +The B method accepts one optional argument, a folder name. +It expunges the folder specified as the argument, or the currently +selected folder (if any) when no argument is supplied. + +Although RFC3501 does not permit optional arguments (like a folder +name) to the EXPUNGE client command, the L method does. +Note: expunging a folder deletes the messages that have the \Deleted +flag set (i.e. messages flagged via L). + +See also the L method, which "deselects" as well as expunges. + +=head2 fetch + +Usage: + + $imap->fetch( [$seq_set|ALL], @msg_data_items ) + +Example: + + my $output = $imap->fetch(@args) or die "Could not fetch: $@\n"; + +The B method implements the FETCH IMAP client command. It +accepts a list of arguments, which will be converted into a +space-delimited list of arguments to the FETCH IMAP client command. +If no arguments are supplied then B does a FETCH ALL. If the +L parameter is set to a true value then the first argument will +be treated as a UID or list of UID's, which means that the UID FETCH +IMAP client command will be run instead of FETCH. (It would really be +a good idea at this point to review RFC3501.) + +If called in array context, B will return an array of output +lines. The output lines will be returned just as they were received +from the server, so your script will have to be prepared to parse out +the bits you want. The only exception to this is literal strings, +which will be inserted into the output line at the point at which they +were encountered (without the {nnn} literal field indicator). See +RFC3501 for a description of literal fields. + +If B is called in a scalar context, then a reference to an array +(as described above) is returned instead of the entire array. + +B returns C on failure. Inspect L or C<$@> +for an explanation of your error. + +=head2 fetch_hash + +Usage: + + $imap->fetch_hash( [$seq_set|ALL], @msg_data_items, [\%msg_by_ids] ) + +Example: + + my $hashref = {}; + $imap->fetch_hash( "RFC822.SIZE", $hashref ); + print "Msg #$m is $hashref->{$m} bytes\n" foreach my $m (keys %$hashref); + +The B method accepts a list of message attributes to be +fetched (as described in RFC3501). It returns a hash whose keys are +all the messages in the currently selected folder and whose values are +key-value pairs of fetch keywords and the message's value for that +keyword (see sample output below). + +If B is called in scalar context, it returns a reference +to the hash instead of the hash itself. If the last argument is a hash +reference, then that hash reference will be used as the place where +results are stored (and that reference will be returned upon +successful completion). If the last argument is not a reference then +it will be treated as one of the FETCH attributes and a new hash will +be created and returned (either by value or by reference, depending on +the context in which B was called). + +For example, if you have a folder with 3 messages and want the size +and internal date for each of them, you could do the following: + + use Mail::IMAPClient; + use Data::Dumper; + # ... other code goes here + $imap->select($folder); + my $hash = $imap->fetch_hash("RFC822.SIZE","INTERNALDATE"); + # (Same as: + # my $hash = $imap->fetch_hash("RFC822.SIZE"); + # $imap->fetch_hash("INTERNALDATE",$hash); + # ). + print Data::Dumper->Dumpxs([$hash],['$hash']); + +This would result in L output similar to the following: + + $hash = { + '1' => { + 'INTERNALDATE' => '21-Sep-2002 18:21:56 +0000', + 'RFC822.SIZE' => '1586', + }, + '2' => { + 'INTERNALDATE' => '22-Sep-2002 11:29:42 +0000', + 'RFC822.SIZE' => '1945', + }, + '3' => { + 'INTERNALDATE' => '23-Sep-2002 09:16:51 +0000', + 'RFC822.SIZE' => '134314', + } + }; + +By itself this method may be useful for tasks like obtaining the size +of every message in a folder. It issues one command and receives one +(possibly long!) response from the server. + +If the fetch request causes the server to return data in a +parenthesized list, the data within the parenthesized list may be +escaped via the Escape() method. Use the Unescape() method to get the +raw values back in this case. + +=head2 flags + +Example: + + my @flags = $imap->flags($msgid) + or die "Could not flags: $@\n"; + +The B method implements the FETCH IMAP client command to list a +single message's flags. It accepts one argument, a message sequence +number (or a message UID, if the L parameter is true), and +returns an array (or a reference to an array, if called in scalar +context) listing the flags that have been set. Flag names are +provided with leading backslashes. + +As of version 1.11, you can supply either a list of message id's or a +reference to an array of of message id's (which means either sequence +number, if the Uid parameter is false, or message UID's, if the Uid +parameter is true) instead of supplying a single message sequence +number or UID. If you do, then the return value will not be an array +or array reference; instead, it will be a hash reference, with each +key being a message sequence number (or UID) and each value being a +reference to an array of flags set for that message. + +For example, if you want to display the flags for every message in the +folder where you store e-mail related to your plans for world +domination, you could do something like this: + + use Mail::IMAPClient; + my $imap = Mail::IMAPClient->new( + Server => $imaphost, + User => $login, + Password => $pass, + Uid => 1, # optional + ); + + $imap->select("World Domination"); + # get the flags for every message in my 'World Domination' folder + $flaghash = $imap->flags( scalar( $imap->search("ALL") ) ); + + # pump through sorted hash keys to print results: + for my $k (sort { $flaghash->{$a} <=> $flaghash->{$b} } keys %$flaghash) { + # print: Message 1: \Flag1, \Flag2, \Flag3 + print "Message $k:\t",join(", ",@{$flaghash->{$k}}),"\n"; + } + +=head2 folders + +Example: + + $imap->folders or die "Could not list folders: $@\n"; + +The B method returns an array listing the available folders. +It will only be successful if the object is in the I or +I states. + +The B method accepts one optional argument, which is a +prefix. If a prefix is supplied to the B method, then only +folders beginning with the prefix will be returned. + +For example: + + print join(", ",$imap->folders),".\n"; + # Prints: + # INBOX, Sent, Projects, Projects/Completed, Projects/Ongoing, Projects Software. + print join(", ",$imap->folders("Projects"),".\n"; + # Prints: + # Projects, Projects/Completed, Projects/Ongoing, Projects Software. + print join(", ",$imap->folders("Projects" . $imap->separator),".\n"; + # Prints: + # Projects/Completed, Projects/Ongoing + +Please note that documentation previously suggested that if you just +want to list a folder's subfolders (and not the folder itself), then +you need to include the hierarchy separator character (as returned by +the L method). However, this does not match the behavior +of the existing implementation, so you will need to manually exclude +the parent folder from the results. + +=head2 folders_hash + + my @fhashes = $imap->folders_hash + or die "Could not get list of folder hashes.\n"; + +The B method accepts one optional argument, which is a +prefix. If a prefix is supplied to the B method, then +only folders beginning with the prefix will be returned. + +An array(ref) of hashes is returned that contain information about the +requested folders. Each hash contains three keys (name, attrs, delim) +and looks like the following: + + { + name => 'Mail/Box/Name', + attrs => '\Marked \HasNoChildren', + delim => '/', + } + +IMAP servers implementing RFC6154 return attributes to be used to +identify special-use mailboxes (folders). + + my $sattr_re = /\b\\(?:All|Archive|Drafts|Flagged|Junk|Sent|Trash)\b/; + foreach my $fhash (@fhashes) { + next unless ( $fhash->{attrs} =~ $sattr_re ); + print("special: $fhash->{name} : $fhash->{attrs}\n"); + } + +Version note: method added in Mail::IMAPClient 3.34 + +=head2 xlist_folders (DEPRECATED) + +This method is deprecated as of version 3.34. Please use folders_hash +instead. See RFC6154 for attributes to be used to identify +special-use mailboxes (folders). + +Example: + + my $xlist = $imap->xlist_folders + or die "Could not get xlist folders.\n"; + +IMAP servers implementing the XLIST extension (such as Gmail) +designate particular folders to be used for particular functions. +This is useful in the case where you want to know which folder should +be used for Trash when the actual folder name can't be predicted +(e.g. in the case of Gmail, the folder names change depending on the +user's locale settings). + +The B method returns a hash listing any "xlist" folder +names, with the values listing the actual folders that should be used +for those names. For example, using this method with a Gmail user +using the English (US) locale might give this output from +L: + + $VAR1 = { + 'Inbox' => 'Inbox', + 'AllMail' => '[Gmail]/All Mail', + 'Trash' => '[Gmail]/Trash', + 'Drafts' => '[Gmail]/Drafts', + 'Sent' => '[Gmail]/Sent Mail', + 'Spam' => '[Gmail]/Spam', + 'Starred' => '[Gmail]/Starred' + }; + +The same list for a user using the French locale might look like this: + + $VAR1 = { + 'Inbox' => 'Bo&AO4-te de r&AOk-ception', + 'AllMail' => '[Gmail]/Tous les messages', + 'Trash' => '[Gmail]/Corbeille', + 'Drafts' => '[Gmail]/Brouillons', + 'Sent' => '[Gmail]/Messages envoy&AOk-s', + 'Spam' => '[Gmail]/Spam', + 'Starred' => '[Gmail]/Suivis' + }; + +Mail::IMAPClient recognizes the following "xlist" folder names: + +=over 4 + +=item Inbox + +=item AllMail + +=item Trash + +=item Drafts + +=item Sent + +=item Spam + +=item Starred + +=back + +These are currently the only ones supported by Gmail. The XLIST +extension is not documented, and there are no other known +implementations other than Gmail, so this list is based on what Gmail +provides. + +If the server does not support the XLIST extension, this method +returns undef. + +Version note: method added in Mail::IMAPClient 3.21 + +=head2 has_capability + +Example: + + my $has_feature = $imap->has_capability($feature) + or die "Could not do has_capability($feature): $@\n"; + +Returns true if the IMAP server to which the IMAPClient object is +connected has the capability specified as an argument to +B. If the server does not have the capability then +the empty string "" is returned, if the underlying L +calls fails then undef is returned. + +=head2 idle + +Example: + + my $tag = $imap->idle or warn "idle failed: $@\n"; + doSomethingA(); + my $idlemsgs = $imap->idle_data() or warn "idle_data error: $@\n"; + doSomethingB(); + my $results = $imap->done($tag) or warn "Error from done: $@\n"; + +The B method tells the IMAP server the client is ready to accept +unsolicited mailbox update messages. This method is only valid on +servers that support the IMAP IDLE extension, see RFC2177 for details. + +The B method accepts no arguments and returns the I +(identifier) that was sent by the client for this command. This tag +should be supplied as the argument to L when ending the IDLE +command. + +On failure is returned and L is set. + +The method L may be used once B has been successful. +However, no mailbox operations may be called until the B command +has been terminated by calling L. Failure to do so will result +in an error and the idle command will typically be terminated by the +server. + +See also L and L. + +=head2 idle_data + +Usage: + + # an optional timeout in seconds may be specified + $imap->idle_data( [$timeout] ) + +Example: + + my $tag = $imap->idle or warn "idle failed: $@\n"; + doSomethingA(); + my $idlemsgs = $imap->idle_data() or warn "idle_data error: $@\n"; + doSomethingB(); + my $results = $imap->done($tag) or warn "Error from done: $@\n"; + +The B method can be used to accept any unsolicited mailbox +update messages that have been sent by the server during an L +command. This method does not send any commands to the server, it +simply looks for and optionally waits for data from the server and +returns that data to the caller. + +The B method accepts an optional $timeout argument and +returns an array (or an array reference if called in scalar context) +with the messages from the server. + +By default a timeout of 0 seconds is used (do not block). Internally +the timeout is passed to L. The timeout controls how +long the select call blocks if there are no messages waiting to be +read from the server. + +On failure is returned and L is set. + +See also L and L. + +Version note: method added in Mail::IMAPClient 3.23 +Warning: this method is considered experimental and the +interface/output may change in a future version. + +=head2 imap4rev1 + +Example: + + $imap->imap4rev1 or die "Could not imap4rev1: $@\n"; + +Returns true if the IMAP server to which the IMAPClient object is +connected has the IMAP4REV1 capability. If the server does not have +the capability then the empty string "" is returned, if the underlying +L calls fails then undef is returned. + +=head2 internaldate + +Example: + + my $msg_internal_date = $imap->internaldate($msgid) + or die "Could not internaldate: $@\n"; + +B accepts one argument, a message id (or UID if the +L parameter is true), and returns that message's internal date +or undef if the call fails or internal date is not returned. + +=head2 get_bodystructure + +Example: + + my $bodyStructObject = $imap->get_bodystructure($msgid) + or die "Could not get_bodystructure: $@\n"; + +The B method accepts one argument, a message +sequence number or, if L is true, a message UID. It obtains the +message's body structure and returns a parsed +L object for the message. + +=head2 get_envelope + +Example: + + my $envObject = $imap->get_envelope(@args) + or die "Could not get_envelope: $@\n"; + +The B method accepts one argument, a message sequence +number or, if L is true, a message UID. It obtains the +message's envelope and returns a +B object for the envelope, +which is just a version of the envelope that's been parsed into a Perl +object. + +For more information on how to use this object once you've gotten it, +see the L documention. (As of this +writing there is no separate pod document for +B.) + +=head2 getacl + +Example: + + my $hash = $imap->getacl($folder) + or die "Could not getacl for $folder: $@\n"; + +B accepts one argument, the name of a folder. If no argument +is provided then the currently selected folder is used as the default. +It returns a reference to a hash. The keys of the hash are userids +that have access to the folder, and the value of each element are the +permissions for that user. The permissions are listed in a string in +the order returned from the server with no white space or punctuation +between them. + +=head2 get_header + +Example: + + my $messageId = $imap->get_header( $msg, "Message-Id" ); + +The B method accepts two arguments, a message sequence +number or UID and the name of an RFC822 header (without the trailing +colon). It returns the value for that header in the message whose +sequence number or UID was passed as the first argument. If no value +can be found it returns C; if multiple values are found it +returns the first one. Its return value is always a scalar. +B uses case insensitive matching to get the value, so you +do not have to worry about the case of your second argument. + +The B method is a short-cut for: + + my $messageId = $imap->parse_headers($msg,"Subject")->{"Subject"}[0]; + +=head2 getquotaroot + +Example: + + my $results = $imap->getquotaroot($mailboxname) + or die "Could not getquotaroot for $mailboxname: $@\n"; + +The B method implements the RFC2087 GETQUOTAROOT +command. The "$mailboxname" defaults to "INBOX" if no argument is +provided. + +On error C is returned, otherwise L are returned. +The results should have the untagged QUOTAROOT response from the +server along with the QUOTAROOT's resource usage and limits in an +untagged QUOTA response. + +See also B, L, L, L and L. + +=head2 getquota + +Example: + + my $results = $imap->getquota($quotaroot) + or die "Could not getquota for $quotaroot: $@\n"; + +The B method implements the RFC2087 GETQUOTA command. The +"$quotaroot" defaults to "user/I" if no argument is provided. + +On error C is returned, otherwise L are returned. +The results from the server should have the untagged QUOTA response +from the server. + +See also B, L, L and L. + +=head2 quota + +Example: + + my $limit = $imap->quota($quotaroot) + or die "Could not get quota limit for $quotaroot: $@\n"; + +The B method takes the L from L and parses +out the "STORAGE" limit returned by the server. The "$quotaroot" +defaults to "INBOX" if no argument is provided. + +On error C is returned, otherwise the integer "STORAGE" limit +provided by the server is returned. + +See also B, L, L and L. + +=head2 quota_usage + +Example: + + my $usage = $imap->quota_usage($quotaroot) + or die "Could not get quota usage for $quotaroot: $@\n"; + +The B method takes the L from L and +parses out the "STORAGE" usage returned by the server. The +"$quotaroot" defaults to "INBOX" if no argument is provided. + +On error C is returned, otherwise the integer "STORAGE" usage +provided by the server is returned. + +See also B, L, L and L. + +=head2 setquota + +Example: + + my $results = $imap->setquota( $quotaroot, $resource, $limit ) + or die "Could not setquota for $quotaroot: $@\n"; + +The B method implements the RFC2087 SETQUOTA command. It +accepts multiple pairs of $resource and $limit arguments. The +"$quotaroot" defaults to "user/I" if not defined. + +On error C is returned, otherwise L are returned. + +See also B, L and L. + +=head2 is_parent + +Example: + + my $hasKids = $imap->is_parent($folder); + +The B method accepts one argument, the name of a folder. It +returns a value that indicates whether or not the folder has children. +The value it returns is either 1) a true value (indicating that the +folder has children), 2) 0 if the folder has no children at this time, +or 3) C if the folder is not permitted to have children. + +Eg: + + my $parenthood = $imap->is_parent($folder); + if (defined($parenthood)) { + if ($parenthood) { + print "$folder has children.\n"; + } else { + print "$folder is permitted children, but has none.\n"; + } + } else { + print "$folder is not permitted to have children.\n"; + } + +=head2 list + +Example: + + my @raw_output = $imap->list(@args) + or die "Could not list: $@\n"; + +The B method implements the IMAP LIST client command. Arguments +are passed to the IMAP server as received, separated from each other +by spaces. If no arguments are supplied then the default list command +C is issued. + +The B method returns an array (or an array reference, if called +in a scalar context). The array is the unadulterated output of the +LIST command. (If you want your output adulterated then see the +L method, above.) + +An C value is returned in case of errors. Be sure to check for +it. + +=head2 listrights + +Example: + + $imap->listrights($folder,$user) + or die "Could not listrights: $@\n"; + +The B method implements the IMAP LISTRIGHTS client command +(L). It accepts two arguments, the foldername and a user id. +It returns the rights the specified user has for the specified folder. +If called in a scalar context then the rights are returned a strings, +with no punctuation or white space or any nonsense like that. If called +in array context then B returns an array in which each +element is one right. + +=head2 login + +Example: + + $imap->login or die "Could not login: $@\n"; + +The B method implements the IMAP LOGIN client command to log +into the server. It automatically calls L if the +I parameter is set to anything except 'LOGIN' otherwise +a clear text LOGIN is attempted. + +The I and I parameters must be set before the B +method can be invoked. On success, a Mail::IMAPClient object with the +Status of I is returned. On failure, undef is returned +and $@ is set. The methods L, L, and L may +automatically invoke B see the documentation of each method for +details. + +If the L parameter is set, the L method will +automatically be called after successful authentication. + +See also L and L for additional information +regarding ways of authenticating with a server via SASL and/or +PROXYAUTH. + +=head2 proxyauth + +Example: + + $imap->login("admin", "password"); + $imap->proxyauth("someuser"); + +The B method implements the IMAP PROXYAUTH client command. +The command is used by Sun/iPlanet/Netscape IMAP servers to allow an +administrative user to masquerade as another user. + +=head2 logout + +Example: + + $imap->logout or die "Could not logout: $@\n"; + +The B method implements the LOGOUT IMAP client commmand. This +method causes the server to end the connection and the IMAPClient +client enters the I state. This method does not, destroy +the IMAPClient object, thus the L and L methods can +be used to establish a new IMAP session. + +Note that RFC2683 section 3.1.2 (Severed connections) makes some +recommendations on how IMAP clients should behave. It is up to the +user of this module to decide on the preferred behavior and code +accordingly. + +Version note: documentation (from 2.x through 3.23) claimed that +Mail::IMAPClient would attempt to log out of the server during +B if the object is in the L state. This +documentation was apparently incorrect from at least 2.2.2 and +possibly earlier versions on up. + +=head2 lsub + +Example: + + $imap->lsub(@args) or die "Could not lsub: $@\n"; + +The B method implements the IMAP LSUB client command. Arguments +are passed to the IMAP server as received, separated from each other +by spaces. If no arguments are supplied then the default lsub command +C is issued. + +The B method returns an array (or an array reference, if called +in a scalar context). The array is the unaltered output of the LSUB +command. If you want an array of subscribed folders then see the +L method, below. + +=head2 mark + +Example: + + $imap->mark(@msgs) or die "Could not mark: $@\n"; + +The B method accepts a list of one or more messages sequence +numbers, or a single reference to an array of one or more message +sequence numbers, as its argument(s). It then sets the "\Flagged" +flag for those message(s). Of course, if the L parameter is set +to a true value then those message sequence numbers had better be +unique message id's. + +Note that specifying C<$imap-Esee(@msgs)> is just a shortcut for +specifying C<$imap-Eset_flag("Flagged",@msgs)>. + +=head2 Massage + +Example: + + $imap->search(HEADER => 'Message-id' => $imap->Massage($msg_id,1)); + +The B method accepts a value as an argument and, optionally, +a second value that, when true, indicates that the first argument is +not the name of an existing folder. + +It returns its argument as a correctly quoted string or a literal +string. + +Note that you should rarely use this on folder names, since methods +that accept folder names as an argument will call B for +you. In fact, it was originally developed as an undocumented helper +method meant for internal Mail::IMAPClient methods only. + +You may also want to see the L method, which is related to +this method. + +=head2 message_count + +Example: + + my $msgcount = $imap->message_count($folder); + defined($msgcount) or die "Could not message_count: $@\n"; + +The B method accepts the name of a folder as an +argument and returns the number of messages in that folder. +Internally, it invokes the L method (see above) and parses +out the results to obtain the number of messages. If you don't supply +an argument to B then it will return the number of +messages in the currently selected folder (assuming of course that +you've used the L or L method to select it instead +of trying something funky). Note that RFC2683 contains warnings about +the use of the IMAP I command (and thus the L method +and therefore the B method) against the currently +selected folder. You should carefully consider this before using +B on the currently selected folder. You may be better +off using L or one of its variants (especially L), +and then counting the results. On the other hand, I regularly violate +this rule on my server without suffering any dire consequences. Your +mileage may vary. + +=head2 message_string + +Example: + + my $string = $imap->message_string($msgid) + or die "Could not message_string: $@\n"; + +The B method accepts a message sequence number (or +message UID if L is true) as an argument and returns the message +as a string. The returned value contains the entire message in one +scalar variable, including the message headers. Note that using this +method will set the message's "\Seen" flag as a side effect, unless +I is set to a true value. + +=head2 message_to_file + +Example: + + $imap->message_to_file($file,@msgs) + or die "Could not message_to_file: $@\n"; + +The B method accepts a filename or file handle and +one or more message sequence numbers (or message UIDs if L is +true) as arguments and places the message string(s) (including RFC822 +headers) into the file named in the first argument (or prints them to +the file handle, if a file handle is passed). The returned value is +true on success and C on failure. + +If the first argument is a reference, it is assumed to be an open +file handle and will not be closed when the method completes, If it is +a file, it is opened in append mode, written to, then closed. + +Note that using this method will set the message's "\Seen" flag as a +side effect. But you can use the L method to set it +back, or set the L parameter to a true value to prevent setting +the "\Seen" flag at all. + +This method currently works by making some basic assumptions about the +server's behavior, notably that the message text will be returned as a +literal string but that nothing else will be. If you have a better +idea then I'd like to hear it. + +=head2 message_uid + +Example: + + my $msg_uid = $imap->message_uid($msg_seq_no) + or die "Could not get uid for $msg_seq_no: $@\n"; + +The B method accepts a message sequence number (or +message UID if L is true) as an argument and returns the +message's UID. Yes, if L is true then it will use the IMAP UID +FETCH UID client command to obtain and return the very same argument +you supplied. This is an IMAP feature so don't complain to me about +it. + +=head2 messages + +Example: + + # Get a list of messages in the current folder: + my @msgs = $imap->messages or die "Could not messages: $@\n"; + # Get a reference to an array of messages in the current folder: + my $msgs = $imap->messages or die "Could not messages: $@\n"; + +If called in list context, the B method returns a list of +all the messages in the currently selected folder. If called in +scalar context, it returns a reference to an array containing all the +messages in the folder. If you have the L parameter turned off, +then this is the same as specifying C<1 ... $imap-EL>; +if you have UID set to true then this is the same as specifying +C<$imap-EL("ALL")>. + +=head2 migrate + +Example: + + $imap_src->migrate( $imap_dest, "ALL", $targetFolder ) + or die "Could not migrate: ", $imap_src->LastError; + +The B method copies the indicated message(s) B the +currently selected folder B another Mail::IMAPClient object's +session. It requires these arguments: + +=over 4 + +=item 1. + +a reference to the target Mail::IMAPClient object (not the calling +object, which is connected to the source account); + +=item 2. + +the message(s) to be copied, specified as either a) the message +sequence number (or message UID if the UID parameter is true) of a +single message, b) a reference to an array of message sequence numbers +(or message UID's if the UID parameter is true) or c) the special +string "ALL", which is a shortcut for the results of +C("ALL")>. + +=item 3. + +the name of the destination folder on the target mailbox to receive +the message(s). If this argument is not supplied or is I then +the currently selected folder on the calling object will be used. The +destination folder will be automatically created if necessary. + +=back + +The target ($imap_dest) Mail::IMAPClient object must not be the same +object as the source ($imap_src). + +This method does not attempt to minimize memory usage. In the future +it could be enhanced to (optionaly) write message data to a temporary +file to avoid storing the entire message in memory. + +To work around potential network timeouts on large messages, consider +setting L to 1 on both $imap_src and $imap_dest. + +See also C. + +=head2 move + +Example: + + my $newUid = $imap->move( $newFolder, $oldUid ) + or die "Could not move: $@\n"; + $imap->expunge; + +The B method moves messages from the currently selected folder +to the folder specified in the first argument to B. If the +L parameter is not true, then the rest of the arguments should +be either: + +=over 4 + +=item a) + +a message sequence number, + +=item b) + +a comma-separated list of message sequence numbers, or + +=item c) + +a reference to an array of message sequence numbers. + +=back + +If the L parameter is true, then the arguments should be: + +=over 4 + +=item a) + +a message UID, + +=item b) + +a comma-separated list of message UID's, or + +=item c) + +a reference to an array of message UID's. + +=back + +If the target folder does not exist then it will be created. + +If move is successful, then it returns a true value. Furthermore, if +the Mail::IMAPClient object is connected to a server that has the +UIDPLUS capability, then the true value will be the comma-separated +list of UID's for the newly copied messages. The list will be in the +order in which the messages were moved which should correspond to the +order of the message UID provided by the caller. + +If the move is not successful then B returns C. + +Note that a move really just involves copying the message to the new +folder and then setting the I<\Deleted> flag. To actually delete the +original message you will need to run L (or L). + +=head2 namespace + +Example: + + my $refs = $imap->namespace + or die "Could not namespace: $@\n"; + +The namespace method runs the NAMESPACE IMAP command (as defined in +RFC 2342). When called in a list context, it returns a list of three +references. Each reference looks like this: + + [ + [ $prefix_1, $separator_1 ], + [ $prefix_2, $separator_2 ], + [ $prefix_n, $separator_n ], + ] + +The first reference provides a list of prefixes and separator +characters for the available personal namespaces. The second +reference provides a list of prefixes and separator characters for the +available shared namespaces. The third reference provides a list of +prefixes and separator characters for the available public namespaces. + +If any of the three namespaces are unavailable on the current server +then an 'undef' is returned instead of a reference. So for example if +shared folders were not supported on the server but personal and +public namespaces were both available (with one namespace each), the +returned value might resemble this: + + [ [ "", "/" ] , undef, [ "#news", "." ] ]; + +If the B method is called in scalar context, it returns a +reference to the above-mentioned list of three references, thus +creating a single structure that would pretty-print something like +this: + + $VAR1 = [ + [ + [ $user_prefix_1, $user_separator_1 ], + [ $user_prefix_2, $user_separator_2 ], + [ $user_prefix_n, $user_separator_n ], + ], # or undef + [ + [ $shared_prefix_1, $shared_separator_1 ], + [ $shared_prefix_2, $shared_separator_2 ], + [ $shared_prefix_n, $shared_separator_n ], + ], # or undef + [ + [ $public_prefix_1, $public_separator_1 ], + [ $public_prefix_2, $public_separator_2 ], + [ $public_prefix_n, $public_separator_n ], + ], # or undef + ]; + +=head2 on + +Example: + + my @msgs = $imap->on($Rfc3501_date) + or warn "Could not find messages sent on $Rfc3501_date: $@\n"; + +The B method works just like the L method, below, except +it returns a list of messages whose internal system dates are the same +as the date supplied as the argument. + +=head2 parse_headers + +Example: + + my $hashref = $imap->parse_headers($msg||\@msgs, "Date", "Subject") + or die "Could not parse_headers: $@\n"; + +The B method accepts as arguments a message sequence +number and a list of header fields. It returns a hash reference in +which the keys are the header field names (without the colon) and the +values are references to arrays of values. A picture would look +something like this: + + $hashref = $imap->parse_headers(1,"Date","Received","Subject","To"); + $hashref = { + "Date" => [ "Thu, 09 Sep 1999 09:49:04 -0400" ] , + "Received" => [ q/ + from mailhub ([111.11.111.111]) by mailhost.bigco.com + (Netscape Messaging Server 3.6) with ESMTP id AAA527D for + ; Fri, 18 Jun 1999 16:29:07 +0000 + /, q/ + from directory-daemon by mailhub.bigco.com (PMDF V5.2-31 #38473) + id <0FDJ0010174HF7@mailhub.bigco.com> for bigshot@bigco.com + (ORCPT rfc822;big.shot@bigco.com); Fri, 18 Jun 1999 16:29:05 +0000 (GMT) + /, q/ + from someplace ([999.9.99.99]) by smtp-relay.bigco.com (PMDF V5.2-31 #38473) + with ESMTP id <0FDJ0000P74H0W@smtp-relay.bigco.com> for big.shot@bigco.com; Fri, + 18 Jun 1999 16:29:05 +0000 (GMT) + /] , + "Subject" => [ qw/ Help! I've fallen and I can't get up!/ ] , + "To" => [ "Big Shot ] , + }; + +The text in the example for the "Received" array has been formatted to +make reading the example easier. The actual values returned are just +strings of words separated by spaces and with newlines and carriage +returns stripped off. The I header is probably the main +reason that the B method creates a hash of lists rather +than a hash of values. + +If the second argument to B is 'ALL' or if it is +unspecified then all available headers are included in the returned +hash of lists. + +If you're not emotionally prepared to deal with a hash of lists then +you can always call the L method yourself with the appropriate +parameters and parse the data out any way you want to. Also, in the +case of headers whose contents are also reflected in the envelope, you +can use the L method as an alternative to +L. + +If the L parameter is true then the first argument will be +treated as a message UID. If the first argument is a reference to an +array of message sequence numbers (or UID's if L is true), then +B will be run against each message in the array. In +this case the return value is a hash, in which the key is the message +sequence number (or UID) and the value is a reference to a hash as +described above. + +An example of using B to print the date and subject of +every message in your smut folder could look like this: + + use Mail::IMAPClient; + my $imap = Mail::IMAPClient->new( + Server => $imaphost, User => $login, Password => $pass, Uid => 1 + ); + + $imap->select("demo"); + + my $msgs = $imap->search("ALL"); + for my $h ( + + # get the Subject and Date from every message in folder "demo" the + # first arg is a reference to an array listing all messages in the + # folder (which is what gets returned by the $imap->search("ALL") + # method when called in scalar context) and the remaining arguments + # are the fields to parse out The key is the message number, which + # in this case we don't care about: + + values %{ $imap->parse_headers( $msgs , "Subject", "Date") } ) + { + # $h is the value of each element in the hash ref returned + # from parse_headers, and $h is also a reference to a hash. + # We'll only print the first occurrence of each field because + # we don't expect more than one Date: or Subject: line per + # message. + print map { "$_:\t$h->{$_}[0]\n"} keys %$h; + } + +=head2 recent + +Example: + + my @recent = $imap->recent or warn "No recent msgs: $@\n"; + +The B method performs an IMAP SEARCH RECENT search against the +selected folder and returns an array of sequence numbers (or UID's, if +the L parameter is true) of messages that are recent. + +=head2 recent_count + +Example: + + my $count = 0; + defined($count = $imap->recent_count($folder)) + or die "Could not recent_count: $@\n"; + +The B method accepts as an argument a folder name. It +returns the number of recent messages in the folder (as returned by +the IMAP client command "STATUS folder RECENT"), or C in the +case of an error. The B method was contributed by Rob +Deker (deker@ikimbo.com). + +=head2 reconnect + +Example: + $imap->noop or $imap->reconnect or die "noop failed: $@\n"; + +Attempt to reconnect if the IMAP connection unless $imap is already in +the IsConnected state. This method calls L and optionally +L if a Folder was previously selected. On success, returns +the (same) $imap object. On failure is returned and +L is set. + +Version note: method added in Mail::IMAPClient 3.17 + +=head2 rename + +Example: + + $imap->rename($oldname,$nedwname) + or die "Could not rename: $@\n"; + +The B method accepts two arguments: the name of an existing +folder, and a new name for the folder. The existing folder will be +renamed to the new name using the RENAME IMAP client command. +B will return a true value if successful, or C if +unsuccessful. + +=head2 restore_message + +Example: + + $imap->restore_message(@msgs) or die "Could not restore_message: $@\n"; + +The B method is used to undo a previous +L operation (but not if there has been an intervening +L or L). The IMAPClient object must be in +L status to use the B method. + +The B method accepts a list of arguments. If the +L parameter is not set to a true value, then each item in the +list should be either: + +=over 4 + +=item > + +a message sequence number, + +=item > + +a comma-separated list of message sequence numbers, + +=item > + +a reference to an array of message sequence numbers, or + +=back + +If the L parameter is set to a true value, then each item in the +list should be either: + +=over 4 + +=item > + +a message UID, + +=item > + +a comma-separated list of UID's, or + +=item > + +a reference to an array of message UID's. + +=back + +The messages identified by the sequence numbers or UID's will have +their I<\Deleted> flags cleared, effectively "undeleting" the +messages. B returns the number of messages it was +able to restore. + +Note that B is similar to calling +C("\Deleted",@msgs)>, except that B +returns a (slightly) more meaningful value. Also it's easier to type. + +=head2 run + +Example: + + $imap->run(@args) or die "Could not run: $@\n"; + +The B method is provided to make those uncommon things +possible... however, we would like you to contribute the knowledge of +missing features with us. + +The B method excepts one or two arguments. The first argument is +a string containing an IMAP Client command, including a tag and all +required arguments. The optional second argument is a string to look +for that will indicate success. (The default is C). The +B method returns an array (or arrayref in scalar context) of +output lines from the command, which you are free to parse as you see +fit. + +The B method does not do any syntax checking, other than +rudimentary checking for a tag. + +When B processes the command, it increments the transaction count +and saves the command and responses in the History buffer in the same +way other commands do. However, it also creates a special entry in +the History buffer named after the tag supplied in the string passed +as the first argument. If you supply a numeric value as the tag then +you may risk overwriting a previous transaction's entry in the History +buffer. + +If you want the control of B but you don't want to worry about +tags then see L, below. + +=head2 search + +Example: + + my $msgs1 = $imap->search(@args); + if ($msgs) { + print "search matches: @$msgs1"; + } + else { + warn "Error in search: $@\n" if $@; + } + + # or note: be sure to quote string properly + my $msgs2 = $imap->search( \( $imap->Quote($msgid), "FROM", q{"me"} ) ) + or warn "search failed: $@\n"; + + # or note: be sure to quote string properly + my $msgs3 = $imap->search('TEXT "string not in mailbox"') + or warn "search failed: $@\n"; + +The B method implements the SEARCH IMAP client command. Any +arguments supplied to B are prefixed with a space then +appended to the SEARCH IMAP client command. The SEARCH IMAP client +command allows for many options and arguments. See RFC3501 for +details. + +As of version 3.17 B tries to "DWIM" by automatically quoting +things that likely need quotes when the words do not match any of the +following: + + ALL ANSWERED BCC BEFORE BODY CC DELETED DRAFT FLAGGED + FROM HEADER KEYWORD LARGER NEW NOT OLD ON OR RECENT + SEEN SENTBEFORE SENTON SENTSINCE SINCE SMALLER SUBJECT + TEXT TO UID UNANSWERED UNDELETED UNDRAFT UNFLAGGED + UNKEYWORD UNSEEN + +The following options exist to avoid the automatic quoting (note: +caller is responsible for verifying the data sent in these cases is +properly escaped/quoted): + +=over 4 + +=item * + +specify a single string/argument in the call to search. + +=item * + +specify args as scalar references (SCALAR) and the values of those +SCALAR refs will be passed along as-is. + +=back + +The B method returns an array containing sequence numbers of +messages that passed the SEARCH IMAP client command's search criteria. +If the L parameter is true then the array will contain message +UID's. If B is called in scalar context then a pointer to the +array will be passed, instead of the array itself. If no messages +meet the criteria then B returns an empty list (when in list +context) or C (in scalar context). + +Since a valid, successful search can legitimately return zero matches, +you may wish to distinguish between a search that correctly returns +zero hits and a search that has failed for some other reason (i.e. +invalid search parameters). Therefore, the C<$@> variable will always +be cleared before the I command is issued to the server, and +will thus remain empty unless the server gives a I or I +response to the I command. + +=head2 see + +Example: + + $imap->see(@msgs) or die "Could not see: $@\n"; + +The B method accepts a list of one or more messages sequence +numbers, or a single reference to an array of one or more message +sequence numbers, as its argument(s). It then sets the I<\Seen> flag +for those message(s). Of course, if the L parameter is set to a +true value then those message sequence numbers had better be unique +message id's, but then you already knew that, didn't you? + +Note that specifying C<$imap-Esee(@msgs)> is just a shortcut for +specifying C<$imap-EL("Seen",@msgs)>. + +=head2 seen + +Example: + + my @seenMsgs = $imap->seen or warn "No seen msgs: $@\n"; + +The B method performs an IMAP SEARCH SEEN search against the +selected folder and returns an array of sequence numbers of messages +that have already been seen (ie their I<\Seen> flag is set). If the +L parameter is true then an array of message UID's will be +returned instead. If called in scalar context than a reference to the +array (rather than the array itself) will be returned. + +=head2 select + +Example: + + $imap->select($folder) or die "Could not select: $@\n"; + +The B method (or L's read-only equivalent, the +L method) to select it. + +Note that setting the I parameter does not automatically +select a new folder; you use the L or L object +methods for that. Generally, the I parameter should only be +queried (by using the no-argument form of the B method). You +will only need to set the I parameter if you use some +mysterious technique of your own for selecting a folder, which you +probably won't do. + +=head2 Ignoresizeerrors + +Certain (caching) servers, like Exchange 2007, often report the wrong +message size. Instead of chopping the message into a size that it +fits the specified size, the reported size will be simply ignored when +this parameter is set to C<1>. + +=head2 Keepalive + +Some firewalls and network gear like to timeout connections +prematurely if the connection sits idle. The B parameter, +when set to a true value, affects the behavior of L and +L by enabling SO_KEEPALIVE on the socket. + +Version note: attribute added in Mail::IMAPClient 3.17 + +=head2 Maxcommandlength + +The B attribute is used by fetch() to limit length +of commands sent to a server. The default is 1000 chars, following +the recommendation of RFC2683 section 3.2.1.5. + +B: this attribute should also be used for several other methods +but this has not yet been implemented please feel free to file bugs +for methods where you run into problems with this. + +This attribute should remove the need for utilities like imapsync to +create their own split() functions and instead allows Mail::IMAPClient +to DWIM. + +In practice, this parameter has proven to be useful to overcome a +limit of 8000 octets for UW-IMAPD and 16384 octets for Courier/Cyrus +IMAP servers. + +Version note: attribute added in Mail::IMAPClient 3.17 + +=head2 Maxtemperrors + +Example: + + $Maxtemperrors = $imap->Maxtemperrors(); + # or: + $imap->Maxtemperrors($number); + +The I parameter specifies the number of times a read or +write operation is allowed to fail on a "Resource Temporarily +Available" (e.g. EAGAIN) error. The default setting is I which +means there is no limit. + +Setting this parameter to the string "unlimited" (instead of undef) to +ignore "Resource Temporarily Unavailable" errors is deprecated. + +B: This setting should be used with caution and may be removed +in a future release. Setting this can cause methods to return to the +caller before data is received (and then handled) properly thereby +possibly then leaving the module in a bad state. In the future, this +behavior may be changed in an attempt to avoid this situation. + +=head2 Password + +Example: + + $Password = $imap->Password(); + # or: + $imap->Password($new_value); + +Specifies the password to use when logging into the IMAP service on +the host specified in the I parameter as the user specified in +the I parameter. Can be supplied with the B method call or +separately by calling the B object method. + +If I, I, and I are all provided to the L +method, then the newly instantiated object will be connected to the +host specified in I (at either the port specified in I +or the default port 143) and then logged on as the user specified in +the I parameter (using the password provided in the I +parameter). See the discussion of the L method, below. + +=head2 Peek + +Example: + + $Peek = $imap->Peek(); + # or: + $imap->Peek($true_or_false); + +Setting I to a true value will prevent the L, +L and L methods from automatically +setting the I<\Seen> flag. Setting L to 0 (zero) will force +L, L, L, and +L to always set the I<\Seen> flag. + +The default is to set the seen flag whenever you fetch the body of a +message but not when you just fetch the headers. Passing I to +the eponymous B method will reset the I parameter to its +pristine, default state. + +=head2 Port + +Example: + + $Port = $imap->Port(); + # or: + $imap->Port($new_value); + +Specifies the port on which the IMAP server is listening. A default +value of 993 (if L is true) or 143 is set during a call to +L if no value is provided by the caller. This argument can +be supplied with the L method call or separately by calling the +L object method. + +=head2 Prewritemethod + +I parameter should contain a reference to a subroutine +that will do "special things" to data before it is sent to the IMAP +server (such as encryption or signing). + +This method will be called immediately prior to sending an IMAP client +command to the server. Its first argument is a reference to the +I object and the second argument is a string +containing the command that will be sent to the server. Your +I should return a string that has been signed or +encrypted or whatever; this returned string is what will actually be +sent to the server. + +Your I will probably need to know more than this to do +whatever it does. It is recommended that you tuck all other pertinent +information into a hash, and store a reference to this hash somewhere +where your method can get to it, possibly in the I +object itself. + +Note that this method should not actually send anything over the +socket connection to the server; it merely converts data prior to +sending. + +See also L. + +=head2 Ranges + +Example: + + $imap->Ranges(1); + # or: + my $search = $imap->search(@search_args); + if ( $imap->Ranges) { # $search is a MessageSet object + print "This is my condensed search result: $search\n"; + print "This is every message in the search result: ", + join(",",@$search),"\n; + } + +If set to a true value, then the L method will return a +L object if called in a scalar context, +instead of the array reference that B normally returns when +called in a scalar context. If set to zero or if undefined, then +B will continue to return an array reference when called in +scalar context. + +This parameter has no affect on the B method when B +is called in a list context. + +=head2 RawSocket + +Example: + $socket = $imap->RawSocket; + # or: + $imap->RawSocket($socketh); + +The I method can be used to obtain the socket handle of the +current connection (say, to do I/O on the connection that is not +otherwise supported by Mail::IMAPClient) or to replace the current +socket with a new handle (for instance an SSL handle, see +L, but be sure to see the L method as well). + +If you supply a socket handle yourself, either by doing something like: + + $imap=Mail::IMAPClient->new(RawSocket => $sock, User => ... ); + +or by doing something like: + + $imap = Mail::IMAPClient->new(User => $user, + Password => $pass, Server => $host); + # blah blah blah + $imap->RawSocket($ssl); + +then it will be up to you to establish the connection AND to +authenticate, either via the L method, or the fancier +L, or, since you know so much anyway, by just doing raw +I/O against the socket until you're logged in. If you do any of this +then you should also set the L parameter yourself to reflect +the current state of the object (i.e. Connected, Authenticated, etc). + +Note that no operation will be attempted on the socket when this +method is called. In particular, after the TCP connections towards +the IMAP server is established, the protocol mandates the server to +send an initial greeting message, and you will have to explicitly cope +with this message before doing any other operation, e.g. trying to +call L. Caveat emptor. + +For a more DWIM approach to setting the socket see L. + +=head2 Readmethod + +Example: + + $imap->Readmethod( # IMAP, HANDLE, BUFFER, LENGTH, OFFSET + sub { + my ( $self, $handle, $buffer, $count, $offset ) = @_; + my $rc = sysread( $handle, $$buffer, $count, $offset ); + # do something useful here... + } + ); + +B should contain a reference to a subroutine that will +replace sysread. The subroutine will be passed the following +arguments: first the used Mail::IMAPClient object. Second, a +reference to a socket. Third, a reference to a scalar variable into +which data is read (BUFFER). The data placed here should be "finished +data", so if you are decrypting or removing signatures then be sure to +do that before you place data into this buffer. Fourth, the number of +bytes requested to be read; the LENGTH of the request. Lastly, the +OFFSET into the BUFFER where the data should be read. If not supplied +it should default to zero. + +Note that this method completely replaces reads from the connection +to the server, so if you define one of these then your subroutine will +have to actually do the read. It is for things like this that we have +the L parameter and eponymous accessor method. + +Your I will probably need to know more than this to do +whatever it does. It is recommended that you tuck all other pertinent +information into a hash, and store a reference to this hash somewhere +where your method can get to it, possibly in the I +object itself. + +See also L. + +=head2 Readmoremethod + +B should contain a reference to a subroutine that will +replace/enhance the behavior of the internal _read_more() method. The +subroutine will be passed the following arguments: first the used +Mail::IMAPClient object. Second, a reference to a socket. Third, a +timeout value which is used as the timeout value for CORE::select() by +default. Depending upon changes/features introduced by Readmethod +changes may be required here. + +Version note: attribute added in Mail::IMAPClient 3.30 + +=head2 Reconnectretry + +If an IMAP connection sits idle too long, the connection may be closed +by the server or firewall, etc. The B parameter, when +given a positive integer value, will cause Mail::IMAPClient to +retrying IMAP commands up to X times when an EPIPE or ECONNRESET error +occurs. This is disabled (0) by default. + +See also L + +Version note: attribute added in Mail::IMAPClient 3.17 + +=head2 Server + +Example: + + $Server = $imap->Server(); + # or: + $imap->Server($hostname); + +Specifies the hostname or IP address of the host running the IMAP +server. If provided as part of the L method call, then the new +IMAP object will automatically be connected at the time of +instantiation. (See the L method, below.) Can be supplied with +the L method call or separately by calling the B object +method. + +=head2 Showcredentials + +Normally debugging output will mask the login credentials when the +plain text login mechanism is used. Setting I to a +true value will suppress this, so that you can see the string being +passed back and forth during plain text login. Only set this to true +when you are debugging problems with the IMAP LOGIN command, and then +turn it off right away when you're finished working on that problem. + +Example: + + print "This is very risky!\n" if $imap->Showcredentials(); + # or: + $imap->Showcredentials(0); # mask credentials again + +=head2 Socket + +B The semantics of this method has changed as of version +2.99_04 of this module. If you need the old semantics use +L. + +Example: + + $Socket = $imap->Socket(); + # or: + $imap->Socket($socket_fh); + +The I method can be used to obtain the socket handle of the +current connection. This may be necessary to do I/O on the connection +that is not otherwise supported by Mail::IMAPClient) or to replace the +current socket with a new handle (for instance an SSL handle, see +IO::Socket::SSL). + +If you supply a socket handle yourself, either by doing something like: + + $imap = Mail::IMAPClient->new( Socket => $sock, User => ... ); + +or by doing something like: + + $imap = Mail::IMAPClient->new( + User => $user, Password => $pass, Server => $host + ); + $imap->Socket($ssl); + +then you are responsible for establishing the connection, i.e. make +sure that C<$ssl> in the example is a valid and connected socket. + +This method is primarily used to provide a drop-in replacement for +L, used by L by default. In fact, this +method is called by L itself after having established a +suitable L socket connection towards the target +server; for this reason, this method also carries the normal +operations associated with L, namely: + +=over 4 + +=item * + +read the initial greeting message from the server; + +=item * + +call L if the conditions apply (see L for details); + +=item * + +leave the I object in a suitable state. + +=back + +For these reasons, the following example will work "out of the box": + + use IO::Socket::SSL; + my $imap = Mail::IMAPClient->new + ( User => 'your-username', + Password => 'your-password', + Socket => IO::Socket::SSL->new + ( Proto => 'tcp', + PeerAddr => 'some.imap.server', + PeerPort => 993, # IMAP over SSL standard port + ), + ); + +If you need more control over the socket, e.g. you have to implement a +fancier authentication method, see L. + +=head2 Starttls + +If an IMAP connection must start TLS/SSL after connecting to a server +then set this attribute. If the value is set to an arrayref then they +will be used as arguments to IO::Socket::SSL->start_SSL. By default +this connection is set to blocking while establishing the connection +with a timeout of 30 seconds. The socket will be reset to the +original blocking/non-blocking value after a successful TLS +negotiation has occured. The arguments used in the call to start_SSL +can be controlled by setting this attribute to an ARRAY reference +containing the desired arguments. + +Version note: attribute added in Mail::IMAPClient 3.22 + +=head2 Socketargs + +The arguments used in the call to IO::Socket::{UNIX|INET|SSL}->new can +be controlled by setting this attribute to an ARRAY reference +containing the desired arguments. + +For example, to always pass MultiHomed => 1 to IO::Socket::...->new +the following can be used: + + $imap = Mail::IMAPClient->new( + ..., Socketargs => [ MultiHomed => 1 ], ... + ); + +See also L for specific control of the args to IO::Socket::SSL. + +Version note: attribute added in Mail::IMAPClient 3.34 + +=head2 Ssl + +If an IMAP connection requires SSL you can set the Ssl attribute to +'1' and Mail::IMAPClient will automatically use L +instead of L to connect to the server. This +attribute is used in the L method. The arguments used in +the call to IO::Socket::SSL->new can be controlled by setting this +attribute to an ARRAY reference containing the desired arguments. + +See also L for details on connection initiatiation and +L and L if you need to take more control of +connection management. + +Version note: attribute added in Mail::IMAPClient 3.18 + +=head2 Supportedflags + +Especially when C is used, the receiving peer may need to +be configured explicitly with the list of supported flags; that may +be different from the source IMAP server. + +The names are to be specified as an ARRAY. Black-slashes and casing +will be ignored. + +You may also specify a CODE reference, which will be called for each +of the flags separately. In this case, the flags are not (yet) +normalized. The returned lists of the CODE calls are shape the +resulting flag list. + +=head2 Timeout + +Example: + + $Timeout = $imap->Timeout(); + # or: + $imap->Timeout($seconds); + +Specifies the timeout value in seconds for reads (default is 600). +Specifying a I will prevent Mail::IMAPClient from blocking +in a read. + +Since timeouts are implemented via the Perl L +operator, the I parameter may be set to a fractional number +of seconds. Setting I to 0 (zero) disables the timeout +feature. + +=head2 Uid + +Example: + + $Uid = $imap->Uid(); + # or: + $imap->Uid($true_or_false); + +If L is set to a true value (i.e. 1) then the behavior of the +L, L, L, and L methods (and their +derivatives) is changed so that arguments that would otherwise be +message sequence numbers are treated as message UID's and so that +return values (in the case of the L method and its +derivatives) that would normally be message sequence numbers are +instead message UID's. + +Internally this is implemented as a switch that, if turned on, causes +methods that would otherwise issue an IMAP FETCH, STORE, SEARCH, or +COPY client command to instead issue UID FETCH, UID STORE, UID SEARCH, +or UID COPY, respectively. The main difference between message +sequence numbers and message UID's is that, according to RFC3501, +UID's must not change during a session and should not change between +sessions, and must never be reused. Sequence numbers do not have that +same guarantee and in fact may be reused right away. + +Since folder names also have a unique identifier (UIDVALIDITY), which +is provided when the folder is Led or Ld or by +doing something like "$imap->status($folder,"UIDVALIDITY"), it is +possible to uniquely identify every message on the server, although +normally you won't need to bother. + +The methods currently affected by turning on the L flag are: + + copy fetch + search store + message_string message_uid + body_string flags + move size + parse_headers thread + +Note that if for some reason you only want the L parameter turned +on for one command, then you can choose between the following two +snippets, which are equivalent: + +Example 1: + + $imap->Uid(1); + my @uids = $imap->search('SUBJECT',"Just a silly test"); # + $imap->Uid(0); + +Example 2: + + my @uids; + foreach $r ($imap->UID("SEARCH","SUBJECT","Just a silly test") { + chomp $r; + $r =~ s/\r$//; + $r =~ s/^\*\s+SEARCH\s+// or next; + push @uids, grep(/\d/,(split(/\s+/,$r))); + } + +In the second example, we used the default method to issue the UID +IMAP Client command, being careful to use an all-uppercase method name +so as not to inadvertently call the L accessor method. Then we +parsed out the message UIDs manually, since we don't have the benefit +of the built-in L method doing it for us. + +Please be very careful when turning the L parameter on and off +throughout a script. If you loose track of whether you've got the +L parameter turned on you might do something sad, like deleting +the wrong message. Remember, like all eponymous accessor methods, the +B method without arguments will return the current value for the +L parameter, so do yourself a favor and check. The safest +approach is probably to turn it on at the beginning (or just let it +default to being on) and then leave it on. (Remember that leaving it +turned off can lead to problems if changes to a folder's contents +cause resequencing.) + +By default, the L parameter is turned on. + +=head2 User + +Example: + + $User = $imap->User(); + # or: + $imap->User($userid); + +Specifies the userid to use when logging into the IMAP service. Can +be supplied with the L method call or separately by calling the +B object method. + +Parameters can be set during L method invocation by passing named +parameter/value pairs to the method, or later by calling the +parameter's eponymous object method. + +=head1 Status Methods + +There are several object methods that return the status of the object. +They can be used at any time to check the status of an IMAPClient +object, but are particularly useful for determining the cause of +failure when a connection and login are attempted as part of a single +L method invocation. The status methods are: + +=head2 Escaped_results + +Example: + + my @results = $imap->Escaped_results; + +The B method is almost identical to the B +method. Unlike the B method, however, server output +transmitted literally will be wrapped in double quotes, with all of +the parentheses, double quotes, backslashes, newlines, and carriage +returns escaped. If called in a scalar context, B +returns an array reference rather than an array. + +B is useful if you are retrieving output and +processing it manually, and you are depending on the above special +characters to delimit the data. It is not useful when retrieving +message contents; use B or B for that. + +=head2 History + +Example: + + my @history = $imap->History; + +The B method is almost identical to the L method. +Unlike the L method, however, the IMAP command that was +issued to create the results being returned is not included in the +returned results. If called in a scalar context, B returns +an array reference rather than an array. + +=head2 IsUnconnected + +returns a true value if the object is currently in an L +state. + +=head2 IsConnected + +returns a true value if the object is currently in either a +L, L, or L state. + +=head2 IsAuthenticated + +returns a true value if the object is currently in either an +L or L state. + +=head2 IsSelected + +returns a true value if the object is currently in a L +state. + +=head2 LastError + +Internally B is implemented just like a parameter (as +described in L, above). There is a I +attribute and an eponymous accessor method which returns the +I text string describing the last error condition +encountered by the server. + +Note that some errors are more serious than others, so I's +value is only meaningful if you encounter an error condition that you +don't like. For example, if you use the L method to see if a +folder exists and the folder does not exist, then an error message +will be recorded in I even though this is not a +particularly serious error. On the other hand, if you didn't use +L and just tried to L a non-existing folder, then +L would return C after setting I to +something like C. At this point it would be useful to print out the +contents of I as you L. + +=head2 LastIMAPCommand + +New in version 2.0.4, B returns the exact IMAP +command string to be sent to the server. Useful mainly in +constructing error messages when L just isn't enough. + +=head2 Report + +The B method returns an array containing a history of the IMAP +session up to the point that B was called. It is primarily +meant to assist in debugging but can also be used to retrieve raw +output for manual parsing. The value of the L parameter +controls how many transactions are in the report. + +=head2 Results + +The B method returns an array containing the results of one +IMAP client command. It accepts one argument, the transaction number +of the command whose results are to be returned. If transaction +number is unspecified then B returns the results of the last +IMAP client command issued. If called in a scalar context, B +returns an array reference rather than an array. + +=head2 State + +The B method returns a numerical value that indicates the +current status of the IMAPClient object. If invoked with an argument, +it will set the object's state to that value. If invoked without an +argument, it behaves just like L, below. + +Normally you will not have to invoke this function. An exception is +if you are bypassing the Mail::IMAPClient module's L and/or +L modules to set up your own connection (say, for example, +over a secure socket), in which case you must manually do what the +L and L methods would otherwise do for you. + +=head2 Status + +The B method returns a numerical value that indicates the +current status of the IMAPClient object. (Not to be confused with the +L method, all lower-case, which is the implementation of the +I IMAP client command.) + +=head2 Transaction + +The B method returns the tag value (or transaction +number) of the last IMAP client command. + +=head1 Custom Authentication Mechanisms + +If you just want to use plain text authentication or any of the +supported L then there is no +need to read this section. + +There are a number of methods and parameters that you can use to build +your own authentication mechanism. All of the methods and parameters +discussed in this section are described in more detail elsewhere in +this document. This section provides a starting point for building +your own authentication mechanism. + +There are I authentication mechanisms out there, if your +preferred mechanism is not currently supported but you manage to get +it working please consider donating them to this module. Patches and +suggestions are always welcome. + +Support for add-on authentication mechanisms in Mail::IMAPClient is +pretty straight forward. You create a callback to be used to provide +the response to the server's challenge. The L parameter +contains a reference to the callback, which can be an anonymous +subroutine or a named subroutine. Then, you identify your +authentication mechanism, either via the L parameter or +as an argument to L. + +You may also need to provide a subroutine to encrypt (or whatever) +data before it is sent to the server. The L parameter +must contain a reference to this subroutine. And, you will need to +decrypt data from the server; a reference to the subroutine that does +this must be stored in the L parameter. + +This framework is based on the assumptions that a) the mechanism you +are using requires a challenge-response exchange, and b) the mechanism +does not fundamentally alter the exchange between client and server +but merely wraps the exchange in a layer of encryption. It also +assumes that the line-oriented nature of the IMAP conversation is +preserved; authentication mechanisms that break up messages into +blocks of a predetermined size may still be possible but will +certainly be more difficult to implement. + +Alternatively, if you have access to B, a utility included in +the Cyrus IMAP distribution, you can use that utility to broker your +communications with the IMAP server. This is quite easy to implement. +An example, F, can be found in the +C subdirectory of the source distribution. + +The following list summarizes the methods and parameters that you may +find useful in implementing advanced authentication: + +=over 4 + +=item The authenticate method + +The L method uses the L parameter to +determine how to authenticate with the server see the method +documentation for details. + +=item Socket and RawSocket + +The L and L methods provide access to the socket +connection. The socket is typically automatically created by the +L method, but if you are implementing an advanced +authentication technique you may choose to set up your own socket +connection and then set this parameter manually, bypassing the +B method completely. This is also useful if you want to use +L alternatives like L and need full +control. + +L simply gets/sets the socket without attempting any +interaction on it. In this case, you have to be sure to handle all +the preliminary operations and manually set the Mail::IMAPClient +object in sync with its actual status with respect to this socket (see +below for additional parameters regarding this, especially the +L parameter). + +Unlike L, L attempts to carry on preliminary +connection phases if the conditions apply. If both parameters are +present, this takes the precedence over L. If +L is set, then the L method will be called by +L. + +B As of version 2.99_04 of this module, semantics for +L have changed to make it more "DWIM". L was +introduced as a replacement for the L parameter in older +version. + +=item State, Server, User, Password, Proxy and Domain Parameters + +If you need to make your own connection to the server and perform your +authentication manually, then you can set these parameters to keep +your Mail::IMAPClient object in sync with its actual status. Of +these, only the L parameter is always necessary. The others +need to be set only if you think your program will need them later. + +=item Authmechanism + +Set this to the value that AUTHENTICATE should send to the server as +the authentication mechanism. If you are brokering your own +authentication then this parameter may be less useful. It exists +primarily so that you can set it when you call L to instantiate +your object. The L method will call L, which will +call L. If L sees that you have set an +B then it will call B, using your +B and B parameters as arguments. + +=item Authcallback + +The L, if set, holds a pointer to a subroutine +(CODEREF). The L method will use this as the callback +argument to the B method if the B and +B parameters are both set. If you set B +but not B then the default callback for your mechanism +will be used. All supported authentication mechanisms have a default +callback; in every other case not supplying the callback results in an +error. + +Most advanced authentication mechanisms require a challenge-response +exchange. After the L method sends " AUTHENTICATE +\015\012" to the IMAP server, the server replies with a +challenge. The L method then invokes the code whose +reference is stored in the B parameter as follows: + + $Authcallback->( $challenge, $imap ) + +where C<$Authcallback> is the code reference stored in the +B parameter, C<$challenge> is the challenge received +from the IMAP server, and C<$imap> is a pointer to the +Mail::IMAPClient object. The return value from the B +routine should be the response to the challenge, and that return value +will be sent by the L method to the server. + +=item Prewritemethod/Readmethod + +The B can hold a subroutine that will do whatever +encryption is necessary and then return the result to the caller so it +in turn can be sent to the server. + +The B can hold a subroutine to be used to replace +B usually performed by Mail::IMAPClient. + +See L and L for details. + +=back + +=head1 REPORTING BUGS + +Please send bug reports to C or +http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient + +=head1 COPYRIGHT AND LICENSE + + Copyright (C) 1999-2003 The Kernen Group, Inc. + Copyright (C) 2007-2009 Mark Overmeer + Copyright (C) 2010-2013 Phil Pearl (Lobbes) + All rights reserved. + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.0 or, +at your option, any later version of Perl 5 you may have available. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the +GNU General Public License or the Artistic License for more details. diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure.pm b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure.pm new file mode 100644 index 0000000..412c61e --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure.pm @@ -0,0 +1,576 @@ +use warnings; +use strict; + +package Mail::IMAPClient::BodyStructure; +use Mail::IMAPClient::BodyStructure::Parse; + +# BUG?: old code used name "HEAD" instead of "HEADER", change? +my $HEAD = "HEAD"; + +# my has file scope, not limited to package! +my $parser = Mail::IMAPClient::BodyStructure::Parse->new + or die "Cannot parse rules: $@\n" + . "Try remaking Mail::IMAPClient::BodyStructure::Parse.\n"; + +sub new { + my $class = shift; + my $bodystructure = shift; + + my $self = $parser->start($bodystructure) + or return undef; + + $self->{_prefix} = ""; + $self->{_id} = exists $self->{bodystructure} ? $HEAD : 1; + $self->{_top} = 1; + + bless $self, ref($class) || $class; +} + +sub _get_thingy { + my $thingy = shift; + my $object = shift || ( ref $thingy ? $thingy : undef ); + + unless ( $object && ref $object ) { + warn $@ = "No argument passed to $thingy method."; + return undef; + } + + unless ( UNIVERSAL::isa( $object, 'HASH' ) && exists $object->{$thingy} ) { + my $a = $thingy =~ /^[aeiou]/i ? 'an' : 'a'; + my $has = ref $object eq 'HASH' ? join( ", ", keys %$object ) : ''; + warn $@ = + ref($object) + . " $object does not have $a $thingy. " + . ( $has ? "It has $has" : '' ); + return undef; + } + + my $value = $object->{$thingy}; + $value =~ s/\\ ( [\\\(\)"\x0d\x0a] )/$1/gx; + $value =~ s/^"(.*)"$/$1/; + $value; +} + +BEGIN { + no strict 'refs'; + foreach my $datum ( + qw/ bodytype bodysubtype bodyparms bodydisp bodyid bodydesc bodyenc + bodysize bodylang envelopestruct textlines / + ) + { + *$datum = sub { _get_thingy( $datum, @_ ) }; + } +} + +sub parts { + my $self = shift; + return wantarray ? @{ $self->{PartsList} } : $self->{PartsList} + if exists $self->{PartsList}; + + my @parts; + $self->{PartsList} = \@parts; + + # BUG?: should this default to ($HEAD, TEXT) + unless ( exists $self->{bodystructure} ) { + $self->{PartsIndex}{1} = $self; + @parts = ( $HEAD, 1 ); + return wantarray ? @parts : \@parts; + } + + foreach my $p ( $self->bodystructure ) { + my $id = $p->id; + push @parts, $id; + $self->{PartsIndex}{$id} = $p; + my $type = uc $p->bodytype || ''; + + push @parts, "$id.$HEAD" + if $type eq 'MESSAGE'; + } + + wantarray ? @parts : \@parts; +} + +sub bodystructure { + my $self = shift; + my $partno = 0; + my @parts; + + if ( $self->{_top} ) { + $self->{_id} ||= $HEAD; + $self->{_prefix} ||= $HEAD; + $partno = 0; + foreach my $b ( @{ $self->{bodystructure} } ) { + $b->{_id} = ++$partno; + $b->{_prefix} = $partno; + push @parts, $b, $b->bodystructure; + } + return wantarray ? @parts : \@parts; + } + + my $prefix = $self->{_prefix} || ""; + $prefix =~ s/\.?$/./; + + foreach my $p ( @{ $self->{bodystructure} } ) { + $partno++; + + # BUG?: old code didn't add .TEXT sections, should we skip these? + # - This code needs to be generalised (maybe it belongs in parts()?) + # - Should every message should have HEAD (actually MIME) and TEXT? + # at least dovecot and iplanet appear to allow this even for + # non-multipart sections + my $pno = $partno; + my $stype = $self->{bodytype} || ""; + my $ptype = $p->{bodytype} || ""; + + # a message and the multipart inside of it "collapse together" + if ( $partno == 1 and $stype eq 'MESSAGE' and $ptype eq 'MULTIPART' ) { + $pno = "TEXT"; + $p->{_prefix} = "$prefix"; + } + else { + $p->{_prefix} = "$prefix$partno"; + } + $p->{_id} ||= "$prefix$pno"; + + push @parts, $p, $p->{bodystructure} ? $p->bodystructure : (); + } + + wantarray ? @parts : \@parts; +} + +sub id { + my $self = shift; + return $self->{_id} + if exists $self->{_id}; + + return $HEAD + if $self->{_top}; + + # BUG?: can this be removed? ... seems wrong + if ( $self->{bodytype} eq 'MULTIPART' ) { + my $p = $self->{_id} || $self->{_prefix}; + $p =~ s/\.$//; + return $p; + } + else { + return $self->{_id} ||= 1; + } +} + +package Mail::IMAPClient::BodyStructure::Part; +our @ISA = qw/Mail::IMAPClient::BodyStructure/; + +package Mail::IMAPClient::BodyStructure::Envelope; +our @ISA = qw/Mail::IMAPClient::BodyStructure/; + +sub new { + my ( $class, $envelope ) = @_; + $parser->envelope($envelope); +} + +sub parse_string { + my ( $class, $envelope ) = @_; + $envelope = "(" . $envelope . ")" unless ( $envelope =~ /^\(/ ); + $parser->envelopestruct($envelope); +} + +sub from_addresses { shift->_addresses( from => 1 ) } +sub sender_addresses { shift->_addresses( sender => 1 ) } +sub replyto_addresses { shift->_addresses( replyto => 1 ) } +sub to_addresses { shift->_addresses( to => 0 ) } +sub cc_addresses { shift->_addresses( cc => 0 ) } +sub bcc_addresses { shift->_addresses( bcc => 0 ) } + +sub _addresses($$$) { + my ( $self, $name, $isSender ) = @_; + ref $self->{$name} eq 'ARRAY' + or return (); + + my @list; + foreach ( @{ $self->{$name} } ) { + my $pn = $_->personalname; + my $name = $pn && $pn ne 'NIL' ? "$pn " : ''; + push @list, $name . '<' . $_->mailboxname . '@' . $_->hostname . '>'; + } + + wantarray ? @list + : $isSender ? $list[0] + : \@list; +} + +BEGIN { + no strict 'refs'; + for my $datum ( + qw(subject inreplyto from messageid bcc date + replyto to sender cc) + ) + { + *$datum = sub { @_ > 1 ? $_[0]->{$datum} = $_[1] : $_[0]->{$datum} } + } +} + +package Mail::IMAPClient::BodyStructure::Address; +our @ISA = qw/Mail::IMAPClient::BodyStructure/; + +for my $datum (qw(personalname mailboxname hostname sourcename)) { + no strict 'refs'; + *$datum = sub { shift->{$datum}; }; +} + +1; + +__END__ + +=head1 NAME + +Mail::IMAPClient::BodyStructure - parse fetched results + +=head1 SYNOPSIS + + use Mail::IMAPClient; + use Mail::IMAPClient::BodyStructure; + + my $imap = Mail::IMAPClient->new( + Server => $server, User => $login, Password => $pass + ); + + $imap->select("INBOX") or die "Could not select INBOX: $@\n"; + + my @recent = $imap->search("recent") or die "No recent msgs in INBOX\n"; + + foreach my $id (@recent) { + my $bsdat = $imap->fetch( $id, "bodystructure" ); + my $bso = Mail::IMAPClient::BodyStructure->new($bsdat); + my $mime = $bso->bodytype . "/" . $bso->bodysubtype; + my $parts = map( "\n\t" . $_, $bso->parts ); + print "Msg $id (Content-type: $mime) contains these parts:$parts\n"; + } + +=head1 DESCRIPTION + +This extension will parse the result of an IMAP FETCH BODYSTRUCTURE +command into a perl data structure. It also provides helper methods +to help pull information out of the data structure. + +This module requires Parse::RecDescent. + +=head1 Class Methods + +The following class method is available: + +=head2 new + +This class method is the constructor method for instantiating new +Mail::IMAPClient::BodyStructure objects. The B method accepts +one argument, a string containing a server response to a FETCH +BODYSTRUCTURE directive. + +The module B provides the B +conveniece method to simplify use of this module when starting with +just a messages sequence number or unique ID (UID). + +=head1 Object Methods + +The following object methods are available: + +=head2 bodytype + +The B object method requires no arguments. It returns the +bodytype for the message whose structure is described by the calling +B object. + +=head2 bodysubtype + +The B object method requires no arguments. It returns the +bodysubtype for the message whose structure is described by the calling +B object. + +=head2 bodyparms + +The B object method requires no arguments. It returns the +bodyparms for the message whose structure is described by the calling +B object. + +=head2 bodydisp + +The B object method requires no arguments. It returns the +bodydisp for the message whose structure is described by the calling +B object. + +=head2 bodyid + +The B object method requires no arguments. It returns the +bodyid for the message whose structure is described by the calling +B object. + +=head2 bodydesc + +The B object method requires no arguments. It returns the +bodydesc for the message whose structure is described by the calling +B object. + +=head2 bodyenc + +The B object method requires no arguments. It returns the +bodyenc for the message whose structure is described by the calling +B object. + +=head2 bodysize + +The B object method requires no arguments. It returns the +bodysize for the message whose structure is described by the calling +B object. + +=head2 bodylang + +The B object method requires no arguments. It returns the +bodylang for the message whose structure is described by the calling +B object. + +=head2 bodystructure + +The B object method requires no arguments. It returns +the bodystructure for the message whose structure is described by the +calling B object. + +=head2 envelopestruct + +The B object method requires no arguments. It returns +a B object for the message +from the calling B object. + +=head2 textlines + +The B object method requires no arguments. It returns the +textlines for the message whose structure is described by the calling +B object. + +=head1 Mail::IMAPClient::BodyStructure::Envelope + +The IMAP standard specifies that output from the IMAP B command will be an RFC2060 envelope structure. It further +specifies that output from the B command may also +contain embedded envelope structures (if, for example, a message's +subparts contain one or more included messages). Objects belonging to +B are Perl representations +of these envelope structures, which is to say the nested parenthetical +lists of RFC2060 translated into a Perl datastructure. + +Note that all of the fields relate to the specific part to which they +belong. In other words, output from a FETCH nnnn ENVELOPE command +(or, in B, C<$imap->fetch($msgid,"ENVELOPE")> or +Cget_envelope($msgid)>) are for the message, but +fields from within a bodystructure relate to the message subpart and +not the parent message. + +An envelope structure's B +representation is a hash of thingies that looks like this: + + { + subject => "subject", + inreplyto => "reference_message_id", + from => [ addressStruct1 ], + messageid => "message_id", + bcc => [ addressStruct1, addressStruct2 ], + date => "Tue, 09 Jul 2002 14:15:53 -0400", + replyto => [ adressStruct1, addressStruct2 ], + to => [ adressStruct1, addressStruct2 ], + sender => [ adressStruct1 ], + cc => [ adressStruct1, addressStruct2 ], + } + +The B<...::Envelope> object also has methods for accessing data in the +structure. They are: + +=over 4 + +=item date + +Returns the date of the message. + +=item inreplyto + +Returns the message id of the message to which this message is a reply. + +=item subject + +Returns the subject of the message. + +=item messageid + +Returns the message id of the message. + +=back + +You can also use the following methods to get addressing information. +Each of these methods returns an array of +B objects, which are perl +data structures representing RFC2060 address structures. Some of +these arrays would naturally contain one element (such as B, +which normally contains a single "From:" address); others will often +contain more than one address. However, because RFC2060 defines all +of these as "lists of address structures", they are all translated +into arrays of B<...::Address> objects. + +See the section on B, below, +for alternate (and preferred) ways of accessing these data. + +The methods available are: + +=over 4 + +=item bcc + +Returns an array of blind cc'ed recipients' address structures. +(Don't expect much in here unless the message was sent from the +mailbox you're poking around in, by the way.) + +=item cc + +Returns an array of cc'ed recipients' address structures. + +=item from + +Returns an array of "From:" address structures--usually just one. + +=item replyto + +Returns an array of "Reply-to:" address structures. Once again there +is usually just one address in the list. + +=item sender + +Returns an array of senders' address structures--usually just one and +usually the same as B. + +=item to + +Returns an array of recipients' address structures. + +=back + +Each of the methods that returns a list of address structures (i.e. a +list of B arrays) also has +an analagous method that will return a list of E-Mail addresses +instead. The addresses are in the format Cmailboxname@hostnameE> (see the section on +B, below) However, if the +personal name is 'NIL' then it is omitted from the address. + +These methods are: + +=over 4 + +=item bcc_addresses + +Returns a list (or an array reference if called in scalar context) of +blind cc'ed recipients' email addresses. (Don't expect much in here +unless the message was sent from the mailbox you're poking around in, +by the way.) + +=item cc_addresses + +Returns a list of cc'ed recipients' email addresses. If called in a +scalar context it returns a reference to an array of email addresses. + +=item from_addresses + +Returns a list of "From:" email addresses. If called in a scalar +context it returns the first email address in the list. (It's usually +a list of just one anyway.) + +=item replyto_addresses + +Returns a list of "Reply-to:" email addresses. If called in a scalar +context it returns the first email address in the list. + +=item sender_addresses + +Returns a list of senders' email addresses. If called in a scalar +context it returns the first email address in the list. + +=item to_addresses + +Returns a list of recipients' email addresses. If called in a scalar +context it returns a reference to an array of email addresses. + +=back + +Note that context affects the behavior of all of the above methods. + +Those fields that will commonly contain multiple entries (i.e. they +are recipients) will return an array reference when called in scalar +context. You can use this behavior to optimize performance. + +Those fields that will commonly contain just one address (the +sender's) will return the first (and usually only) address. You can +use this behavior to optimize your development time. + +=head1 Addresses and the Mail::IMAPClient::BodyStructure::Address + +Several components of an envelope structure are address structures. +They are each parsed into their own object, +B, which looks like this: + + { + mailboxname => 'somebody.special', + hostname => 'somplace.weird.com' + personalname => 'Somebody Special + sourceroute => 'NIL' + } + +RFC2060 specifies that each address component of a bodystructure is a +list of address structures, so B +parses each of these into an array of +B objects. + +Each of these objects has the following methods available to it: + +=over 4 + +=item mailboxname + +Returns the "mailboxname" portion of the address, which is the part to +the left of the '@' sign. + +=item hostname + +Returns the "hostname" portion of the address, which is the part to +the right of the '@' sign. + +=item personalname + +Returns the "personalname" portion of the address, which is the part +of the address that's treated like a comment. + +=item sourceroute + +Returns the "sourceroute" portion of the address, which is typically "NIL". + +=back + +Taken together, the parts of an address structure form an address that +will look something like this: + +Cmailboxname@hostnameE> + +Note that because the B +objects come in arrays, it's generally easier to use the methods +available to B to obtain +all of the addresses in a particular array in one operation. These +methods are provided, however, in case you'd rather do things the hard +way. (And also because the aforementioned methods from +B need them anyway.) + +=cut + +=head1 AUTHOR + +Original author: David J. Kernen; Reworked by: Mark Overmeer; +Maintained by Phil Pearl. + +=head1 SEE ALSO + +perl(1), Mail::IMAPClient, Parse::RecDescent, and RFC2060. + +=cut diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.grammar b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.grammar new file mode 100644 index 0000000..227ca2c --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.grammar @@ -0,0 +1,189 @@ +# Directives +# ( none) +# Start-up Actions + +{ + my $mibs = "Mail::IMAPClient::BodyStructure"; + my $subpartCount = 0; + my $partCount = 0; + + sub take_optional_items($$@) + { my ($r, $items) = (shift, shift); + foreach (@_) + { my $opt = $_ .'(?)'; + exists $items->{$opt} or next; + $r->{$_} = UNIVERSAL::isa($items->{$opt}, 'ARRAY') + ? $items->{$opt}[0] : $items->{$opt}; + } + } + + sub merge_hash($$) + { my $to = shift; + my $from = shift or return; + while( my($k,$v) = each %$from) { $to->{$k} = $v } + } +} + +# Atoms + +TEXT: /^"TEXT"|^TEXT/i { $return = "TEXT" } +PLAIN: /^"PLAIN"|^PLAIN/i { $return = "PLAIN" } +HTML: /"HTML"|HTML/i { $return = "HTML" } +MESSAGE: /^"MESSAGE"|^MESSAGE/i { $return = "MESSAGE"} +RFC822: /^"RFC822"|^RFC822/i { $return = "RFC822" } +NIL: /^NIL/i { $return = "NIL" } +RFCNONCOMPLY: /^\(\)/i { $return = "NIL" } +NUMBER: /^(\d+)/ { $return = $item[1] } + +# Strings: + +SINGLE_QUOTED_STRING: "'" /(?:\\'|[^'])*/ "'" { $return = $item{__PATTERN1__} } +DOUBLE_QUOTED_STRING: '"' /(?:\\"|[^"])*/ '"' { $return = $item{__PATTERN1__} } + +BARESTRING: ...!/^[)('"]/ /^(?!\(|\))(?:\\ |\S)+/ + { $return = $item{__PATTERN1__} } + +STRING: DOUBLE_QUOTED_STRING | SINGLE_QUOTED_STRING | BARESTRING + +STRINGS: "(" STRING(s) ")" { $return = $item{'STRING(s)'} } + +textlines: NIL | NUMBER + +rfc822message: MESSAGE RFC822 { $return = "MESSAGE RFC822" } + +bodysubtype: PLAIN | HTML | NIL | STRING + +key: STRING +value: NIL | NUMBER | STRING | KVPAIRS + +kvpair: ...!")" key value + { $return = { $item{key} => $item{value} } } + +KVPAIRS: "(" kvpair(s) ")" + { $return = { map { (%$_) } @{$item{'kvpair(s)'}} } } + +bodytype: STRING +bodyparms: NIL | KVPAIRS +bodydisp: NIL | KVPAIRS +bodyid: ...!/[()]/ NIL | STRING +bodydesc: ...!/[()]/ NIL | STRING +bodysize: ...!/[()]/ NIL | NUMBER +bodyenc: NIL | STRING | KVPAIRS +bodyMD5: NIL | STRING +bodylang: NIL | STRING | STRINGS +bodyextra: NIL | STRING | STRINGS +bodyloc: NIL | STRING + +personalname: NIL | STRING +sourceroute: NIL | STRING +mailboxname: NIL | STRING +hostname: NIL | STRING + +addressstruct: "(" personalname sourceroute mailboxname hostname ")" + { bless { personalname => $item{personalname} + , sourceroute => $item{sourceroute} + , mailboxname => $item{mailboxname} + , hostname => $item{hostname} + }, 'Mail::IMAPClient::BodyStructure::Address'; + } + +subject: NIL | STRING +inreplyto: NIL | STRING +messageid: NIL | STRING +date: NIL | STRING + +ADDRESSES: NIL | RFCNONCOMPLY + | "(" addressstruct(s) ")" { $return = $item{'addressstruct(s)'} } + +cc: ADDRESSES +bcc: ADDRESSES +from: ADDRESSES +replyto: ADDRESSES +sender: ADDRESSES +to: ADDRESSES + +envelopestruct: "(" date subject from sender replyto to cc + bcc inreplyto messageid ")" + { $return = bless {}, "Mail::IMAPClient::BodyStructure::Envelope"; + $return->{$_} = $item{$_} + for qw/date subject from sender replyto to cc/ + , qw/bcc inreplyto messageid/; + 1; + } + +basicfields: bodysubtype bodyparms(?) bodyid(?) + bodydesc(?) bodyenc(?) bodysize(?) + { $return = { bodysubtype => $item{bodysubtype} }; + take_optional_items($return, \%item, + qw/bodyparms bodyid bodydesc bodyenc bodysize/); + 1; + } + +textmessage: TEXT basicfields textlines(?) bodyMD5(?) + bodydisp(?) bodylang(?) bodyextra(?) + { + $return = $item{basicfields} || {}; + $return->{bodytype} = 'TEXT'; + take_optional_items($return, \%item + , qw/textlines bodyMD5 bodydisp bodylang bodyextra/); + 1; + } + +othertypemessage: bodytype basicfields bodyMD5(?) bodydisp(?) + bodylang(?) bodyextra(?) + { $return = { bodytype => $item{bodytype} }; + take_optional_items($return, \%item + , qw/bodyMD5 bodydisp bodylang bodyextra/ ); + merge_hash($return, $item{basicfields}); + 1; + } + +nestedmessage: rfc822message bodyparms bodyid bodydesc bodyenc +# bodysize envelopestruct bodystructure textlines + bodysize envelopestruct(?) bodystructure(?) textlines(?) + bodyMD5(?) bodydisp(?) bodylang(?) bodyextra(?) + { + $return = {}; + $return->{$_} = $item{$_} + for qw/bodyparms bodyid bodydesc bodyenc bodysize/; +# envelopestruct bodystructure textlines/; + + take_optional_items($return, \%item + , qw/envelopestruct bodystructure textlines/ + , qw/bodyMD5 bodydisp bodylang bodyextra/); + + merge_hash($return, $item{bodystructure}[0]); + merge_hash($return, $item{basicfields}); + $return->{bodytype} = "MESSAGE" ; + $return->{bodysubtype} = "RFC822" ; + 1; + } + +multipart: subpart(s) bodysubtype + bodyparms(?) bodydisp(?) bodylang(?) bodyloc(?) bodyextra(?) + + { $return = + { bodysubtype => $item{bodysubtype} + , bodytype => 'MULTIPART' + , bodystructure => $item{'subpart(s)'} + }; + take_optional_items($return, \%item + , qw/bodyparms bodydisp bodylang bodyloc bodyextra/); + 1; + } + +subpart: "(" part ")" {$return = $item{part}} + +part: multipart { $return = bless $item{multipart}, $mibs } + | textmessage { $return = bless $item{textmessage}, $mibs } + | nestedmessage { $return = bless $item{nestedmessage}, $mibs } + | othertypemessage { $return = bless $item{othertypemessage}, $mibs } + +bodystructure: "(" part(s) ")" + { $return = $item{'part(s)'} } + +start: /.*?\(.*?BODYSTRUCTURE \(/i part(1) /\).*\)\r?\n?/ + { $return = $item{'part(1)'}[0] } + +envelope: /.*?\(.*?ENVELOPE/ envelopestruct /.*\)/ + { $return = $item{envelopestruct} } diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pm b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pm new file mode 100644 index 0000000..7d6fded --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pm @@ -0,0 +1,16801 @@ +package Mail::IMAPClient::BodyStructure::Parse; +use Parse::RecDescent; + +{ my $ERRORS; + + +package Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse; +use strict; +use vars qw($skip $AUTOLOAD ); +@Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ISA = (); +$skip = '\s*'; + + my $mibs = "Mail::IMAPClient::BodyStructure"; + my $subpartCount = 0; + my $partCount = 0; + + sub take_optional_items($$@) + { my ($r, $items) = (shift, shift); + foreach (@_) + { my $opt = $_ .'(?)'; + exists $items->{$opt} or next; + $r->{$_} = UNIVERSAL::isa($items->{$opt}, 'ARRAY') + ? $items->{$opt}[0] : $items->{$opt}; + } + } + + sub merge_hash($$) + { my $to = shift; + my $from = shift or return; + while( my($k,$v) = each %$from) { $to->{$k} = $v } + } +; + + +{ +local $SIG{__WARN__} = sub {0}; +# PRETEND TO BE IN Parse::RecDescent NAMESPACE +*Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::AUTOLOAD = sub +{ + no strict 'refs'; + $AUTOLOAD =~ s/^Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse/Parse::RecDescent/; + goto &{$AUTOLOAD}; +} +} + +push @Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ISA, 'Parse::RecDescent'; +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyparms +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyparms"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyparms]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or KVPAIRS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyparms}); + %item = (__RULE__ => q{bodyparms}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyparms}); + %item = (__RULE__ => q{bodyparms}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::KVPAIRS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [KVPAIRS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{KVPAIRS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [KVPAIRS]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyparms}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyparms}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyparms}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::date +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"date"}; + + Parse::RecDescent::_trace(q{Trying rule: [date]}, + Parse::RecDescent::_tracefirst($_[1]), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{date}); + %item = (__RULE__ => q{date}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{date}); + %item = (__RULE__ => q{date}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{date}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{date}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{date}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{date}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysubtype +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodysubtype"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodysubtype]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{PLAIN, or HTML, or NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [PLAIN]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysubtype}); + %item = (__RULE__ => q{bodysubtype}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [PLAIN]}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::PLAIN($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [PLAIN]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{PLAIN}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [PLAIN]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [HTML]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysubtype}); + %item = (__RULE__ => q{bodysubtype}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [HTML]}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::HTML($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [HTML]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{HTML}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [HTML]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysubtype}); + %item = (__RULE__ => q{bodysubtype}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[3]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysubtype}); + %item = (__RULE__ => q{bodysubtype}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodysubtype}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodysubtype}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodysubtype}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::hostname +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"hostname"}; + + Parse::RecDescent::_trace(q{Trying rule: [hostname]}, + Parse::RecDescent::_tracefirst($_[1]), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{hostname}); + %item = (__RULE__ => q{hostname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{hostname}); + %item = (__RULE__ => q{hostname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{hostname}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{hostname}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{hostname}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::basicfields +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"basicfields"}; + + Parse::RecDescent::_trace(q{Trying rule: [basicfields]}, + Parse::RecDescent::_tracefirst($_[1]), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{bodysubtype}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [bodysubtype bodyparms bodyid bodydesc bodyenc bodysize]}, + Parse::RecDescent::_tracefirst($_[1]), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{basicfields}); + %item = (__RULE__ => q{basicfields}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [bodysubtype]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysubtype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodysubtype]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodysubtype}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyparms]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyparms})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyparms, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyparms]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyparms(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyid]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyid})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyid, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyid]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyid(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodydesc]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodydesc})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydesc, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodydesc]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydesc(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyenc]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyenc})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyenc, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyenc]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyenc(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodysize]}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodysize})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysize, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodysize]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodysize(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = { bodysubtype => $item{bodysubtype} }; + take_optional_items($return, \%item, + qw/bodyparms bodyid bodydesc bodyenc bodysize/); + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [bodysubtype bodyparms bodyid bodydesc bodyenc bodysize]<<}, + Parse::RecDescent::_tracefirst($text), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{basicfields}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{basicfields}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{basicfields}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::personalname +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"personalname"}; + + Parse::RecDescent::_trace(q{Trying rule: [personalname]}, + Parse::RecDescent::_tracefirst($_[1]), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{personalname}); + %item = (__RULE__ => q{personalname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{personalname}); + %item = (__RULE__ => q{personalname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{personalname}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{personalname}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{personalname}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::key +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"key"}; + + Parse::RecDescent::_trace(q{Trying rule: [key]}, + Parse::RecDescent::_tracefirst($_[1]), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{key}); + %item = (__RULE__ => q{key}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{key}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{key}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{key}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{key}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::cc +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"cc"}; + + Parse::RecDescent::_trace(q{Trying rule: [cc]}, + Parse::RecDescent::_tracefirst($_[1]), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{cc}); + %item = (__RULE__ => q{cc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{cc}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{cc}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{cc}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyMD5 +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyMD5"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyMD5]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyMD5}); + %item = (__RULE__ => q{bodyMD5}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyMD5}); + %item = (__RULE__ => q{bodyMD5}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyMD5}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyMD5}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyMD5}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::envelope +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"envelope"}; + + Parse::RecDescent::_trace(q{Trying rule: [envelope]}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/.*?\\(.*?ENVELOPE/}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/.*?\\(.*?ENVELOPE/ envelopestruct /.*\\)/]}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{envelope}); + %item = (__RULE__ => q{envelope}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/.*?\\(.*?ENVELOPE/]}, Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*?\(.*?ENVELOPE)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying subrule: [envelopestruct]}, + Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{envelopestruct})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::envelopestruct($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [envelopestruct]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{envelopestruct}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying terminal: [/.*\\)/]}, Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{/.*\\)/})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*\))/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN2__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{envelopestruct} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/.*?\\(.*?ENVELOPE/ envelopestruct /.*\\)/]<<}, + Parse::RecDescent::_tracefirst($text), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{envelope}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{envelope}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{envelope}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::MESSAGE +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"MESSAGE"}; + + Parse::RecDescent::_trace(q{Trying rule: [MESSAGE]}, + Parse::RecDescent::_tracefirst($_[1]), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^"MESSAGE"|^MESSAGE/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^"MESSAGE"|^MESSAGE/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{MESSAGE}); + %item = (__RULE__ => q{MESSAGE}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^"MESSAGE"|^MESSAGE/i]}, Parse::RecDescent::_tracefirst($text), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^"MESSAGE"|^MESSAGE)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "MESSAGE"}; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^"MESSAGE"|^MESSAGE/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{MESSAGE}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{MESSAGE}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{MESSAGE}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::DOUBLE_QUOTED_STRING +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"DOUBLE_QUOTED_STRING"}; + + Parse::RecDescent::_trace(q{Trying rule: [DOUBLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'"'}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['"' /(?:\\\\"|[^"])*/ '"']}, + Parse::RecDescent::_tracefirst($_[1]), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{DOUBLE_QUOTED_STRING}); + %item = (__RULE__ => q{DOUBLE_QUOTED_STRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['"']}, + Parse::RecDescent::_tracefirst($text), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\"/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(qq{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying terminal: [/(?:\\\\"|[^"])*/]}, Parse::RecDescent::_tracefirst($text), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{/(?:\\\\"|[^"])*/})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:\\"|[^"])*)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying terminal: ['"']}, + Parse::RecDescent::_tracefirst($text), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{'"'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\"/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(qq{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['"' /(?:\\\\"|[^"])*/ '"']<<}, + Parse::RecDescent::_tracefirst($text), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{DOUBLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{DOUBLE_QUOTED_STRING}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{DOUBLE_QUOTED_STRING}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::subject +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"subject"}; + + Parse::RecDescent::_trace(q{Trying rule: [subject]}, + Parse::RecDescent::_tracefirst($_[1]), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{subject}); + %item = (__RULE__ => q{subject}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{subject}); + %item = (__RULE__ => q{subject}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{subject}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{subject}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{subject}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::value +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"value"}; + + Parse::RecDescent::_trace(q{Trying rule: [value]}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or NUMBER, or STRING, or KVPAIRS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{value}); + %item = (__RULE__ => q{value}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{value}); + %item = (__RULE__ => q{value}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NUMBER}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{value}); + %item = (__RULE__ => q{value}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[3]; + $text = $_[1]; + my $_savetext; + @item = (q{value}); + %item = (__RULE__ => q{value}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::KVPAIRS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [KVPAIRS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{KVPAIRS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [KVPAIRS]<<}, + Parse::RecDescent::_tracefirst($text), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{value}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{value}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{value}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{value}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::inreplyto +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"inreplyto"}; + + Parse::RecDescent::_trace(q{Trying rule: [inreplyto]}, + Parse::RecDescent::_tracefirst($_[1]), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{inreplyto}); + %item = (__RULE__ => q{inreplyto}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{inreplyto}); + %item = (__RULE__ => q{inreplyto}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{inreplyto}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{inreplyto}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{inreplyto}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::messageid +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"messageid"}; + + Parse::RecDescent::_trace(q{Trying rule: [messageid]}, + Parse::RecDescent::_tracefirst($_[1]), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{messageid}); + %item = (__RULE__ => q{messageid}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{messageid}); + %item = (__RULE__ => q{messageid}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{messageid}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{messageid}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{messageid}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::sender +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"sender"}; + + Parse::RecDescent::_trace(q{Trying rule: [sender]}, + Parse::RecDescent::_tracefirst($_[1]), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{sender}); + %item = (__RULE__ => q{sender}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{sender}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{sender}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{sender}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::multipart +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"multipart"}; + + Parse::RecDescent::_trace(q{Trying rule: [multipart]}, + Parse::RecDescent::_tracefirst($_[1]), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{subpart}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [subpart bodysubtype bodyparms bodydisp bodylang bodyloc bodyextra ]}, + Parse::RecDescent::_tracefirst($_[1]), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{multipart}); + %item = (__RULE__ => q{multipart}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [subpart]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::subpart, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [subpart]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{subpart(s)}} = $_tok; + push @item, $_tok; + + + + + + Parse::RecDescent::_trace(q{Trying directive: []}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $_tok = do { $commit = 1 }; + if (defined($_tok)) + { + Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + else + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + + last unless defined $_tok; + push @item, $item{__DIRECTIVE1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [bodysubtype]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodysubtype})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysubtype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodysubtype]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodysubtype}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyparms]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyparms})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyparms, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyparms]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyparms(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodydisp]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodydisp})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydisp, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodydisp]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydisp(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodylang]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodylang})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodylang, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodylang]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodylang(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyloc]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyloc})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyloc, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyloc]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyloc(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyextra]}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyextra})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyextra, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyextra]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyextra(?)}} = $_tok; + push @item, $_tok; + + + + + + Parse::RecDescent::_trace(q{Trying directive: []}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $_tok = do { push @{$thisparser->{deferred}}, sub { $subpartCount = 0 }; }; + if (defined($_tok)) + { + Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + else + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + + last unless defined $_tok; + push @item, $item{__DIRECTIVE2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = + { bodysubtype => $item{bodysubtype} + , bodytype => 'MULTIPART' + , bodystructure => $item{'subpart(s)'} + }; + take_optional_items($return, \%item + , qw/bodyparms bodydisp bodylang bodyloc bodyextra/); + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [subpart bodysubtype bodyparms bodydisp bodylang bodyloc bodyextra ]<<}, + Parse::RecDescent::_tracefirst($text), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{multipart}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{multipart}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{multipart}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyenc +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyenc"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyenc]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING, or KVPAIRS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyenc}); + %item = (__RULE__ => q{bodyenc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyenc}); + %item = (__RULE__ => q{bodyenc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyenc}); + %item = (__RULE__ => q{bodyenc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::KVPAIRS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [KVPAIRS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{KVPAIRS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [KVPAIRS]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyenc}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyenc}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyenc}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydesc +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodydesc"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodydesc]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/[()]/, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/[()]/ NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodydesc}); + %item = (__RULE__ => q{bodydesc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/[()]/]}, Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + $_savetext = $text; + + if ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[()])/) + { + $text = $_savetext; + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + $text = $_savetext; + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{NIL})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [/[()]/ NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodydesc}); + %item = (__RULE__ => q{bodydesc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodydesc}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodydesc}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodydesc}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::start +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"start"}; + + Parse::RecDescent::_trace(q{Trying rule: [start]}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/.*?\\(.*?BODYSTRUCTURE \\(/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/.*?\\(.*?BODYSTRUCTURE \\(/i part /\\).*\\)\\r?\\n?/]}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{start}); + %item = (__RULE__ => q{start}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/.*?\\(.*?BODYSTRUCTURE \\(/i]}, Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*?\(.*?BODYSTRUCTURE \()/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [part]}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{part})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::part, 1, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [part]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{part(1)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [/\\).*\\)\\r?\\n?/]}, Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{/\\).*\\)\\r?\\n?/})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\).*\)\r?\n?)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN2__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{'part(1)'}[0] }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/.*?\\(.*?BODYSTRUCTURE \\(/i part /\\).*\\)\\r?\\n?/]<<}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{start}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{start}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::RFC822 +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"RFC822"}; + + Parse::RecDescent::_trace(q{Trying rule: [RFC822]}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^"RFC822"|^RFC822/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^"RFC822"|^RFC822/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{RFC822}); + %item = (__RULE__ => q{RFC822}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^"RFC822"|^RFC822/i]}, Parse::RecDescent::_tracefirst($text), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^"RFC822"|^RFC822)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "RFC822" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^"RFC822"|^RFC822/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{RFC822}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{RFC822}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{RFC822}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::RFCNONCOMPLY +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"RFCNONCOMPLY"}; + + Parse::RecDescent::_trace(q{Trying rule: [RFCNONCOMPLY]}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^\\(\\)/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^\\(\\)/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{RFCNONCOMPLY}); + %item = (__RULE__ => q{RFCNONCOMPLY}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^\\(\\)/i]}, Parse::RecDescent::_tracefirst($text), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\(\))/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "NIL" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^\\(\\)/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{RFCNONCOMPLY}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{RFCNONCOMPLY}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{RFCNONCOMPLY}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::textmessage +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"textmessage"}; + + Parse::RecDescent::_trace(q{Trying rule: [textmessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{TEXT}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [TEXT basicfields textlines bodyMD5 bodydisp bodylang bodyextra]}, + Parse::RecDescent::_tracefirst($_[1]), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{textmessage}); + %item = (__RULE__ => q{textmessage}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [TEXT]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::TEXT($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [TEXT]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{TEXT}} = $_tok; + push @item, $_tok; + + } + + + + Parse::RecDescent::_trace(q{Trying directive: []}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $_tok = do { $commit = 1 }; + if (defined($_tok)) + { + Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + else + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + + last unless defined $_tok; + push @item, $item{__DIRECTIVE1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [basicfields]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{basicfields})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::basicfields($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [basicfields]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{basicfields}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying repeated subrule: [textlines]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{textlines})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::textlines, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [textlines]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{textlines(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyMD5]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyMD5})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyMD5, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyMD5]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyMD5(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodydisp]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodydisp})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydisp, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodydisp]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydisp(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodylang]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodylang})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodylang, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodylang]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodylang(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyextra]}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyextra})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyextra, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyextra]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyextra(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { + $return = $item{basicfields} || {}; + $return->{bodytype} = 'TEXT'; + take_optional_items($return, \%item + , qw/textlines bodyMD5 bodydisp bodylang bodyextra/); + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [TEXT basicfields textlines bodyMD5 bodydisp bodylang bodyextra]<<}, + Parse::RecDescent::_tracefirst($text), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{textmessage}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{textmessage}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{textmessage}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyid +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyid"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyid]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/[()]/, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/[()]/ NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyid}); + %item = (__RULE__ => q{bodyid}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/[()]/]}, Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + $_savetext = $text; + + if ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[()])/) + { + $text = $_savetext; + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + $text = $_savetext; + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{NIL})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [/[()]/ NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyid}); + %item = (__RULE__ => q{bodyid}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyid}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyid}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyid}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyextra +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyextra"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyextra]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING, or STRINGS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyextra}); + %item = (__RULE__ => q{bodyextra}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyextra}); + %item = (__RULE__ => q{bodyextra}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRINGS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyextra}); + %item = (__RULE__ => q{bodyextra}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRINGS]}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRINGS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRINGS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRINGS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRINGS]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyextra}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyextra}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyextra}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::othertypemessage +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"othertypemessage"}; + + Parse::RecDescent::_trace(q{Trying rule: [othertypemessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{bodytype}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [bodytype basicfields bodyMD5 bodydisp bodylang bodyextra]}, + Parse::RecDescent::_tracefirst($_[1]), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{othertypemessage}); + %item = (__RULE__ => q{othertypemessage}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [bodytype]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodytype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodytype]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodytype}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [basicfields]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{basicfields})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::basicfields($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [basicfields]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{basicfields}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyMD5]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyMD5})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyMD5, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyMD5]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyMD5(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodydisp]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodydisp})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydisp, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodydisp]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydisp(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodylang]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodylang})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodylang, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodylang]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodylang(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyextra]}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyextra})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyextra, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyextra]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyextra(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = { bodytype => $item{bodytype} }; + take_optional_items($return, \%item + , qw/bodyMD5 bodydisp bodylang bodyextra/ ); + merge_hash($return, $item{basicfields}); + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [bodytype basicfields bodyMD5 bodydisp bodylang bodyextra]<<}, + Parse::RecDescent::_tracefirst($text), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{othertypemessage}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{othertypemessage}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{othertypemessage}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::kvpair +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"kvpair"}; + + Parse::RecDescent::_trace(q{Trying rule: [kvpair]}, + Parse::RecDescent::_tracefirst($_[1]), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{')'}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [')' key value]}, + Parse::RecDescent::_tracefirst($_[1]), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{kvpair}); + %item = (__RULE__ => q{kvpair}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + $_savetext = $text; + + if ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + $text = $_savetext; + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + $text = $_savetext; + + Parse::RecDescent::_trace(q{Trying subrule: [key]}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{key})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::key($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [key]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{key}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [value]}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{value})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::value($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [value]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{value}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = { $item{key} => $item{value} } }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [')' key value]<<}, + Parse::RecDescent::_tracefirst($text), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{kvpair}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{kvpair}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{kvpair}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysize +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodysize"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodysize]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/[()]/, or NUMBER}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/[()]/ NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysize}); + %item = (__RULE__ => q{bodysize}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/[()]/]}, Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + $_savetext = $text; + + if ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[()])/) + { + $text = $_savetext; + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + $text = $_savetext; + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{NIL})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [/[()]/ NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodysize}); + %item = (__RULE__ => q{bodysize}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NUMBER}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodysize}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodysize}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodysize}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"STRING"}; + + Parse::RecDescent::_trace(q{Trying rule: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{DOUBLE_QUOTED_STRING, or SINGLE_QUOTED_STRING, or BARESTRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [DOUBLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{STRING}); + %item = (__RULE__ => q{STRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [DOUBLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::DOUBLE_QUOTED_STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [DOUBLE_QUOTED_STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{DOUBLE_QUOTED_STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [DOUBLE_QUOTED_STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [SINGLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{STRING}); + %item = (__RULE__ => q{STRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [SINGLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::SINGLE_QUOTED_STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [SINGLE_QUOTED_STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{SINGLE_QUOTED_STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [SINGLE_QUOTED_STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [BARESTRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{STRING}); + %item = (__RULE__ => q{STRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [BARESTRING]}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::BARESTRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [BARESTRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{BARESTRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [BARESTRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{STRING}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{STRING}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{STRING}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodytype +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodytype"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodytype]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodytype}); + %item = (__RULE__ => q{bodytype}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodytype}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodytype}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodytype}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::TEXT +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"TEXT"}; + + Parse::RecDescent::_trace(q{Trying rule: [TEXT]}, + Parse::RecDescent::_tracefirst($_[1]), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^"TEXT"|^TEXT/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^"TEXT"|^TEXT/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{TEXT}); + %item = (__RULE__ => q{TEXT}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^"TEXT"|^TEXT/i]}, Parse::RecDescent::_tracefirst($text), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^"TEXT"|^TEXT)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "TEXT" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^"TEXT"|^TEXT/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{TEXT}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{TEXT}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{TEXT}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::to +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"to"}; + + Parse::RecDescent::_trace(q{Trying rule: [to]}, + Parse::RecDescent::_tracefirst($_[1]), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{to}); + %item = (__RULE__ => q{to}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{to}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{to}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{to}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{to}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"NIL"}; + + Parse::RecDescent::_trace(q{Trying rule: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^NIL/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^NIL/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{NIL}); + %item = (__RULE__ => q{NIL}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^NIL/i]}, Parse::RecDescent::_tracefirst($text), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^NIL)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "NIL" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^NIL/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{NIL}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{NIL}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{NIL}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::KVPAIRS +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"KVPAIRS"}; + + Parse::RecDescent::_trace(q{Trying rule: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' kvpair ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{KVPAIRS}); + %item = (__RULE__ => q{KVPAIRS}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [kvpair]}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{kvpair})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::kvpair, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [kvpair]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{kvpair(s)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = { map { (%$_) } @{$item{'kvpair(s)'}} } }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' kvpair ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{KVPAIRS}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{KVPAIRS}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{KVPAIRS}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::from +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"from"}; + + Parse::RecDescent::_trace(q{Trying rule: [from]}, + Parse::RecDescent::_tracefirst($_[1]), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{from}); + %item = (__RULE__ => q{from}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{from}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{from}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{from}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{from}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodystructure +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodystructure"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodystructure]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' part ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodystructure}); + %item = (__RULE__ => q{bodystructure}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [part]}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{part})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::part, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [part]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{part(s)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{'part(s)'} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' part ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodystructure}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodystructure}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodystructure}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::PLAIN +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"PLAIN"}; + + Parse::RecDescent::_trace(q{Trying rule: [PLAIN]}, + Parse::RecDescent::_tracefirst($_[1]), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^"PLAIN"|^PLAIN/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^"PLAIN"|^PLAIN/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{PLAIN}); + %item = (__RULE__ => q{PLAIN}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^"PLAIN"|^PLAIN/i]}, Parse::RecDescent::_tracefirst($text), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^"PLAIN"|^PLAIN)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "PLAIN" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^"PLAIN"|^PLAIN/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{PLAIN}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{PLAIN}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{PLAIN}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NUMBER +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"NUMBER"}; + + Parse::RecDescent::_trace(q{Trying rule: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^(\\d+)/}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^(\\d+)/]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{NUMBER}); + %item = (__RULE__ => q{NUMBER}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^(\\d+)/]}, Parse::RecDescent::_tracefirst($text), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(\d+))/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item[1] }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^(\\d+)/]<<}, + Parse::RecDescent::_tracefirst($text), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{NUMBER}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{NUMBER}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRINGS +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"STRINGS"}; + + Parse::RecDescent::_trace(q{Trying rule: [STRINGS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' STRING ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{STRINGS}); + %item = (__RULE__ => q{STRINGS}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{STRING})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [STRING]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING(s)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{'STRING(s)'} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' STRING ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{STRINGS}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{STRINGS}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{STRINGS}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::HTML +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"HTML"}; + + Parse::RecDescent::_trace(q{Trying rule: [HTML]}, + Parse::RecDescent::_tracefirst($_[1]), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/"HTML"|HTML/i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/"HTML"|HTML/i]}, + Parse::RecDescent::_tracefirst($_[1]), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{HTML}); + %item = (__RULE__ => q{HTML}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/"HTML"|HTML/i]}, Parse::RecDescent::_tracefirst($text), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:"HTML"|HTML)/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "HTML" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/"HTML"|HTML/i]<<}, + Parse::RecDescent::_tracefirst($text), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{HTML}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{HTML}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{HTML}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydisp +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodydisp"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodydisp]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or KVPAIRS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodydisp}); + %item = (__RULE__ => q{bodydisp}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodydisp}); + %item = (__RULE__ => q{bodydisp}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [KVPAIRS]}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::KVPAIRS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [KVPAIRS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{KVPAIRS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [KVPAIRS]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodydisp}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodydisp}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodydisp}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::part +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"part"}; + + Parse::RecDescent::_trace(q{Trying rule: [part]}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{multipart, or textmessage, or nestedmessage, or othertypemessage}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [multipart]}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{part}); + %item = (__RULE__ => q{part}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [multipart]}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::multipart($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [multipart]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{multipart}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = bless $item{multipart}, $mibs }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [multipart]<<}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [textmessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{part}); + %item = (__RULE__ => q{part}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [textmessage]}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::textmessage($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [textmessage]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{textmessage}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = bless $item{textmessage}, $mibs }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [textmessage]<<}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [nestedmessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{part}); + %item = (__RULE__ => q{part}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [nestedmessage]}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::nestedmessage($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [nestedmessage]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{nestedmessage}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = bless $item{nestedmessage}, $mibs }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [nestedmessage]<<}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [othertypemessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[3]; + $text = $_[1]; + my $_savetext; + @item = (q{part}); + %item = (__RULE__ => q{part}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [othertypemessage]}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::othertypemessage($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [othertypemessage]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{othertypemessage}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = bless $item{othertypemessage}, $mibs }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [othertypemessage]<<}, + Parse::RecDescent::_tracefirst($text), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{part}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{part}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{part}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{part}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::nestedmessage +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"nestedmessage"}; + + Parse::RecDescent::_trace(q{Trying rule: [nestedmessage]}, + Parse::RecDescent::_tracefirst($_[1]), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{rfc822message}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [rfc822message bodyparms bodyid bodydesc bodyenc bodysize envelopestruct bodystructure textlines bodyMD5 bodydisp bodylang bodyextra]}, + Parse::RecDescent::_tracefirst($_[1]), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{nestedmessage}); + %item = (__RULE__ => q{nestedmessage}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [rfc822message]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::rfc822message($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [rfc822message]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{rfc822message}} = $_tok; + push @item, $_tok; + + } + + + + Parse::RecDescent::_trace(q{Trying directive: []}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $_tok = do { $commit = 1 }; + if (defined($_tok)) + { + Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + else + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + + last unless defined $_tok; + push @item, $item{__DIRECTIVE1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [bodyparms]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodyparms})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyparms($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodyparms]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyparms}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [bodyid]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodyid})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyid($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodyid]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyid}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [bodydesc]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodydesc})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydesc($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodydesc]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydesc}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [bodyenc]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodyenc})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyenc($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodyenc]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyenc}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [bodysize]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bodysize})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodysize($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bodysize]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodysize}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying repeated subrule: [envelopestruct]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{envelopestruct})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::envelopestruct, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [envelopestruct]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{envelopestruct(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodystructure]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodystructure})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodystructure, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodystructure]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodystructure(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [textlines]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{textlines})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::textlines, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [textlines]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{textlines(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyMD5]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyMD5})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyMD5, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyMD5]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyMD5(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodydisp]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodydisp})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodydisp, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodydisp]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodydisp(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodylang]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodylang})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodylang, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodylang]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodylang(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [bodyextra]}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{bodyextra})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyextra, 0, 1, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [bodyextra]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bodyextra(?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { + $return = {}; + $return->{$_} = $item{$_} + for qw/bodyparms bodyid bodydesc bodyenc bodysize/; +# envelopestruct bodystructure textlines/; + + take_optional_items($return, \%item + , qw/envelopestruct bodystructure textlines/ + , qw/bodyMD5 bodydisp bodylang bodyextra/); + + merge_hash($return, $item{bodystructure}[0]); + merge_hash($return, $item{basicfields}); + $return->{bodytype} = "MESSAGE" ; + $return->{bodysubtype} = "RFC822" ; + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [rfc822message bodyparms bodyid bodydesc bodyenc bodysize envelopestruct bodystructure textlines bodyMD5 bodydisp bodylang bodyextra]<<}, + Parse::RecDescent::_tracefirst($text), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{nestedmessage}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{nestedmessage}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{nestedmessage}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::SINGLE_QUOTED_STRING +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"SINGLE_QUOTED_STRING"}; + + Parse::RecDescent::_trace(q{Trying rule: [SINGLE_QUOTED_STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'''}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [''' /(?:\\\\'|[^'])*/ ''']}, + Parse::RecDescent::_tracefirst($_[1]), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{SINGLE_QUOTED_STRING}); + %item = (__RULE__ => q{SINGLE_QUOTED_STRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [''']}, + Parse::RecDescent::_tracefirst($text), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "'"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying terminal: [/(?:\\\\'|[^'])*/]}, Parse::RecDescent::_tracefirst($text), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{/(?:\\\\'|[^'])*/})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:\\'|[^'])*)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying terminal: [''']}, + Parse::RecDescent::_tracefirst($text), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{'''})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "'"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [''' /(?:\\\\'|[^'])*/ ''']<<}, + Parse::RecDescent::_tracefirst($text), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{SINGLE_QUOTED_STRING}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{SINGLE_QUOTED_STRING}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{SINGLE_QUOTED_STRING}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"ADDRESSES"}; + + Parse::RecDescent::_trace(q{Trying rule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or RFCNONCOMPLY, or '('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{ADDRESSES}); + %item = (__RULE__ => q{ADDRESSES}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [RFCNONCOMPLY]}, + Parse::RecDescent::_tracefirst($_[1]), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{ADDRESSES}); + %item = (__RULE__ => q{ADDRESSES}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [RFCNONCOMPLY]}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::RFCNONCOMPLY($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [RFCNONCOMPLY]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{RFCNONCOMPLY}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [RFCNONCOMPLY]<<}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' addressstruct ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{ADDRESSES}); + %item = (__RULE__ => q{ADDRESSES}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [addressstruct]}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{addressstruct})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::addressstruct, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [addressstruct]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{addressstruct(s)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{'addressstruct(s)'} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' addressstruct ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{ADDRESSES}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{ADDRESSES}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{ADDRESSES}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bcc +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bcc"}; + + Parse::RecDescent::_trace(q{Trying rule: [bcc]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bcc}); + %item = (__RULE__ => q{bcc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bcc}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bcc}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bcc}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::rfc822message +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"rfc822message"}; + + Parse::RecDescent::_trace(q{Trying rule: [rfc822message]}, + Parse::RecDescent::_tracefirst($_[1]), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{MESSAGE}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [MESSAGE RFC822]}, + Parse::RecDescent::_tracefirst($_[1]), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{rfc822message}); + %item = (__RULE__ => q{rfc822message}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [MESSAGE]}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::MESSAGE($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [MESSAGE]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{MESSAGE}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [RFC822]}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{RFC822})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::RFC822($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [RFC822]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{RFC822}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = "MESSAGE RFC822" }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [MESSAGE RFC822]<<}, + Parse::RecDescent::_tracefirst($text), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{rfc822message}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{rfc822message}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{rfc822message}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::addressstruct +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"addressstruct"}; + + Parse::RecDescent::_trace(q{Trying rule: [addressstruct]}, + Parse::RecDescent::_tracefirst($_[1]), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' personalname sourceroute mailboxname hostname ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{addressstruct}); + %item = (__RULE__ => q{addressstruct}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [personalname]}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{personalname})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::personalname($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [personalname]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{personalname}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [sourceroute]}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{sourceroute})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::sourceroute($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [sourceroute]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{sourceroute}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [mailboxname]}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{mailboxname})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::mailboxname($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [mailboxname]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{mailboxname}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [hostname]}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{hostname})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::hostname($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [hostname]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{hostname}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { bless { personalname => $item{personalname} + , sourceroute => $item{sourceroute} + , mailboxname => $item{mailboxname} + , hostname => $item{hostname} + }, 'Mail::IMAPClient::BodyStructure::Address'; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' personalname sourceroute mailboxname hostname ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{addressstruct}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{addressstruct}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{addressstruct}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::sourceroute +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"sourceroute"}; + + Parse::RecDescent::_trace(q{Trying rule: [sourceroute]}, + Parse::RecDescent::_tracefirst($_[1]), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{sourceroute}); + %item = (__RULE__ => q{sourceroute}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{sourceroute}); + %item = (__RULE__ => q{sourceroute}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{sourceroute}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{sourceroute}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{sourceroute}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::subpart +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"subpart"}; + + Parse::RecDescent::_trace(q{Trying rule: [subpart]}, + Parse::RecDescent::_tracefirst($_[1]), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' part ')' ]}, + Parse::RecDescent::_tracefirst($_[1]), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{subpart}); + %item = (__RULE__ => q{subpart}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [part]}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{part})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::part($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [part]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{part}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do {$return = $item{part}}; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + + Parse::RecDescent::_trace(q{Trying directive: []}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $_tok = do { push @{$thisparser->{deferred}}, sub { ++$subpartCount; }; }; + if (defined($_tok)) + { + Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + else + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + } + + last unless defined $_tok; + push @item, $item{__DIRECTIVE1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' part ')' ]<<}, + Parse::RecDescent::_tracefirst($text), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{subpart}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{subpart}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{subpart}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::textlines +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"textlines"}; + + Parse::RecDescent::_trace(q{Trying rule: [textlines]}, + Parse::RecDescent::_tracefirst($_[1]), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or NUMBER}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{textlines}); + %item = (__RULE__ => q{textlines}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{textlines}); + %item = (__RULE__ => q{textlines}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NUMBER}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<}, + Parse::RecDescent::_tracefirst($text), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{textlines}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{textlines}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{textlines}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::BARESTRING +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"BARESTRING"}; + + Parse::RecDescent::_trace(q{Trying rule: [BARESTRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^[)('"]/}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^[)('"]/ /^(?!\\(|\\))(?:\\\\ |\\S)+/]}, + Parse::RecDescent::_tracefirst($_[1]), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{BARESTRING}); + %item = (__RULE__ => q{BARESTRING}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^[)('"]/]}, Parse::RecDescent::_tracefirst($text), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + $_savetext = $text; + + if ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^[)('"])/) + { + $text = $_savetext; + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + $text = $_savetext; + + Parse::RecDescent::_trace(q{Trying terminal: [/^(?!\\(|\\))(?:\\\\ |\\S)+/]}, Parse::RecDescent::_tracefirst($text), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{/^(?!\\(|\\))(?:\\\\ |\\S)+/})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?!\(|\))(?:\\ |\S)+)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN2__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__} }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^[)('"]/ /^(?!\\(|\\))(?:\\\\ |\\S)+/]<<}, + Parse::RecDescent::_tracefirst($text), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{BARESTRING}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{BARESTRING}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{BARESTRING}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodyloc +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodyloc"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodyloc]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyloc}); + %item = (__RULE__ => q{bodyloc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodyloc}); + %item = (__RULE__ => q{bodyloc}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodyloc}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodyloc}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodyloc}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bodylang +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"bodylang"}; + + Parse::RecDescent::_trace(q{Trying rule: [bodylang]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING, or STRINGS}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{bodylang}); + %item = (__RULE__ => q{bodylang}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{bodylang}); + %item = (__RULE__ => q{bodylang}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRINGS]}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[2]; + $text = $_[1]; + my $_savetext; + @item = (q{bodylang}); + %item = (__RULE__ => q{bodylang}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRINGS]}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRINGS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRINGS]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRINGS}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRINGS]<<}, + Parse::RecDescent::_tracefirst($text), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{bodylang}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{bodylang}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{bodylang}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::envelopestruct +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"envelopestruct"}; + + Parse::RecDescent::_trace(q{Trying rule: [envelopestruct]}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' date subject from sender replyto to cc bcc inreplyto messageid ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{envelopestruct}); + %item = (__RULE__ => q{envelopestruct}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying subrule: [date]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{date})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::date($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [date]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{date}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [subject]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{subject})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::subject($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [subject]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{subject}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [from]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{from})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::from($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [from]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{from}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [sender]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{sender})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::sender($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [sender]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{sender}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [replyto]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{replyto})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::replyto($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [replyto]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{replyto}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [to]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{to})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::to($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [to]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{to}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [cc]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{cc})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::cc($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [cc]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{cc}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [bcc]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{bcc})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::bcc($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [bcc]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{bcc}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [inreplyto]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{inreplyto})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::inreplyto($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [inreplyto]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{inreplyto}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying subrule: [messageid]}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{messageid})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::messageid($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [messageid]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{messageid}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = bless {}, "Mail::IMAPClient::BodyStructure::Envelope"; + $return->{$_} = $item{$_} + for qw/date subject from sender replyto to cc/ + , qw/bcc inreplyto messageid/; + 1; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' date subject from sender replyto to cc bcc inreplyto messageid ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{envelopestruct}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{envelopestruct}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{envelopestruct}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::replyto +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"replyto"}; + + Parse::RecDescent::_trace(q{Trying rule: [replyto]}, + Parse::RecDescent::_tracefirst($_[1]), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{ADDRESSES}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($_[1]), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{replyto}); + %item = (__RULE__ => q{replyto}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [ADDRESSES]}, + Parse::RecDescent::_tracefirst($text), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::ADDRESSES($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [ADDRESSES]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{ADDRESSES}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [ADDRESSES]<<}, + Parse::RecDescent::_tracefirst($text), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{replyto}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{replyto}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{replyto}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::mailboxname +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"mailboxname"}; + + Parse::RecDescent::_trace(q{Trying rule: [mailboxname]}, + Parse::RecDescent::_tracefirst($_[1]), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + + my $def_at = @{$thisparser->{deferred}}; + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NIL, or STRING}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NIL]}, + Parse::RecDescent::_tracefirst($_[1]), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{mailboxname}); + %item = (__RULE__ => q{mailboxname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NIL]}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::NIL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NIL]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NIL}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [NIL]<<}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [STRING]}, + Parse::RecDescent::_tracefirst($_[1]), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{mailboxname}); + %item = (__RULE__ => q{mailboxname}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [STRING]}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse::STRING($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [STRING]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{STRING}} = $_tok; + push @item, $_tok; + + } + + + Parse::RecDescent::_trace(q{>>Matched production: [STRING]<<}, + Parse::RecDescent::_tracefirst($text), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + splice + @{$thisparser->{deferred}}, $def_at unless $_matched; + + unless ( $_matched || defined($score) ) + { + splice @{$thisparser->{deferred}}, $def_at; + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{mailboxname}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{mailboxname}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{mailboxname}, + $tracelevel) + } + $_[1] = $text; + return $return; +} +} +package Mail::IMAPClient::BodyStructure::Parse; sub new { my $self = bless( { + '_precompiled' => 1, + 'localvars' => '', + 'startcode' => '', + 'namespace' => 'Parse::RecDescent::Mail::IMAPClient::BodyStructure::Parse', + 'deferrable' => 1, + 'rules' => { + 'bodyparms' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'KVPAIRS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 66 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'KVPAIRS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 66 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 66 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyparms', + 'vars' => '', + 'line' => 66 + }, 'Parse::RecDescent::Rule' ), + 'date' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 93 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 93 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 93 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'date', + 'vars' => '', + 'line' => 93 + }, 'Parse::RecDescent::Rule' ), + 'bodysubtype' => bless( { + 'impcount' => 0, + 'calls' => [ + 'PLAIN', + 'HTML', + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'PLAIN', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 54 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'HTML', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 54 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 54 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 54 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 54 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '3', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 54 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 54 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodysubtype', + 'vars' => '', + 'line' => 54 + }, 'Parse::RecDescent::Rule' ), + 'hostname' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 80 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 80 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 80 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'hostname', + 'vars' => '', + 'line' => 80 + }, 'Parse::RecDescent::Rule' ), + 'basicfields' => bless( { + 'impcount' => 0, + 'calls' => [ + 'bodysubtype', + 'bodyparms', + 'bodyid', + 'bodydesc', + 'bodyenc', + 'bodysize' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'bodysubtype', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 114 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodyparms', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 114 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyid', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 114 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodydesc', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 115 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyenc', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 115 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodysize', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 115 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 116, + 'code' => '{ $return = { bodysubtype => $item{bodysubtype} }; + take_optional_items($return, \\%item, + qw/bodyparms bodyid bodydesc bodyenc bodysize/); + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'basicfields', + 'vars' => '', + 'line' => 114 + }, 'Parse::RecDescent::Rule' ), + 'personalname' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 77 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 77 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 77 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'personalname', + 'vars' => '', + 'line' => 77 + }, 'Parse::RecDescent::Rule' ), + 'key' => bless( { + 'impcount' => 0, + 'calls' => [ + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 56 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'key', + 'vars' => '', + 'line' => 56 + }, 'Parse::RecDescent::Rule' ), + 'cc' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 98 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'cc', + 'vars' => '', + 'line' => 98 + }, 'Parse::RecDescent::Rule' ), + 'bodyMD5' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 72 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 72 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 72 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyMD5', + 'vars' => '', + 'line' => 72 + }, 'Parse::RecDescent::Rule' ), + 'envelope' => bless( { + 'impcount' => 0, + 'calls' => [ + 'envelopestruct' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 2, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '.*?\\(.*?ENVELOPE', + 'hashname' => '__PATTERN1__', + 'description' => '/.*?\\\\(.*?ENVELOPE/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 188, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'envelopestruct', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 188 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'pattern' => '.*\\)', + 'hashname' => '__PATTERN2__', + 'description' => '/.*\\\\)/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 188, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 189, + 'code' => '{ $return = $item{envelopestruct} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'envelope', + 'vars' => '', + 'line' => 188 + }, 'Parse::RecDescent::Rule' ), + 'MESSAGE' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^"MESSAGE"|^MESSAGE', + 'hashname' => '__PATTERN1__', + 'description' => '/^"MESSAGE"|^MESSAGE/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 32, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 32, + 'code' => '{ $return = "MESSAGE"}' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'MESSAGE', + 'vars' => '', + 'line' => 32 + }, 'Parse::RecDescent::Rule' ), + 'DOUBLE_QUOTED_STRING' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '"', + 'hashname' => '__STRING1__', + 'description' => '\'"\'', + 'lookahead' => 0, + 'line' => 41 + }, 'Parse::RecDescent::Literal' ), + bless( { + 'pattern' => '(?:\\\\"|[^"])*', + 'hashname' => '__PATTERN1__', + 'description' => '/(?:\\\\\\\\"|[^"])*/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 41, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'pattern' => '"', + 'hashname' => '__STRING2__', + 'description' => '\'"\'', + 'lookahead' => 0, + 'line' => 41 + }, 'Parse::RecDescent::Literal' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 41, + 'code' => '{ $return = $item{__PATTERN1__} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'DOUBLE_QUOTED_STRING', + 'vars' => '', + 'line' => 41 + }, 'Parse::RecDescent::Rule' ), + 'subject' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 90 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 90 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 90 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'subject', + 'vars' => '', + 'line' => 90 + }, 'Parse::RecDescent::Rule' ), + 'value' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'NUMBER', + 'STRING', + 'KVPAIRS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 57 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NUMBER', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 57 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 57 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 57 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 57 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '3', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'KVPAIRS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 57 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 57 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'value', + 'vars' => '', + 'line' => 57 + }, 'Parse::RecDescent::Rule' ), + 'inreplyto' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 91 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 91 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 91 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'inreplyto', + 'vars' => '', + 'line' => 91 + }, 'Parse::RecDescent::Rule' ), + 'messageid' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 92 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 92 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 92 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'messageid', + 'vars' => '', + 'line' => 92 + }, 'Parse::RecDescent::Rule' ), + 'sender' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 102 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'sender', + 'vars' => '', + 'line' => 102 + }, 'Parse::RecDescent::Rule' ), + 'multipart' => bless( { + 'impcount' => 0, + 'calls' => [ + 'subpart', + 'bodysubtype', + 'bodyparms', + 'bodydisp', + 'bodylang', + 'bodyloc', + 'bodyextra' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 2, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'subpart', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 162 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__DIRECTIVE1__', + 'name' => '', + 'lookahead' => 0, + 'line' => 162, + 'code' => '$commit = 1' + }, 'Parse::RecDescent::Directive' ), + bless( { + 'subrule' => 'bodysubtype', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 162 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodyparms', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 163 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodydisp', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 163 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodylang', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 163 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyloc', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 163 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyextra', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 163 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__DIRECTIVE2__', + 'name' => '', + 'lookahead' => 0, + 'line' => 164, + 'code' => 'push @{$thisparser->{deferred}}, sub { $subpartCount = 0 };' + }, 'Parse::RecDescent::Directive' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 165, + 'code' => '{ $return = + { bodysubtype => $item{bodysubtype} + , bodytype => \'MULTIPART\' + , bodystructure => $item{\'subpart(s)\'} + }; + take_optional_items($return, \\%item + , qw/bodyparms bodydisp bodylang bodyloc bodyextra/); + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'multipart', + 'vars' => '', + 'line' => 162 + }, 'Parse::RecDescent::Rule' ), + 'bodyenc' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING', + 'KVPAIRS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 71 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 71 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 71 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'KVPAIRS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 71 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 71 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyenc', + 'vars' => '', + 'line' => 71 + }, 'Parse::RecDescent::Rule' ), + 'bodydesc' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 0, + 'items' => [ + bless( { + 'pattern' => '[()]', + 'hashname' => '__PATTERN1__', + 'description' => '/[()]/', + 'lookahead' => -1, + 'rdelim' => '/', + 'line' => 69, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 69 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 69 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 69 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodydesc', + 'vars' => '', + 'line' => 69 + }, 'Parse::RecDescent::Rule' ), + 'start' => bless( { + 'impcount' => 0, + 'calls' => [ + 'part' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 2, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '.*?\\(.*?BODYSTRUCTURE \\(', + 'hashname' => '__PATTERN1__', + 'description' => '/.*?\\\\(.*?BODYSTRUCTURE \\\\(/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 185, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'part', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '1', + 'lookahead' => 0, + 'line' => 185 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => '\\).*\\)\\r?\\n?', + 'hashname' => '__PATTERN2__', + 'description' => '/\\\\).*\\\\)\\\\r?\\\\n?/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 185, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 186, + 'code' => '{ $return = $item{\'part(1)\'}[0] }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'start', + 'vars' => '', + 'line' => 185 + }, 'Parse::RecDescent::Rule' ), + 'RFC822' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^"RFC822"|^RFC822', + 'hashname' => '__PATTERN1__', + 'description' => '/^"RFC822"|^RFC822/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 33, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 33, + 'code' => '{ $return = "RFC822" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'RFC822', + 'vars' => '', + 'line' => 33 + }, 'Parse::RecDescent::Rule' ), + 'RFCNONCOMPLY' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^\\(\\)', + 'hashname' => '__PATTERN1__', + 'description' => '/^\\\\(\\\\)/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 35, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 35, + 'code' => '{ $return = "NIL" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'RFCNONCOMPLY', + 'vars' => '', + 'line' => 35 + }, 'Parse::RecDescent::Rule' ), + 'textmessage' => bless( { + 'impcount' => 0, + 'calls' => [ + 'TEXT', + 'basicfields', + 'textlines', + 'bodyMD5', + 'bodydisp', + 'bodylang', + 'bodyextra' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 1, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'TEXT', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 122 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__DIRECTIVE1__', + 'name' => '', + 'lookahead' => 0, + 'line' => 122, + 'code' => '$commit = 1' + }, 'Parse::RecDescent::Directive' ), + bless( { + 'subrule' => 'basicfields', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 122 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'textlines', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 122 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyMD5', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 122 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodydisp', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 123 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodylang', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 123 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyextra', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 123 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 124, + 'code' => '{ + $return = $item{basicfields} || {}; + $return->{bodytype} = \'TEXT\'; + take_optional_items($return, \\%item + , qw/textlines bodyMD5 bodydisp bodylang bodyextra/); + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'textmessage', + 'vars' => '', + 'line' => 122 + }, 'Parse::RecDescent::Rule' ), + 'bodyid' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 0, + 'items' => [ + bless( { + 'pattern' => '[()]', + 'hashname' => '__PATTERN1__', + 'description' => '/[()]/', + 'lookahead' => -1, + 'rdelim' => '/', + 'line' => 68, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 68 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 68 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 68 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyid', + 'vars' => '', + 'line' => 68 + }, 'Parse::RecDescent::Rule' ), + 'bodyextra' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING', + 'STRINGS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 74 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 74 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 74 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRINGS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 74 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 74 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyextra', + 'vars' => '', + 'line' => 74 + }, 'Parse::RecDescent::Rule' ), + 'othertypemessage' => bless( { + 'impcount' => 0, + 'calls' => [ + 'bodytype', + 'basicfields', + 'bodyMD5', + 'bodydisp', + 'bodylang', + 'bodyextra' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'bodytype', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 132 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'basicfields', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 132 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodyMD5', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 132 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodydisp', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 132 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodylang', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 133 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyextra', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 133 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 134, + 'code' => '{ $return = { bodytype => $item{bodytype} }; + take_optional_items($return, \\%item + , qw/bodyMD5 bodydisp bodylang bodyextra/ ); + merge_hash($return, $item{basicfields}); + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'othertypemessage', + 'vars' => '', + 'line' => 132 + }, 'Parse::RecDescent::Rule' ), + 'kvpair' => bless( { + 'impcount' => 0, + 'calls' => [ + 'key', + 'value' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 1, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => ')', + 'hashname' => '__STRING1__', + 'description' => '\')\'', + 'lookahead' => -1, + 'line' => 59 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'key', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 59 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'value', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 59 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 60, + 'code' => '{ $return = { $item{key} => $item{value} } }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'kvpair', + 'vars' => '', + 'line' => 59 + }, 'Parse::RecDescent::Rule' ), + 'bodysize' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'NUMBER' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 0, + 'items' => [ + bless( { + 'pattern' => '[()]', + 'hashname' => '__PATTERN1__', + 'description' => '/[()]/', + 'lookahead' => -1, + 'rdelim' => '/', + 'line' => 70, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 70 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NUMBER', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 70 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 70 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodysize', + 'vars' => '', + 'line' => 70 + }, 'Parse::RecDescent::Rule' ), + 'STRING' => bless( { + 'impcount' => 0, + 'calls' => [ + 'DOUBLE_QUOTED_STRING', + 'SINGLE_QUOTED_STRING', + 'BARESTRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'DOUBLE_QUOTED_STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 46 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'SINGLE_QUOTED_STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 46 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 46 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'BARESTRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 46 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 46 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'STRING', + 'vars' => '', + 'line' => 46 + }, 'Parse::RecDescent::Rule' ), + 'bodytype' => bless( { + 'impcount' => 0, + 'calls' => [ + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 65 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodytype', + 'vars' => '', + 'line' => 65 + }, 'Parse::RecDescent::Rule' ), + 'TEXT' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^"TEXT"|^TEXT', + 'hashname' => '__PATTERN1__', + 'description' => '/^"TEXT"|^TEXT/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 29, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 29, + 'code' => '{ $return = "TEXT" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'TEXT', + 'vars' => '', + 'line' => 27 + }, 'Parse::RecDescent::Rule' ), + 'to' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 103 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'to', + 'vars' => '', + 'line' => 103 + }, 'Parse::RecDescent::Rule' ), + 'NIL' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^NIL', + 'hashname' => '__PATTERN1__', + 'description' => '/^NIL/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 34, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 34, + 'code' => '{ $return = "NIL" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'NIL', + 'vars' => '', + 'line' => 34 + }, 'Parse::RecDescent::Rule' ), + 'KVPAIRS' => bless( { + 'impcount' => 0, + 'calls' => [ + 'kvpair' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 62 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'kvpair', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 62 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 62 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 63, + 'code' => '{ $return = { map { (%$_) } @{$item{\'kvpair(s)\'}} } }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'KVPAIRS', + 'vars' => '', + 'line' => 62 + }, 'Parse::RecDescent::Rule' ), + 'from' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 100 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'from', + 'vars' => '', + 'line' => 100 + }, 'Parse::RecDescent::Rule' ), + 'bodystructure' => bless( { + 'impcount' => 0, + 'calls' => [ + 'part' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 182 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'part', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 182 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 182 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 183, + 'code' => '{ $return = $item{\'part(s)\'} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodystructure', + 'vars' => '', + 'line' => 182 + }, 'Parse::RecDescent::Rule' ), + 'PLAIN' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^"PLAIN"|^PLAIN', + 'hashname' => '__PATTERN1__', + 'description' => '/^"PLAIN"|^PLAIN/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 30, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 30, + 'code' => '{ $return = "PLAIN" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'PLAIN', + 'vars' => '', + 'line' => 30 + }, 'Parse::RecDescent::Rule' ), + 'NUMBER' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^(\\d+)', + 'hashname' => '__PATTERN1__', + 'description' => '/^(\\\\d+)/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 36, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 36, + 'code' => '{ $return = $item[1] }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'NUMBER', + 'vars' => '', + 'line' => 36 + }, 'Parse::RecDescent::Rule' ), + 'STRINGS' => bless( { + 'impcount' => 0, + 'calls' => [ + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 48 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'STRING', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 48 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 48 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 48, + 'code' => '{ $return = $item{\'STRING(s)\'} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'STRINGS', + 'vars' => '', + 'line' => 48 + }, 'Parse::RecDescent::Rule' ), + 'HTML' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '"HTML"|HTML', + 'hashname' => '__PATTERN1__', + 'description' => '/"HTML"|HTML/i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 31, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 31, + 'code' => '{ $return = "HTML" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'HTML', + 'vars' => '', + 'line' => 31 + }, 'Parse::RecDescent::Rule' ), + 'bodydisp' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'KVPAIRS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 67 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'KVPAIRS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 67 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 67 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodydisp', + 'vars' => '', + 'line' => 67 + }, 'Parse::RecDescent::Rule' ), + 'part' => bless( { + 'impcount' => 0, + 'calls' => [ + 'multipart', + 'textmessage', + 'nestedmessage', + 'othertypemessage' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'multipart', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 177 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 177, + 'code' => '{ $return = bless $item{multipart}, $mibs }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'textmessage', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 178 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 178, + 'code' => '{ $return = bless $item{textmessage}, $mibs }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => 178 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'nestedmessage', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 179 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 179, + 'code' => '{ $return = bless $item{nestedmessage}, $mibs }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => 179 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '3', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'othertypemessage', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 180 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 180, + 'code' => '{ $return = bless $item{othertypemessage}, $mibs }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => 180 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'part', + 'vars' => '', + 'line' => 177 + }, 'Parse::RecDescent::Rule' ), + 'nestedmessage' => bless( { + 'impcount' => 0, + 'calls' => [ + 'rfc822message', + 'bodyparms', + 'bodyid', + 'bodydesc', + 'bodyenc', + 'bodysize', + 'envelopestruct', + 'bodystructure', + 'textlines', + 'bodyMD5', + 'bodydisp', + 'bodylang', + 'bodyextra' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 1, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'rfc822message', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 141 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__DIRECTIVE1__', + 'name' => '', + 'lookahead' => 0, + 'line' => 141, + 'code' => '$commit = 1' + }, 'Parse::RecDescent::Directive' ), + bless( { + 'subrule' => 'bodyparms', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 141 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodyid', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 141 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodydesc', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 141 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodyenc', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 141 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bodysize', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 142 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'envelopestruct', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 143 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodystructure', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 143 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'textlines', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 143 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyMD5', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 144 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodydisp', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 144 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodylang', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 144 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'subrule' => 'bodyextra', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 1, + 'matchrule' => 0, + 'repspec' => '?', + 'lookahead' => 0, + 'line' => 144 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 145, + 'code' => '{ + $return = {}; + $return->{$_} = $item{$_} + for qw/bodyparms bodyid bodydesc bodyenc bodysize/; +# envelopestruct bodystructure textlines/; + + take_optional_items($return, \\%item + , qw/envelopestruct bodystructure textlines/ + , qw/bodyMD5 bodydisp bodylang bodyextra/); + + merge_hash($return, $item{bodystructure}[0]); + merge_hash($return, $item{basicfields}); + $return->{bodytype} = "MESSAGE" ; + $return->{bodysubtype} = "RFC822" ; + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'nestedmessage', + 'vars' => '', + 'line' => 141 + }, 'Parse::RecDescent::Rule' ), + 'SINGLE_QUOTED_STRING' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '\'', + 'hashname' => '__STRING1__', + 'description' => '\'\'\'', + 'lookahead' => 0, + 'line' => 40 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'pattern' => '(?:\\\\\'|[^\'])*', + 'hashname' => '__PATTERN1__', + 'description' => '/(?:\\\\\\\\\'|[^\'])*/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 40, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'pattern' => '\'', + 'hashname' => '__STRING2__', + 'description' => '\'\'\'', + 'lookahead' => 0, + 'line' => 40 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 40, + 'code' => '{ $return = $item{__PATTERN1__} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'SINGLE_QUOTED_STRING', + 'vars' => '', + 'line' => 38 + }, 'Parse::RecDescent::Rule' ), + 'ADDRESSES' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'RFCNONCOMPLY', + 'addressstruct' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 95 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'RFCNONCOMPLY', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 95 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 95 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 96 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'addressstruct', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 96 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 96 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 96, + 'code' => '{ $return = $item{\'addressstruct(s)\'} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => 96 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'ADDRESSES', + 'vars' => '', + 'line' => 95 + }, 'Parse::RecDescent::Rule' ), + 'bcc' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 99 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bcc', + 'vars' => '', + 'line' => 99 + }, 'Parse::RecDescent::Rule' ), + 'rfc822message' => bless( { + 'impcount' => 0, + 'calls' => [ + 'MESSAGE', + 'RFC822' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'MESSAGE', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 52 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'RFC822', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 52 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 52, + 'code' => '{ $return = "MESSAGE RFC822" }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'rfc822message', + 'vars' => '', + 'line' => 52 + }, 'Parse::RecDescent::Rule' ), + 'addressstruct' => bless( { + 'impcount' => 0, + 'calls' => [ + 'personalname', + 'sourceroute', + 'mailboxname', + 'hostname' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'personalname', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'sourceroute', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'mailboxname', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'hostname', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 82 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 83, + 'code' => '{ bless { personalname => $item{personalname} + , sourceroute => $item{sourceroute} + , mailboxname => $item{mailboxname} + , hostname => $item{hostname} + }, \'Mail::IMAPClient::BodyStructure::Address\'; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'addressstruct', + 'vars' => '', + 'line' => 82 + }, 'Parse::RecDescent::Rule' ), + 'sourceroute' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 78 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 78 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 78 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'sourceroute', + 'vars' => '', + 'line' => 78 + }, 'Parse::RecDescent::Rule' ), + 'subpart' => bless( { + 'impcount' => 0, + 'calls' => [ + 'part' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 1, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 175 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'part', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 175 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 175 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 175, + 'code' => '{$return = $item{part}}' + }, 'Parse::RecDescent::Action' ), + bless( { + 'hashname' => '__DIRECTIVE1__', + 'name' => '', + 'lookahead' => 0, + 'line' => 175, + 'code' => 'push @{$thisparser->{deferred}}, sub { ++$subpartCount; };' + }, 'Parse::RecDescent::Directive' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'subpart', + 'vars' => '', + 'line' => 175 + }, 'Parse::RecDescent::Rule' ), + 'textlines' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'NUMBER' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 50 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NUMBER', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 50 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 50 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'textlines', + 'vars' => '', + 'line' => 50 + }, 'Parse::RecDescent::Rule' ), + 'BARESTRING' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 2, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^[)(\'"]', + 'hashname' => '__PATTERN1__', + 'description' => '/^[)(\'"]/', + 'lookahead' => -1, + 'rdelim' => '/', + 'line' => 43, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'pattern' => '^(?!\\(|\\))(?:\\\\ |\\S)+', + 'hashname' => '__PATTERN2__', + 'description' => '/^(?!\\\\(|\\\\))(?:\\\\\\\\ |\\\\S)+/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 43, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 44, + 'code' => '{ $return = $item{__PATTERN1__} }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'BARESTRING', + 'vars' => '', + 'line' => 43 + }, 'Parse::RecDescent::Rule' ), + 'bodyloc' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 75 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 75 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 75 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodyloc', + 'vars' => '', + 'line' => 75 + }, 'Parse::RecDescent::Rule' ), + 'bodylang' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING', + 'STRINGS' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 73 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 73 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 73 + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '2', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRINGS', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 73 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 73 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'bodylang', + 'vars' => '', + 'line' => 73 + }, 'Parse::RecDescent::Rule' ), + 'envelopestruct' => bless( { + 'impcount' => 0, + 'calls' => [ + 'date', + 'subject', + 'from', + 'sender', + 'replyto', + 'to', + 'cc', + 'bcc', + 'inreplyto', + 'messageid' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'date', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'subject', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'from', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'sender', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'replyto', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'to', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'cc', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 105 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'bcc', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 106 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'inreplyto', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 106 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'subrule' => 'messageid', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 106 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 106 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 107, + 'code' => '{ $return = bless {}, "Mail::IMAPClient::BodyStructure::Envelope"; + $return->{$_} = $item{$_} + for qw/date subject from sender replyto to cc/ + , qw/bcc inreplyto messageid/; + 1; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'envelopestruct', + 'vars' => '', + 'line' => 105 + }, 'Parse::RecDescent::Rule' ), + 'replyto' => bless( { + 'impcount' => 0, + 'calls' => [ + 'ADDRESSES' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'ADDRESSES', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 101 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'replyto', + 'vars' => '', + 'line' => 101 + }, 'Parse::RecDescent::Rule' ), + 'mailboxname' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NIL', + 'STRING' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'NIL', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 79 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 0, + 'items' => [ + bless( { + 'subrule' => 'STRING', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 79 + }, 'Parse::RecDescent::Subrule' ) + ], + 'line' => 79 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'mailboxname', + 'vars' => '', + 'line' => 79 + }, 'Parse::RecDescent::Rule' ) + }, + '_AUTOTREE' => undef, + '_check' => { + 'thisoffset' => '', + 'itempos' => '', + 'prevoffset' => '', + 'prevline' => '', + 'prevcolumn' => '', + 'thiscolumn' => '' + }, + '_AUTOACTION' => undef + }, 'Parse::RecDescent' ); +} \ No newline at end of file diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pod b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pod new file mode 100644 index 0000000..418259c --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/BodyStructure/Parse.pod @@ -0,0 +1,15 @@ +=head1 NAME + +Mail::IMAPClient::BodyStructure::Parse - used internally by Mail::IMAPClient::BodyStructure + +=head1 DESCRIPTION + +This module is used internally by L +and is generated using L. It is not meant to be used +directly by other scripts nor is there much point in debugging it. + +=head1 SYNOPSIS + +This module is used internally by L +and is not meant to be used or called directly from applications. So +don't do that. diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/MessageSet.pm b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/MessageSet.pm new file mode 100644 index 0000000..28405ad --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/MessageSet.pm @@ -0,0 +1,280 @@ +use warnings; +use strict; + +package Mail::IMAPClient::MessageSet; + +=head1 NAME + +Mail::IMAPClient::MessageSet - ranges of message sequence nummers + +=cut + +use overload + '""' => "str" + , '.=' => sub {$_[0]->cat($_[1])} + , '+=' => sub {$_[0]->cat($_[1])} + , '-=' => sub {$_[0]->rem($_[1])} + , '@{}' => "unfold" + , fallback => 1; + +sub new +{ my $class = shift; + my $range = $class->range(@_); + bless \$range, $class; +} + +sub str { overload::StrVal( ${$_[0]} ) } + +sub _unfold_range($) +# { my $x = shift; return if $x =~ m/[^0-9,:]$/; $x =~ s/\:/../g; eval $x; } +{ map { /(\d+)\s*\:\s*(\d+)/ ? ($1..$2) : $_ } + split /\,/, shift; +} + +sub rem +{ my $self = shift; + my %delete = map { ($_ => 1) } map { _unfold_range $_ } @_; + $$self = $self->range(grep {not $delete{$_}} $self->unfold); + $self; +} + +sub cat +{ my $self = shift; + $$self = $self->range($$self, @_); + $self; +} + +sub range +{ my $self = shift; + + my @msgs; + foreach my $m (@_) + { defined $m && length $m + or next; + + foreach my $mm (ref $m eq 'ARRAY' ? @$m : $m) + { push @msgs, _unfold_range $mm; + } + } + + @msgs + or return undef; + + @msgs = sort {$a <=> $b} @msgs; + my $low = my $high = shift @msgs; + + my @ranges; + foreach my $m (@msgs) + { next if $m == $high; # double + + if($m == $high + 1) { $high = $m } + else + { push @ranges, $low == $high ? $low : "$low:$high"; + $low = $high = $m; + } + } + + push @ranges, $low == $high ? $low : "$low:$high" ; + join ",", @ranges; +} + +sub unfold +{ my $self = shift; + wantarray ? ( _unfold_range $$self ) : [ _unfold_range $$self ]; +} + +=head1 SYNOPSIS + + my @msgs = $imap->search("SUBJECT","Virus"); # returns 1,3,4,5,6,9,10 + my $msgset = Mail::IMAPClient::MessageSet->new(@msgs); + print $msgset; # prints "1,3:6,9:10" + + # add message 14 to the set: + $msgset += 14; + print $msgset; # prints "1,3:6,9:10,14" + + # add messages 16,17,18,19, and 20 to the set: + $msgset .= "16,17,18:20"; + print $msgset; # prints "1,3:6,9:10,14,16:20" + + # Hey, I didn't really want message 17 in there; let's take it out: + $msgset -= 17; + print $msgset; # prints "1,3:6,9:10,14,16,18:20" + + # Now let's iterate over each message: + for my $msg (@$msgset) + { print "$msg\n"; # Prints: "1\n3\n4\n5\n6..16\n18\n19\n20\n" + } + print join("\n", @$msgset)."\n"; # same simpler + local $" = "\n"; print "@$msgset\n"; # even more simple + +=head1 DESCRIPTION + +The B module is designed to make life easier +for programmers who need to manipulate potentially large sets of IMAP +message UID's or sequence numbers. + +This module presents an object-oriented interface into handling your +message sets. The object reference returned by the L method is an +overloaded reference to a scalar variable that contains the message set's +compact RFC2060 representation. The object is overloaded so that using +it like a string returns this compact message set representation. You +can also add messages to the set (using either a '.=' operator or a '+=' +operator) or remove messages (with the '-=' operator). And if you use +it as an array reference, it will humor you and act like one by calling +L for you. + +RFC2060 specifies that multiple messages can be provided to certain IMAP +commands by separating them with commas. For example, "1,2,3,4,5" would +specify messages 1, 2, 3, 4, and (you guessed it!) 5. However, if you are +performing an operation on lots of messages, this string can get quite long. +So long that it may slow down your transaction, and perhaps even cause the +server to reject it. So RFC2060 also permits you to specifiy a range of +messages, so that messages 1, 2, 3, 4 and 5 can also be specified as +"1:5". + +This is where B comes in. It will convert +your message set into the shortest correct syntax. This could potentially +save you tons of network I/O, as in the case where you want to fetch the +flags for all messages in a 10000 message folder, where the messages +are all numbered sequentially. Delimited as commas, and making the +best-case assumption that the first message is message "1", it would take +48893 bytes to specify the whole message set using the comma-delimited +method. To specify it as a range, it takes just seven bytes (1:10000). + +Note that the L B method can be used as +a short-cut to specifying Cnew(@etc)>.) + +=head1 CLASS METHODS + +The only class method you need to worry about is B. And if you create +your B objects via L's +B method then you don't even need to worry about B. + +=head2 new + +Example: + + my $msgset = Mail::IMAPClient::MessageSet->new(@msgs); + +The B method requires at least one argument. That argument can be +either a message, a comma-separated list of messages, a colon-separated +range of messages, or a combination of comma-separated messages and +colon-separated ranges. It can also be a reference to an array of messages, +comma-separated message lists, and colon separated ranges. + +If more then one argument is supplied to B, then those arguments should +be more message numbers, lists, and ranges (or references to arrays of them) +just as in the first argument. + +The message numbers passed to B can really be any kind of number at +all but to be useful in a L session they should be either +message UID's (if your I parameter is true) or message sequence numbers. + +The B method will return a reference to a B +object. That object, when double quoted, will act just like a string whose +value is the message set expressed in the shortest possible way, with the +message numbers sorted in ascending order and with duplicates removed. + +=head1 OBJECT METHODS + +The only object method currently available to a B +object is the L method. + +=head2 unfold + +Example: + + my $msgset = $imap->Range( $imap->messages ) ; + my @all_messages = $msgset->unfold; + +The B method returns an array of messages that belong to the +message set. If called in a scalar context it returns a reference to the +array instead. + +=head1 OVERRIDDEN OPERATIONS + +B overrides a number of operators in order +to make manipulating your message sets easier. The overridden operations are: + +=head2 stringify + +Attempts to stringify a B object will result in +the compact message specification being returned, which is almost certainly +what you will want. + +=head2 Auto-increment + +Attempts to autoincrement a B object will +result in a message (or messages) being added to the object's message set. + +Example: + + $msgset += 34; + # Message #34 is now in the message set + +=head2 Concatenate + +Attempts to concatenate to a B object will +result in a message (or messages) being added to the object's message set. + +Example: + + $msgset .= "34,35,36,40:45"; + # Messages 34,35,36,40,41,42,43,44,and 45 are now in the message set + +The C<.=> operator and the C<+=> operator can be used interchangeably, but +as you can see by looking at the examples there are times when use of one +has an aesthetic advantage over use of the other. + +=head2 Autodecrement + +Attempts to autodecrement a B object will +result in a message being removed from the object's message set. + +Examples: + + $msgset -= 34; + # Message #34 is no longer in the message set + $msgset -= "1:10"; + # Messages 1 through 10 are no longer in the message set + +If you attempt to remove a message that was not in the original message set +then your resulting message set will be the same as the original, only more +expensive. However, if you attempt to remove several messages from the message +set and some of those messages were in the message set and some were not, +the additional overhead of checking for the messages that were not there +is negligable. In either case you get back the message set you want regardless +of whether it was already like that or not. + +=head1 AUTHOR + + David J. Kernen + The Kernen Consulting Group, Inc + +=head1 COPYRIGHT + + Copyright 1999, 2000, 2001, 2002 The Kernen Group, Inc. + All rights reserved. + +This program is free software; you can redistribute it and/or modify it +under the terms of either: + +=over 4 + +=item a) the "Artistic License" which comes with this Kit, or + +=item b) the GNU General Public License as published by the Free Software +Foundation; either version 1, or (at your option) any later version. + +=back + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU +General Public License or the Artistic License for more details. All your +base are belong to us. + +=cut + +1; diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.grammar b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.grammar new file mode 100644 index 0000000..543c182 --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.grammar @@ -0,0 +1,18 @@ +# Atoms: + +NUMBER: /\d+/ + +# Rules: + +threadmember: NUMBER { $return = $item{NUMBER} ; } | + thread { $return = $item{thread} ; } + +thread: "(" threadmember(s) ")" + { + $return = $item{'threadmember(s)'}||undef; + } + +# Start: +start: /^\* THREAD /i thread(s?) { + $return=$item{'thread(s?)'}||undef; +} diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pm b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pm new file mode 100644 index 0000000..03b6cdf --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pm @@ -0,0 +1,1024 @@ +package Mail::IMAPClient::Thread; +use Parse::RecDescent; + +{ my $ERRORS; + + +package Parse::RecDescent::Mail::IMAPClient::Thread; +use strict; +use vars qw($skip $AUTOLOAD ); +@Parse::RecDescent::Mail::IMAPClient::Thread::ISA = (); +$skip = '\s*'; + + +{ +local $SIG{__WARN__} = sub {0}; +# PRETEND TO BE IN Parse::RecDescent NAMESPACE +*Parse::RecDescent::Mail::IMAPClient::Thread::AUTOLOAD = sub +{ + no strict 'refs'; + $AUTOLOAD =~ s/^Parse::RecDescent::Mail::IMAPClient::Thread/Parse::RecDescent/; + goto &{$AUTOLOAD}; +} +} + +push @Parse::RecDescent::Mail::IMAPClient::Thread::ISA, 'Parse::RecDescent'; +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::Thread::thread +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"thread"}; + + Parse::RecDescent::_trace(q{Trying rule: [thread]}, + Parse::RecDescent::_tracefirst($_[1]), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + + + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{'('}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: ['(' threadmember ')']}, + Parse::RecDescent::_tracefirst($_[1]), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{thread}); + %item = (__RULE__ => q{thread}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: ['(']}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING1__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [threadmember]}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{threadmember})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::threadmember, 1, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [threadmember]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{threadmember(s)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying terminal: [')']}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{')'})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and + substr($text,0,length($_tok)) eq $_tok and + do { substr($text,0,length($_tok)) = ""; 1; } + ) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__STRING2__}=$_tok; + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { + $return = $item{'threadmember(s)'}||undef; + }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: ['(' threadmember ')']<<}, + Parse::RecDescent::_tracefirst($text), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + + unless ( $_matched || defined($score) ) + { + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{thread}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{thread}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{thread}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"NUMBER"}; + + Parse::RecDescent::_trace(q{Trying rule: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + + + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/\\d+/}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/\\d+/]}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{NUMBER}); + %item = (__RULE__ => q{NUMBER}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/\\d+/]}, Parse::RecDescent::_tracefirst($text), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\d+)/) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/\\d+/]<<}, + Parse::RecDescent::_tracefirst($text), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + + unless ( $_matched || defined($score) ) + { + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{NUMBER}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{NUMBER}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{NUMBER}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::Thread::start +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"start"}; + + Parse::RecDescent::_trace(q{Trying rule: [start]}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + + + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{/^\\* THREAD /i}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [/^\\* THREAD /i thread]}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{start}); + %item = (__RULE__ => q{start}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying terminal: [/^\\* THREAD /i]}, Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $lastsep = ""; + $expectation->is(q{})->at($text); + + + unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\* THREAD )/i) + { + + $expectation->failed(); + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + + last; + } + $current_match = substr($text, $-[0], $+[0] - $-[0]); + substr($text,0,length($current_match),q{}); + Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} + . $current_match . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $item{__PATTERN1__}=$current_match; + + + Parse::RecDescent::_trace(q{Trying repeated subrule: [thread]}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->is(q{thread})->at($text); + + unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::thread, 0, 100000000, $_noactions,$expectation,sub { \@arg }))) + { + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched repeated subrule: [thread]<< (} + . @$_tok . q{ times)}, + + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{thread(s?)}} = $_tok; + push @item, $_tok; + + + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { + $return=$item{'thread(s?)'}||undef; +}; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [/^\\* THREAD /i thread]<<}, + Parse::RecDescent::_tracefirst($text), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + + unless ( $_matched || defined($score) ) + { + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{start}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{start}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{start}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{start}, + $tracelevel) + } + $_[1] = $text; + return $return; +} + +# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) +sub Parse::RecDescent::Mail::IMAPClient::Thread::threadmember +{ + my $thisparser = $_[0]; + use vars q{$tracelevel}; + local $tracelevel = ($tracelevel||0)+1; + $ERRORS = 0; + my $thisrule = $thisparser->{"rules"}{"threadmember"}; + + Parse::RecDescent::_trace(q{Trying rule: [threadmember]}, + Parse::RecDescent::_tracefirst($_[1]), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + + + my $err_at = @{$thisparser->{errors}}; + + my $score; + my $score_return; + my $_tok; + my $return = undef; + my $_matched=0; + my $commit=0; + my @item = (); + my %item = (); + my $repeating = defined($_[2]) && $_[2]; + my $_noactions = defined($_[3]) && $_[3]; + my @arg = defined $_[4] ? @{ &{$_[4]} } : (); + my %arg = ($#arg & 01) ? @arg : (@arg, undef); + my $text; + my $lastsep=""; + my $current_match; + my $expectation = new Parse::RecDescent::Expectation(q{NUMBER, or thread}); + $expectation->at($_[1]); + + my $thisline; + tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; + + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [NUMBER]}, + Parse::RecDescent::_tracefirst($_[1]), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[0]; + $text = $_[1]; + my $_savetext; + @item = (q{threadmember}); + %item = (__RULE__ => q{threadmember}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{NUMBER}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{NUMBER} ; }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + + while (!$_matched && !$commit) + { + + Parse::RecDescent::_trace(q{Trying production: [thread]}, + Parse::RecDescent::_tracefirst($_[1]), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + my $thisprod = $thisrule->{"prods"}[1]; + $text = $_[1]; + my $_savetext; + @item = (q{threadmember}); + %item = (__RULE__ => q{threadmember}); + my $repcount = 0; + + + Parse::RecDescent::_trace(q{Trying subrule: [thread]}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + if (1) { no strict qw{refs}; + $expectation->is(q{})->at($text); + unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::thread($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) + { + + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $expectation->failed(); + last; + } + Parse::RecDescent::_trace(q{>>Matched subrule: [thread]<< (return value: [} + . $_tok . q{]}, + + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $item{q{thread}} = $_tok; + push @item, $_tok; + + } + + Parse::RecDescent::_trace(q{Trying action}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + + + $_tok = ($_noactions) ? 0 : do { $return = $item{thread} ; }; + unless (defined $_tok) + { + Parse::RecDescent::_trace(q{<> (return value: [undef])}) + if defined $::RD_TRACE; + last; + } + Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} + . $_tok . q{])}, + Parse::RecDescent::_tracefirst($text)) + if defined $::RD_TRACE; + push @item, $_tok; + $item{__ACTION1__}=$_tok; + + + + Parse::RecDescent::_trace(q{>>Matched production: [thread]<<}, + Parse::RecDescent::_tracefirst($text), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $_matched = 1; + last; + } + + + unless ( $_matched || defined($score) ) + { + + + $_[1] = $text; # NOT SURE THIS IS NEEDED + Parse::RecDescent::_trace(q{<>}, + Parse::RecDescent::_tracefirst($_[1]), + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + return undef; + } + if (!defined($return) && defined($score)) + { + Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", + q{threadmember}, + $tracelevel) + if defined $::RD_TRACE; + $return = $score_return; + } + splice @{$thisparser->{errors}}, $err_at; + $return = $item[$#item] unless defined $return; + if (defined $::RD_TRACE) + { + Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . + $return . q{])}, "", + q{threadmember}, + $tracelevel); + Parse::RecDescent::_trace(q{(consumed: [} . + Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, + Parse::RecDescent::_tracefirst($text), + , q{threadmember}, + $tracelevel) + } + $_[1] = $text; + return $return; +} +} +package Mail::IMAPClient::Thread; sub new { my $self = bless( { + '_precompiled' => 1, + 'localvars' => '', + 'startcode' => '', + 'namespace' => 'Parse::RecDescent::Mail::IMAPClient::Thread', + 'rules' => { + 'thread' => bless( { + 'impcount' => 0, + 'calls' => [ + 'threadmember' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 2, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '(', + 'hashname' => '__STRING1__', + 'description' => '\'(\'', + 'lookahead' => 0, + 'line' => 10 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'subrule' => 'threadmember', + 'expected' => undef, + 'min' => 1, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's', + 'lookahead' => 0, + 'line' => 10 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'pattern' => ')', + 'hashname' => '__STRING2__', + 'description' => '\')\'', + 'lookahead' => 0, + 'line' => 10 + }, 'Parse::RecDescent::InterpLit' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 11, + 'code' => '{ + $return = $item{\'threadmember(s)\'}||undef; + }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'thread', + 'vars' => '', + 'line' => 10 + }, 'Parse::RecDescent::Rule' ), + 'NUMBER' => bless( { + 'impcount' => 0, + 'calls' => [], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 0, + 'items' => [ + bless( { + 'pattern' => '\\d+', + 'hashname' => '__PATTERN1__', + 'description' => '/\\\\d+/', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 3, + 'mod' => '', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'NUMBER', + 'vars' => '', + 'line' => 1 + }, 'Parse::RecDescent::Rule' ), + 'start' => bless( { + 'impcount' => 0, + 'calls' => [ + 'thread' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 1, + 'actcount' => 1, + 'items' => [ + bless( { + 'pattern' => '^\\* THREAD ', + 'hashname' => '__PATTERN1__', + 'description' => '/^\\\\* THREAD /i', + 'lookahead' => 0, + 'rdelim' => '/', + 'line' => 16, + 'mod' => 'i', + 'ldelim' => '/' + }, 'Parse::RecDescent::Token' ), + bless( { + 'subrule' => 'thread', + 'expected' => undef, + 'min' => 0, + 'argcode' => undef, + 'max' => 100000000, + 'matchrule' => 0, + 'repspec' => 's?', + 'lookahead' => 0, + 'line' => 16 + }, 'Parse::RecDescent::Repetition' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 16, + 'code' => '{ + $return=$item{\'thread(s?)\'}||undef; +}' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'start', + 'vars' => '', + 'line' => 15 + }, 'Parse::RecDescent::Rule' ), + 'threadmember' => bless( { + 'impcount' => 0, + 'calls' => [ + 'NUMBER', + 'thread' + ], + 'changed' => 0, + 'opcount' => 0, + 'prods' => [ + bless( { + 'number' => '0', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'NUMBER', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 7 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 7, + 'code' => '{ $return = $item{NUMBER} ; }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => undef + }, 'Parse::RecDescent::Production' ), + bless( { + 'number' => '1', + 'strcount' => 0, + 'dircount' => 0, + 'uncommit' => undef, + 'error' => undef, + 'patcount' => 0, + 'actcount' => 1, + 'items' => [ + bless( { + 'subrule' => 'thread', + 'matchrule' => 0, + 'implicit' => undef, + 'argcode' => undef, + 'lookahead' => 0, + 'line' => 8 + }, 'Parse::RecDescent::Subrule' ), + bless( { + 'hashname' => '__ACTION1__', + 'lookahead' => 0, + 'line' => 8, + 'code' => '{ $return = $item{thread} ; }' + }, 'Parse::RecDescent::Action' ) + ], + 'line' => 7 + }, 'Parse::RecDescent::Production' ) + ], + 'name' => 'threadmember', + 'vars' => '', + 'line' => 5 + }, 'Parse::RecDescent::Rule' ) + }, + '_AUTOTREE' => undef, + '_check' => { + 'thisoffset' => '', + 'itempos' => '', + 'prevoffset' => '', + 'prevline' => '', + 'prevcolumn' => '', + 'thiscolumn' => '' + }, + '_AUTOACTION' => undef + }, 'Parse::RecDescent' ); +} \ No newline at end of file diff --git a/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pod b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pod new file mode 100644 index 0000000..46a5a26 --- /dev/null +++ b/W/Mail-IMAPClient-3.34/lib/Mail/IMAPClient/Thread.pod @@ -0,0 +1,14 @@ +=head1 NAME + +Mail::IMAPClient::Thread - used internally by Mail::IMAPClient->thread + +=head1 DESCRIPTION + +This module is used internally by L and is +generated using L. It is not meant to be used directly by +other scripts nor is there much point in debugging it. + +=head1 SYNOPSIS + +This module is used internally by L and is not meant to +be used or called directly from applications. So don't do that. diff --git a/W/Mail-IMAPClient-3.34/pm_to_blib b/W/Mail-IMAPClient-3.34/pm_to_blib new file mode 100644 index 0000000..e69de29 diff --git a/W/Mail-IMAPClient-3.33/prepare_dist b/W/Mail-IMAPClient-3.34/prepare_dist similarity index 100% rename from W/Mail-IMAPClient-3.33/prepare_dist rename to W/Mail-IMAPClient-3.34/prepare_dist diff --git a/W/Mail-IMAPClient-3.33/t/basic.t b/W/Mail-IMAPClient-3.34/t/basic.t similarity index 97% rename from W/Mail-IMAPClient-3.33/t/basic.t rename to W/Mail-IMAPClient-3.34/t/basic.t index 7b70baf..71d73cc 100644 --- a/W/Mail-IMAPClient-3.33/t/basic.t +++ b/W/Mail-IMAPClient-3.34/t/basic.t @@ -33,7 +33,7 @@ BEGIN { @missing ? plan skip_all => "missing value for: @missing" - : plan tests => 85; + : plan tests => 88; } BEGIN { use_ok('Mail::IMAPClient') or exit; } @@ -56,7 +56,7 @@ my %new_args = ( my $imap = Mail::IMAPClient->new( %new_args, Range => $range, - Debug_fh => ( $debug ? IO::File->new( 'imap1.debug', 'w' ) : undef ) + Debug_fh => ( $debug ? IO::File->new( 'imap1.debug', 'w' ) : undef ), ); ok( defined $imap, 'created client' ); @@ -102,6 +102,16 @@ ok( defined $ispar, "INBOX is_parent '$ispar' (note: target '$target')" ); ok( $imap->select('inbox'), "select inbox" ); +# folders +{ + my @f = $imap->folders(); + ok( @f, "folders" . ( $debug ? ":@f" : "" ) ); + my @fh = $imap->folders_hash(); + my @fh_keys = qw(attrs delim name); + ok( @fh, "folders_hash keys: @fh_keys" ); + ok( eq_set( ( [ keys %{ $fh[0] } ], [ @fh_keys ] ) ) ); +} + # test append_file my $append_file_size; { diff --git a/W/Mail-IMAPClient-3.33/t/body_string.t b/W/Mail-IMAPClient-3.34/t/body_string.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/body_string.t rename to W/Mail-IMAPClient-3.34/t/body_string.t diff --git a/W/Mail-IMAPClient-3.33/t/bodystructure.t b/W/Mail-IMAPClient-3.34/t/bodystructure.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/bodystructure.t rename to W/Mail-IMAPClient-3.34/t/bodystructure.t diff --git a/W/Mail-IMAPClient-3.33/t/fetch_hash.t b/W/Mail-IMAPClient-3.34/t/fetch_hash.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/fetch_hash.t rename to W/Mail-IMAPClient-3.34/t/fetch_hash.t diff --git a/W/Mail-IMAPClient-3.33/t/messageset.t b/W/Mail-IMAPClient-3.34/t/messageset.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/messageset.t rename to W/Mail-IMAPClient-3.34/t/messageset.t diff --git a/W/Mail-IMAPClient-3.33/t/pod.t b/W/Mail-IMAPClient-3.34/t/pod.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/pod.t rename to W/Mail-IMAPClient-3.34/t/pod.t diff --git a/W/Mail-IMAPClient-3.33/t/simple.t b/W/Mail-IMAPClient-3.34/t/simple.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/simple.t rename to W/Mail-IMAPClient-3.34/t/simple.t diff --git a/W/Mail-IMAPClient-3.33/t/thread.t b/W/Mail-IMAPClient-3.34/t/thread.t similarity index 100% rename from W/Mail-IMAPClient-3.33/t/thread.t rename to W/Mail-IMAPClient-3.34/t/thread.t diff --git a/W/Mail-IMAPClient-3.33/test_template.txt b/W/Mail-IMAPClient-3.34/test_template.txt similarity index 100% rename from W/Mail-IMAPClient-3.33/test_template.txt rename to W/Mail-IMAPClient-3.34/test_template.txt diff --git a/W/paypal_reply/paypal_build_invoices b/W/paypal_reply/paypal_build_invoices index 31cd95f..b27f1a2 100755 --- a/W/paypal_reply/paypal_build_invoices +++ b/W/paypal_reply/paypal_build_invoices @@ -41,7 +41,8 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2627 /g/paypal/paypal_2013_06_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2682 /g/paypal/paypal_2013_07_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2741 /g/paypal/paypal_2013_08_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2820 /g/paypal/paypal_2013_09_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2820 /g/paypal/paypal_2013_09_complet.csv +/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2891 /g/paypal/paypal_2013_10_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv @@ -80,6 +81,7 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa set -x : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2820 /g/paypal/paypal_2013_09_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2891 /g/paypal/paypal_2013_10_complet.csv set +x # La totale diff --git a/W/test3.bat b/W/test3.bat index 02fd284..e0eb7a8 100644 --- a/W/test3.bat +++ b/W/test3.bat @@ -2,8 +2,17 @@ cd /D %~dp0 -.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl2 --delete2 --folder INBOX --usecache --tmpdir "E:\\temp" +REM E: +REM cd .\temp +REM cd \ +imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --usecache --tmpdir "E:\TEMP" --include "blanc" +REM perl imapsync --tests_debug +perl imapsync --tests +PAUSE +perl imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --usecache --tmpdir "E:\TEMP" +REM perl imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --usecache +REM rmdir "E:\TEMP\imapsync_cache" /s /q diff --git a/build_exe.bat b/build_exe.bat index e3a87b3..11857bb 100644 --- a/build_exe.bat +++ b/build_exe.bat @@ -1,5 +1,5 @@ -REM $Id: build_exe.bat,v 1.20 2013/09/21 21:56:14 gilles Exp gilles $ +REM $Id: build_exe.bat,v 1.21 2013/10/17 00:54:53 gilles Exp gilles $ @ECHO OFF ECHO Building imapsync.exe @@ -12,7 +12,7 @@ perl -mMail::IMAPClient -mIO::Socket -mIO::Socket::SSL -mIO::Socket::IP ^ -mDigest::MD5 -mDigest::HMAC_MD5 -mDigest::HMAC_SHA1 ^ -mTerm::ReadKey -mFile::Spec -mAuthen::NTLM ^ -mTime::Local -mURI::Escape -mData::Uniqid ^ - -e '' + -mFile::Copy::Recursive -e '' cd @ECHO ON @@ -23,7 +23,7 @@ pp -o imapsync.exe ^ -M Digest::MD5 -M Digest::HMAC_MD5 -M Digest::HMAC_SHA1 ^ -M Term::ReadKey -M Authen::NTLM ^ -M Time::Local -M URI::Escape -M Data::Uniqid ^ - ^ + -M File::Copy::Recursive ^ imapsync echo Done building imapsync.exe diff --git a/examples/install_modules.bat b/examples/install_modules.bat index 1eff071..1603307 100644 --- a/examples/install_modules.bat +++ b/examples/install_modules.bat @@ -1,5 +1,5 @@ -REM $Id: install_modules.bat,v 1.8 2013/09/19 10:34:33 gilles Exp gilles $ +REM $Id: install_modules.bat,v 1.9 2013/10/17 01:50:42 gilles Exp gilles $ @ECHO OFF @@ -12,19 +12,27 @@ IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://stra REM perl is there -FOR %%M in ( Test::Pod ^ - IO::Socket::INET IO::Socket::INET6 IO::Socket::IP ^ +FOR %%M in ( Mail::IMAPClient ^ + File::Copy::Recursive ^ + PAR::Packer ^ + Test::Pod ^ + IO::Socket::INET ^ + IO::Socket::INET6 ^ + IO::Socket::IP ^ Net::SSLeay ^ - Crypt::SSLeay Net::SSL IO::Socket::SSL ^ - Digest::MD5 Digest::HMAC_MD5 ^ - Term::ReadKey File::Spec ^ + Crypt::SSLeay ^ + Net::SSL IO::Socket::SSL ^ + Digest::MD5 ^ + Digest::HMAC_MD5 ^ + Term::ReadKey ^ + File::Spec ^ Time::HiRes ^ Data::Uniqid URI::Escape ^ Authen::NTLM ^ Time::Local ^ - Mail::IMAPClient ^ - Getopt::ArgvFile Module::ScanDeps ^ - PAR::Packer ) DO ECHO Updating %%M ^ + Getopt::ArgvFile ^ + Module::ScanDeps ^ + ) DO ECHO Updating %%M ^ & perl -MCPAN -e "install %%M" REM & perl -m%%M -e "" || perl -MCPAN -e "install %%M" diff --git a/i3 b/i3 index ef71c6c..bccf3b6 100755 --- a/i3 +++ b/i3 @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: i3,v 1.12 2013/07/03 04:11:35 gilles Exp gilles $ +# $Id: i3,v 1.13 2013/09/28 11:50:16 gilles Exp gilles $ BASE=`dirname $0` -perl -I${BASE}/W/Mail-IMAPClient-3.33/lib ${BASE}/imapsync "$@" +perl -I${BASE}/W/Mail-IMAPClient-3.34/lib ${BASE}/imapsync "$@" diff --git a/imapsync b/imapsync index e73c65a..4330582 100755 --- a/imapsync +++ b/imapsync @@ -22,7 +22,7 @@ Synchronises mailboxes between two imap servers. Good at IMAP migration. More than 52 different IMAP server softwares supported with success, few failures. -$Revision: 1.567 $ +$Revision: 1.569 $ =head1 SYNOPSIS @@ -367,7 +367,7 @@ Failure stories reported with the following 3 imap servers: - Hotmail since hotmail.com does not provide IMAP access - Outlook.com since outlook.com does not provide IMAP access -Success stories reported with the following 55 imap servers +Success stories reported with the following 57 imap servers (software names are in alphabetic order): - 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1] @@ -404,6 +404,7 @@ Success stories reported with the following 55 imap servers - GMX IMAP4 StreamProxy. - Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ. - hMailServer 5.3.3 [host2], 4.4.1 [host1] (see FAQ) + - IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/) - iPlanet Messaging server 4.15, 5.1, 5.2 - IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] - Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1] @@ -424,6 +425,7 @@ Success stories reported with the following 55 imap servers - OpenMail IMAP server B.07.00.k0 (Samsung Contact ?) - OpenWave - Oracle Beehive [host1] + - Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/) - Qualcomm Worldmail (NT) - QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/ - RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/ @@ -539,34 +541,35 @@ Entries for imapsync: Feedback (good or bad) will often be welcome. -$Id: imapsync,v 1.567 2013/09/18 20:38:10 gilles Exp gilles $ +$Id: imapsync,v 1.569 2013/10/16 21:58:17 gilles Exp gilles $ =cut # pragmas -use strict; -use warnings; -++$|; -use Carp; -use Getopt::Long; +use strict ; +use warnings ; +++$| ; +use Carp ; +use Getopt::Long ; use Mail::IMAPClient 3.29 ; -use Digest::MD5 qw( md5 md5_hex md5_base64 ); +use Digest::MD5 qw( md5 md5_hex md5_base64 ) ; use Digest::HMAC_SHA1 qw( hmac_sha1 ) ; -#use Term::ReadKey; -#use IO::Socket::SSL; -use MIME::Base64; +#use Term::ReadKey ; +#use IO::Socket::SSL ; +use MIME::Base64 ; use English '-no_match_vars' ; -use File::Basename; -use POSIX qw(uname SIGALRM); -use Fcntl; -use File::Spec; -use File::Path qw(mkpath rmtree); -use IO::Socket qw(:crlf SOL_SOCKET SO_KEEPALIVE); -use Errno qw(EAGAIN EPIPE ECONNRESET); +use File::Basename ; +use POSIX qw(uname SIGALRM) ; +use Fcntl ; +use File::Spec ; +use File::Path qw( mkpath rmtree ) ; +use File::Copy::Recursive ; +use IO::Socket qw(:crlf SOL_SOCKET SO_KEEPALIVE) ; +use Errno qw(EAGAIN EPIPE ECONNRESET) ; use File::Glob qw( :glob ) ; -use IO::File; +use IO::File ; use Time::Local ; use Time::HiRes qw( time ) ; use Test::More 'no_plan' ; @@ -661,13 +664,14 @@ my( $fixInboxINBOX, $maxlinelength, $uidnext_default, + $fixcolonbug, ); # main program # global variables initialisation -$rcs = '$Id: imapsync,v 1.567 2013/09/18 20:38:10 gilles Exp gilles $ '; +$rcs = '$Id: imapsync,v 1.569 2013/10/16 21:58:17 gilles Exp gilles $ '; $total_bytes_transferred = 0; $total_bytes_skipped = 0; @@ -787,15 +791,19 @@ print banner_imapsync(@argv_copy); print "Temp directory is $tmpdir\n"; -is_valid_directory($tmpdir); -write_pidfile($pidfile) if ($pidfile); +is_valid_directory( $tmpdir ) ; +write_pidfile( $pidfile ) if ( $pidfile ) ; + +$fixcolonbug = defined( $fixcolonbug ) ? $fixcolonbug : 1 ; + +if ( $usecache and $fixcolonbug ) { tmpdir_fix_colon_bug( ) } ; $modules_version and print "Modules version list:\n", modules_VERSION(), "\n"; check_lib_version() or croak "imapsync needs perl lib Mail::IMAPClient release 3.25 or superior \n"; -exit_clean(0) if ($justbanner); +exit_clean( 0 ) if ( $justbanner ) ; # By default, 100 at a time, not more. $split1 ||= 100; @@ -1256,8 +1264,8 @@ FOLDER: foreach my $h1_fold ( @h1_folders_wanted ) { ( $debug or $debugLIST ) and print "Host2 LIST: $h2_msgs_nb messages [@h2_msgs]\n"; $debug and print "Host2 selecting messages of folder [$h2_fold] took ", timenext(), " s\n"; - my $cache_base = "$tmpdir/imapsync_cache/$host1/$user1/$host2/$user2" ; - my $cache_dir = cache_folder( $cache_base, $h1_fold, $h2_fold ) ; + my $cache_base = "$tmpdir/imapsync_cache/" ; + my $cache_dir = cache_folder( $cache_base, "$host1/$user1/$host2/$user2", $h1_fold, $h2_fold ) ; my ( $cache_1_2_ref, $cache_2_1_ref ) = ( {}, {} ) ; my $h1_uidvalidity = $imap1->uidvalidity( ) || '' ; @@ -1700,7 +1708,7 @@ sub sync_flags_after_copy { my @h2_flags = $imap2->flags( $h2_msg ) ; my $h2_flags = "@h2_flags" ; - print "FLAGS $h2_msg: $h2_flags\n" ; + ( $debug or $debugflags ) and print "Host2 flags before resync by STORE on msg $h2_msg: $h2_flags\n" ; sync_flags( $h1_fold, $h1_msg, $h1_flags, $h2_fold, $h2_msg, $h2_flags, $permanentflags2 ) ; return( ) ; } @@ -2265,8 +2273,8 @@ sub banner_imapsync { my @argv = @_ ; my $banner_imapsync = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.567 $ ', - '$Date: 2013/09/18 20:38:10 $ ', + '$Revision: 1.569 $ ', + '$Date: 2013/10/16 21:58:17 $ ', "\n",localhost_info(), "\n", "Command line used:\n", "$0 ", command_line_nopassword( @argv ), "\n", @@ -4090,16 +4098,91 @@ sub touch { return( ! $failures ); } + +sub tests_tmpdir_has_colon_bug { + + ok( 0 == tmpdir_has_colon_bug( '' ), 'tmpdir_has_colon_bug: ' ) ; + ok( 0 == tmpdir_has_colon_bug( '/tmp' ), 'tmpdir_has_colon_bug: /tmp' ) ; + ok( 1 == tmpdir_has_colon_bug( 'C:' ), 'tmpdir_has_colon_bug: C:' ) ; + ok( 1 == tmpdir_has_colon_bug( 'C:\temp' ), 'tmpdir_has_colon_bug: C:\temp' ) ; + + return( 0 ) ; +} + +sub tmpdir_has_colon_bug { + my $path = shift ; + + my $path_filtered = filter_forbidden_characters( $path ) ; + if ( $path_filtered ne $path ) { + ( -d $path_filtered ) and print "Path $path was previously mistakely changed to $path_filtered\n" ; + return( 1 ) ; + } + return( 0 ) ; +} + +sub tmpdir_fix_colon_bug { + + my $err = 0 ; + if ( not (-d $tmpdir and -r _ and -w _) ) { + print "tmpdir $tmpdir is not valid\n" ; + return( 0 ) ; + } + my $cachedir_new = "$tmpdir/imapsync_cache" ; + + if ( not tmpdir_has_colon_bug( $cachedir_new ) ) { return( 0 ) } ; + + # check if old cache directory already exists + my $cachedir_old = filter_forbidden_characters( $cachedir_new ) ; + if ( not ( -d $cachedir_old ) ) { + print "Old cache directory $cachedir_new no exists, nothing to do\n" ; + return( 1 ) ; + } + + # check if new cache directory already exists + if ( -d $cachedir_new ) { + print "New fixed cache directory $cachedir_new already exists, not moving the old one $cachedir_old. Fix this manually.\n" ; + return( 0 ) ; + }else{ + # move the old one to the new place + + print "Moving $cachedir_old to $cachedir_new Do not interrupt this task.\n" ; + File::Copy::Recursive::rmove( $cachedir_old, $cachedir_new ) + or do { + print "Could not move $cachedir_old to $cachedir_new\n" ; + $err++ ; + } ; + # check it succeeded + if ( -d $cachedir_new and -r _ and -w _ ) { + print "New fixed cache directory $cachedir_new ok\n" ; + }else{ + print "New fixed cache directory $cachedir_new does not exist\n" ; + $err++ ; + } + if ( -d $cachedir_old ) { + print "Old cache directory $cachedir_old still exists\n" ; + $err++ ; + }else{ + print "Old cache directory $cachedir_old successfuly moved\n" ; + } + } + return( not $err ) ; +} + + sub tests_cache_folder { - ok( '/path/fold1/fold2' eq cache_folder( '/path', 'fold1', 'fold2'), 'cache_folder: /path, fold1, fold2 -> /path/fold1/fold2' ) ; - ok( '/pa_th/fold1/fold2' eq cache_folder( '/pa*th', 'fold1', 'fold2'), 'cache_folder: /pa*th, fold1, fold2 -> /path/fold1/fold2' ) ; - ok( '/_p_a__th/fol_d1/fold2' eq cache_folder( '/>pp /path/fol_d1/fold2' ) ; + ok( '/path/fold1/fold2' eq cache_folder( '', '/path', 'fold1', 'fold2'), 'cache_folder: /path, fold1, fold2 -> /path/fold1/fold2' ) ; + ok( '/pa_th/fold1/fold2' eq cache_folder( '', '/pa*th', 'fold1', 'fold2'), 'cache_folder: /pa*th, fold1, fold2 -> /path/fold1/fold2' ) ; + ok( '/_p_a__th/fol_d1/fold2' eq cache_folder( '', '/>pp /path/fol_d1/fold2' ) ; + + ok( 'D:/path/fold1/fold2' eq cache_folder( 'D:', '/path', 'fold1', 'fold2'), 'cache_folder: /path, fold1, fold2 -> /path/fold1/fold2' ) ; + ok( 'D:/pa_th/fold1/fold2' eq cache_folder( 'D:', '/pa*th', 'fold1', 'fold2'), 'cache_folder: /pa*th, fold1, fold2 -> /path/fold1/fold2' ) ; + ok( 'D:/_p_a__th/fol_d1/fold2' eq cache_folder( 'D:', '/>pp /path/fol_d1/fold2' ) ; return( ) ; } sub cache_folder { - my( $cache_dir, $h1_fold, $h2_fold ) = @_ ; + my( $cache_base, $cache_dir, $h1_fold, $h2_fold ) = @_ ; my $sep_1 = $h1_sep || '/'; my $sep_2 = $h2_sep || '/'; @@ -4107,27 +4190,37 @@ sub cache_folder { #print "$cache_dir h1_fold $h1_fold sep1 $sep_1 h2_fold $h2_fold sep2 $sep_2\n"; $h1_fold = convert_sep_to_slash( $h1_fold, $sep_1 ) ; $h2_fold = convert_sep_to_slash( $h2_fold, $sep_2 ) ; - - my $cache_folder = "$cache_dir/$h1_fold/$h2_fold" ; - $cache_folder = filter_forbidden_characters( $cache_folder ) ; + + my $cache_folder = "$cache_base" . filter_forbidden_characters( "$cache_dir/$h1_fold/$h2_fold" ) ; #print "cache_folder [$cache_folder]\n" ; return( $cache_folder ) ; } -sub filter_forbidden_characters { +sub filter_forbidden_characters { my $string = shift ; + if ( 'MSWin32' eq $OSNAME ) { + # Move trailing whitespace to _ " a b /c d " -> " a b_/c d_" + $string =~ s{\ (/|$)}{_$1}xg ; + } $string =~ s{[\Q*|?:"<>\E]}{_}xg ; + #print "[$string]\n" ; return ( $string ) ; } -sub tests_filter_forbidden_characters { +sub tests_filter_forbidden_characters { ok( 'a_b' eq filter_forbidden_characters( 'a_b' ), 'filter_forbidden_characters: a_b -> a_b' ) ; - ok( 'a_b' eq filter_forbidden_characters( 'a*b' ), 'filter_forbidden_characters: a*b -> a_b' ); - ok( 'a_b' eq filter_forbidden_characters( 'a|b' ), 'filter_forbidden_characters: a|b -> a_b' ); - ok( 'a_b' eq filter_forbidden_characters( 'a?b' ), 'filter_forbidden_characters: a?*b -> a_b' ); - ok( 'a_______b' eq filter_forbidden_characters( 'a*|?:"<>b' ), 'filter_forbidden_characters: a*|?:"<>b -> a_______b' ); + ok( 'a_b' eq filter_forbidden_characters( 'a*b' ), 'filter_forbidden_characters: a*b -> a_b' ) ; + ok( 'a_b' eq filter_forbidden_characters( 'a|b' ), 'filter_forbidden_characters: a|b -> a_b' ) ; + ok( 'a_b' eq filter_forbidden_characters( 'a?b' ), 'filter_forbidden_characters: a?b -> a_b' ) ; + ok( 'a_______b' eq filter_forbidden_characters( 'a*|?:"<>b' ), 'filter_forbidden_characters: a*|?:"<>b -> a_______b' ) ; + + ( 'MSWin32' ne $OSNAME ) and ok( ( 'a b ' eq filter_forbidden_characters( 'a b ' ) ), 'filter_forbidden_characters: "a b " -> "a b "' ) ; + + ( 'MSWin32' eq $OSNAME ) and ok( ( ' a b_' eq filter_forbidden_characters( ' a b ' ) ), 'filter_forbidden_characters: "a b " -> "a b_"' ) ; + ( 'MSWin32' eq $OSNAME ) and ok( ( ' a b_/ c d_' eq filter_forbidden_characters( ' a b / c d ' ) ), 'filter_forbidden_characters: " a b / c d " -> "a b_/ c d_"' ) ; + return( ) ; } @@ -4659,7 +4752,7 @@ sub check_last_release { } sub imapsync_version { - my $rcs_imapsync = '$Id: imapsync,v 1.567 2013/09/18 20:38:10 gilles Exp gilles $ ' ; + my $rcs_imapsync = '$Id: imapsync,v 1.569 2013/10/16 21:58:17 gilles Exp gilles $ ' ; my $imapsync_version ; if ( $rcs_imapsync =~ m{,v\s+(\d+\.\d+)}xo ) { @@ -5512,8 +5605,9 @@ Several options are mandatory. For safety, first try it like this (it is safe): --delete2folders --dry --justfolders --nofoldersizes --delete2foldersonly : Deleted only folders matching regex. + Example: --delete2foldersonly "/Junk$/" --delete2foldersbutnot : Do not delete folders matching regex. - Example: --delete2foldersbutnot "/Tasks|Contacts|Foo/" + Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/" --noexpunge : Do not expunge messages on host1. Expunge really deletes messages marked deleted. Expunge is made at the beginning, on host1 only. @@ -5779,6 +5873,7 @@ sub get_options { "abletosearch!" => \$abletosearch, "showpasswords!" => \$showpasswords, "maxlinelength=i" => \$maxlinelength, + "fixcolonbug!" => \$fixcolonbug, ); $debug and print "get options: [$opt_ret]\n"; @@ -5813,7 +5908,9 @@ sub tests_debug { SKIP: { skip "No test in normal run" if ( not $tests_debug ); - tests_msgs_from_maxmin( ) ; + tests_filter_forbidden_characters( ) ; + tests_cache_folder( ) ; + tests_tmpdir_has_colon_bug( ) ; } return( ) ; } @@ -5865,6 +5962,7 @@ sub tests { tests_max_line_length( ) ; tests_subject( ) ; tests_msgs_from_maxmin( ) ; + tests_tmpdir_has_colon_bug( ) ; } return( ) ; } diff --git a/index.shtml b/index.shtml index 70d2895..ebd146d 100644 --- a/index.shtml +++ b/index.shtml @@ -5,7 +5,7 @@ Official imapsync migration tool ( release <!--#exec cmd="cat ./VERSION"--> ) - + @@ -135,7 +135,7 @@ Via the User-agent parameter it also send:

+
    +
  • 1.569 Win32 --tmpdir "C:" bugfix
  • +
  • Bug fix: On Win32 trailing blanc in cache dir name raized an error. Blanc is now moved to underscore _
  • +
  • Bug fix: Fixed bug on Windows with for example --tmpdir "E:\TEMP". The colon was badly converted to _, ending with --tmpdir "E_\TEMP". +This fix also automatically moves the old cache to the new one if the new does not exist yet.
  • +
+
  • 1.567 imapsync.exe crash fix
  • Enhancement: Added --authmech EXTERNAL.
  • @@ -162,89 +169,41 @@ Via the User-agent parameter it also send:

  • Bug fix: Fixed imapsync.exe crash with no error message when it exits on a error. Back to Perl 5.16
+ +

Good changed made before, listed because they can help: +

+
    -
  • 1.564 QQMail support
  • Enhancement: Adapted behavior for allowing --maxdate --mindate with --noabletosearch. Use internat date instead of Date: header.
  • +
  • Enhancement: QQMail IMAP4Server success (with --noabletosearch option)
  • Usability: Apply same treatment to --delete2duplicates as --delete2. If --uidexpunge2 can be done, do it, else do --expunge2 (unless --nouidexpunge2 or --noexpunge2).
  • -
  • Usability: Added --addheader suggestion in outpout in case messages with no header are found.
  • +
  • Usability: Added --timeout in the --help output. Default timeout is 120 seconds now (was nothing by imapsync, 600 with underlying modules).
  • -
-
    -
  • 1.558 SSL fix.
  • Enhancement/Bug fix: Added --ssl1_SSL_version and --ssl2_SSL_version to force the SSL_version in case the default auto-negociation does not work. Example: --ssl1 --ssl1_SSL_version SSLv3
  • -
-
    -
  • 1.555 Better Office365 and Mailenable handling
  • Enhancement: Added option --messageidnodomain to fix Mailenable bug changing the domain part of Message-Id header, and avoid duplicates
  • Enhancement: Added option --syncflagsaftercopy to fix Mailenable bug not getting the flags with the APPEND
  • Enhancement: Added option --maxlinelength to skip messages whose max line length is over a number of bytes. Exchange 2013 and Office365 need --maxlinelength 1000 (which is a RFC2822 must) to avoid disconnections.
  • -
  • Usability: Added back the banner of IMAP servers, ie, the first line given after the connection established.
  • Usability: Added --fixInboxINBOX, turned on by default, to map automatically Inbox INBOX folder names.
  • Usability: IMAP server removing consecutive spaces on the header part doesn't generate duplicates (MailEnable does that)
  • -
  • Bug fix: Better output of mailbox sizes in human style (could be 1024.00 Kib, now it is 1.000 Mib). Changed bytes_display_string().
  • -
  • Bug fix: Option --debugflags now prints flags on first sync (the copy) and also the PERMANENTFLAGS outpout.
  • -
  • Refactoring: Fixed nearly 200 perlcritic at level 3, all level 4. Still 5 eval "" at level 5 and 12 critics at level 3. Nobody cares but me.
  • -
- - -
    -
  • 1.547 Nothing important except imapsync.exe supports also XOAUTH.
  • -
  • Enhancement: DBOX 2.41 success
  • -
  • Enhancement: Kerio 8 success
  • Usability: SSL_verify_mode 0 to avoid warning about Man-In-The-Middle.
  • -
  • Usability: Added message "copying message ..." in dry mode.
  • -
  • Bug fix: Applied patch from Jim Klimov to handle proxyauth failures
  • -
  • Bug fix: Fixed binary previous imapsync.exe 1.542 bug with ssl
  • -
  • Refactoring: Removed sub myconnect() RawSocket2() Split() (Hi Phil!)
  • -
- -
    -
  • 1.542 XOAUTH supported! (Admin Gmail authentication)
  • Enhancement: Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.
  • -
  • Refactoring: Removed old 2.2.9 Mail::IMAPClient patch stuff.
  • -
  • Refactoring: Started perlcritic corrections. Left 4 eval at level 5.
  • -
- -
    -
  • 1.536
  • Enhancement: Added --search1 and --search2 to allow different searches on each host.
  • -
  • Enhancement: Speed up when messages are selected by --minage, --maxage or --search, (used to SEARCH ALL messages)
  • Usability: Added --delete1 as an alias for --delete
  • -
  • Bug fix: Applied Phil patch to improve the lost connection behavior
  • -
  • Bug fix: Applied Phil patch to remove useless warnings
  • -
- -
    -
  • 1.525
  • -
  • Bug fix: Handles the case where several folders on host1 go to one folder on host2 with --delete2 option. The bug was imapsync was copying messages and deleting them on next folder.
  • -
  • Bug fix: Removed reference to DWTFPL since license is NOLIMIT since June 2012.
  • Speed: Option --nocheckmessageexists is activated by default since --checkmessageexists often slow down transfers too much.
  • -
  • Usability: Reorganized the --help message.
  • Usability: Option --foldersizesatend is on if --foldersizes is on. Off if --nofoldersizesatend
  • -
- -
    -
  • 1.518
  • -
  • Bug fix: When identtifying with header, change tabulations to spaces -(Gmail bug with "Received:" header on multilines).
  • -
  • Bug fix: Bugfix. Automatic --nocheckmessageexists when --noabletosearch is set.
  • -
- - -
    -
  • 1.516
  • +
  • Usability: Added host2 minus host1 statistic: number of messages and bytes. One difference at the start and one at the end. @@ -260,8 +219,6 @@ it deletes messages in host2 that are duplicates. --delete2duplicates is on when --delete2 is set unless --nodelete2duplicates is set too.
  • -
  • Usability: Added current date at the beginning of the run, -useful when imapsync doesn't end properly or hasn't finished yet.
  • Enhancement: Added option --pidfilelocking; it aborts imapsync, when just launched, @@ -286,49 +243,14 @@ to allow the listing of messages without the imap "SEARCH ALL" command. It's useful for playing with poor imap servers like Softalk 7.6.4 (8.6 is fine with SEARCH ALL).
  • -
- - -
    -
  • 1.508
  • -
  • Usability: imapsync guesses and prints when it'll finish the transfer; -added ETA after each copy (Estimated Time of Arrival)
  • Enhancement: Added --noexpungeaftereach to speedup --delete --expunge from Gmail.
  • -
  • Usability: Added Host1 or Host2 before "Nb messages" "Total size" -with --foldersiszes (to facilitate parsing)
  • - -
  • Bug fix: Previous fix about characters *|?:"<> to _ -in cache path was not complete.
  • -
-
    -
  • 1.504
  • Enhancement: Added option --nocheckmessageexists to speed up with Tobit imap server as host1.
  • -
  • Usability: Added transfer rate and number of messages rate after each copy.
  • -
  • Usability: Use Time::HiRes time to get time with better precesion than the second.
  • -
  • Bug fix: Convert characters *|?:"<> to _ in cache paths because they are forbidden on Windows paths.
  • -
- -
    -
  • 1.500
  • - -
  • Enhancement: Added option --nocheckselectable to fix INBOX issue with Jana-server.
  • -
  • Bug fix: The cache system didn't work in Win32 (problem with \ transformation).
  • -
  • Bug fix: Check the return of touch calls for the cache.
  • -
  • Usability: Example for --delete2foldersbutnot "m/Contacts|Agenda|Trash/"
  • -
- - -
    -
  • 1.484
  • - -
  • Bug fix: Back to select() (read-write mode) instead of examine() -(read-only mode in 1.468) on host1. Needed with --delete
  • Enhancement: Added option --exitwhenover option to avoid locking when transfers exceed maximum limit. @@ -336,16 +258,9 @@ See for example Exchange compatibility bu default).
  • @@ -662,7 +577,7 @@ I like it.

Now the long reported success stories list: -55 different imap server softwares supported!
+57 different imap server softwares supported!
[host1] means "source server" and [host2] means "destination server":

@@ -710,6 +625,7 @@ I like it. (
http://www.novell.com/products/groupwise/)
  • hMailServer 5.3.3 [host2], 4.4.1 [host1], HMAILSERVER 5.3.2-B1769 on windows 2003 [hsot2] (http://www.hmailserver.com/)
  • +
  • IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
  • iPlanet Messaging server 4.15, 5.1, 5.2 (http://en.wikipedia.org/wiki/Oracle_Communications_Messaging_Server)
  • IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] (http://www.imailserver.com/)
  • @@ -736,6 +652,7 @@ I like it.
  • OpenWave (http://www.openwave.com/)
  • Oracle Beehive [host1] (http://www.oracle.com/technetwork/middleware/beehive/)
  • +
  • Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
  • Qualcomm Worldmail (NT) (http://www.eudora.com/worldmail/)
  • Rockliffe Mailsite 5.3.11, 4.5.6 (http://www.mailsite.com/)
  • RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/)
  • @@ -825,7 +742,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: index.shtml,v 1.185 2013/09/21 22:28:26 gilles Exp gilles $) +($Id: index.shtml,v 1.186 2013/10/17 01:49:59 gilles Exp gilles $)

    diff --git a/perlcritic_1.out b/perlcritic_1.out deleted file mode 100644 index 4b59120..0000000 --- a/perlcritic_1.out +++ /dev/null @@ -1,1983 +0,0 @@ -Code is not tidy at line 1, column 1. See page 33 of PBP. (Severity: 1) -Check the spelling in your POD: NAME imapsync IMAP sync copy tool mailboxes between two imap servers Good at than different server supported with success few failures To synchronize account foo to password INSTALL can be available directly the following FreeBSD Debian Ubuntu Gentoo Fedora NetBSD Darwin Mandriva OpenBSD get of each just run like this The list command is allowing incremental recursive transfer from one mailbox another By default all folders transferred recursively flags synced too We sometimes need This called good because it reduces amount by not transferring given already both sides Same headers done only All preserved unread will stay read deleted You any time restart later works well bad decide delete after successful feature when migrating since side that implies also expunge so marked host really you noexpunge avoid don't see real world scenario want keep used deletes folder adequate maintaining accounts synchronization where plays independently offlineimap written Goerzen mbsync Michael Elkins ways synchronizations invoke help HISTORY wrote enterprise basystemes paid install new without losing huge old located away remote low bandwidth link imapcp could had verify every was started life patch comes perl tarball directory EXAMPLE While working parameters please induced Nothing way buddy Then max's updated buddy's SECURITY passfile instead give safer With your using ps auxwwww Using dangerous auxwwwwe So saving protected rw best imasync totally against sniffers network passwords may plain text CRAM-MD ssl tls enable encryption authenticate typically admin authorized someone else which means know user's personal Specify authuser adminuser authmech PLAIN now SOMETHING work behavior Authenticate When proxyauth masquerade Can OAUTH transfering Google Apps key domain It does free edition STATUS status return everything went Otherwise exits non-zero unreliable connection loop Bourne shell LICENSE always cover NOLIMIT License See included limit anything license MAILING-LIST mailing-list write address subscribe send even empty then reply unsubscribe person consider anyone post pseudonym private Thank AUTHOR Feedback very often welcome earns his writing installing configuring teaching sold its author maintening supporting over decades BUG GUIDELINES Help follow guidelines bugs requests Before reporting FAQ TODO Upgrade last release maybe bug fixed Mail-IMAPClient Perl Make title word my spam filter won't Don't email problem made keywords summary line uppercase I'll Windows haven't yet include Most those found begining easy debug One paper How Ask Way forget SERVERS Failure stories reported Success names alphabetic order Please story users lines they useful Example justconnect HUGE Pay special subscribed maxage maxsize useuid usecache many migrate think little program Write file.txt example containing separator contains batch replaced nothing Welcome programming Hacking Feel hack permits Entries SIMILAR Exp at line 1, column 1. See page 148 of PBP. (Severity: 1) -Missing "REQUIRED ARGUMENTS" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "DIAGNOSTICS" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "CONFIGURATION" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "DEPENDENCIES" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "INCOMPATIBILITIES" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "BUGS AND LIMITATIONS" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Missing "LICENSE AND COPYRIGHT" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Main code has high complexity score (335) at line 1, column 1. Consider refactoring. (Severity: 3) -POD before __END__ at line 16, column 1. See pages 139,140 of PBP. (Severity: 1) -Magic punctuation variable used at line 551, column 3. See page 79 of PBP. (Severity: 2) -File lexical variable "$debugLIST" is not all lower case or all upper case at line 578, column 1. See pages 45,46 of PBP. (Severity: 1) -File lexical variable "$flagsCase" is not all lower case or all upper case at line 578, column 1. See pages 45,46 of PBP. (Severity: 1) -File lexical variable "$ssl1_SSL_version" is not all lower case or all upper case at line 578, column 1. See pages 45,46 of PBP. (Severity: 1) -File lexical variable "$ssl2_SSL_version" is not all lower case or all upper case at line 578, column 1. See pages 45,46 of PBP. (Severity: 1) -File lexical variable "$fixInboxINBOX" is not all lower case or all upper case at line 578, column 1. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 579, column 41. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 581, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 584, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 587, column 28. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 594, column 28. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 597, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 603, column 40. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 605, column 18. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 608, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 612, column 29. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 613, column 18. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 623, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 624, column 29. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 627, column 43. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 629, column 39. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 630, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 634, column 22. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 670, column 8. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 708, column 15. Don't use whitespace at the end of lines. (Severity: 1) -64 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 711, column 10. Unnamed numeric literals make code less maintainable. (Severity: 2) -Builtin function called with parentheses at line 723, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 724, column 18. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 727, column 21. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 728, column 1. See pages 208,278 of PBP. (Severity: 1) -Quotes used with an empty string at line 734, column 61. See page 53 of PBP. (Severity: 2) -5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 762, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) -5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 763, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) -Postfix control "if" used at line 772, column 15. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 772, column 36. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 773, column 21. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 773, column 44. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 779, column 25. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 784, column 24. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 784, column 46. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 786, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 788, column 1. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 791, column 25. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 795, column 23. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 798, column 15. See pages 93,94 of PBP. (Severity: 2) -100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 801, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) -100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 802, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) -Useless interpolation of literal string at line 804, column 26. See page 51 of PBP. (Severity: 1) -993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 805, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) -143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 805, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) -Useless interpolation of literal string at line 807, column 26. See page 51 of PBP. (Severity: 1) -993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 808, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) -143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 808, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) -Postfix control "if" used at line 810, column 31. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 811, column 12. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 824, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 825, column 5. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 825, column 10. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 825, column 46. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 832, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 833, column 26. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 843, column 9. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 849, column 9. See pages 208,278 of PBP. (Severity: 1) -3 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 850, column 21. Unnamed numeric literals make code less maintainable. (Severity: 2) -Builtin function called with parentheses at line 853, column 49. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 855, column 17. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 857, column 22. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 858, column 18. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 864, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 869, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 869, column 8. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 875, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 875, column 8. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 878, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 883, column 5. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 888, column 5. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 895, column 5. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 902, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 903, column 14. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 906, column 24. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 910, column 24. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 916, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 917, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 920, column 1. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 923, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 924, column 17. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 925, column 22. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 929, column 13. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 930, column 13. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 932, column 21. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 933, column 21. See page 13 of PBP. (Severity: 1) -Long number not separated with underscores at line 937, column 20. See page 59 of PBP. (Severity: 2) -Useless interpolation of literal string at line 939, column 16. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 939, column 30. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 939, column 44. See page 51 of PBP. (Severity: 1) -Postfix control "unless" used at line 939, column 57. See pages 96,97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 944, column 34. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 950, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 951, column 1. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 957, column 16. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 963, column 16. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 966, column 19. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 967, column 50. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 969, column 22. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 970, column 22. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 974, column 26. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 976, column 20. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 977, column 21. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 981, column 27. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 981, column 49. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 982, column 20. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 989, column 66. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 995, column 66. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1001, column 18. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1002, column 18. See page 51 of PBP. (Severity: 1) -Postfix control "unless" used at line 1006, column 43. See pages 96,97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1007, column 1. See pages 208,278 of PBP. (Severity: 1) -Postfix control "unless" used at line 1008, column 43. See pages 96,97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1009, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1011, column 1. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1011, column 7. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1011, column 34. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1011, column 34. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1012, column 1. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1012, column 7. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1012, column 34. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1012, column 34. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1015, column 15. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1022, column 73. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1023, column 46. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1024, column 34. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1025, column 54. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1026, column 28. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1045, column 2. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1046, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1048, column 5. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1048, column 39. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1050, column 6. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1053, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1056, column 29. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1058, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1060, column 6. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1068, column 10. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1075, column 6. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1077, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1077, column 33. See page 237 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1079, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1083, column 6. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1085, column 32. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1086, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1086, column 33. See page 237 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1088, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1095, column 22. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1097, column 4. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1103, column 29. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1113, column 21. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1117, column 40. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1118, column 40. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1120, column 27. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1121, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1122, column 43. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1125, column 1. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1126, column 1. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1143, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1144, column 34. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1154, column 58. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1155, column 55. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1156, column 11. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 1160, column 15. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1162, column 1. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1162, column 6. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1167, column 1. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1167, column 6. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1168, column 3. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1168, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1169, column 25. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1169, column 62. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1170, column 3. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1175, column 1. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1175, column 42. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1178, column 32. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1181, column 1. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1196, column 2. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1201, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1202, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1203, column 9. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1206, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1208, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1211, column 44. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1212, column 57. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1216, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1222, column 3. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1223, column 3. See page 97 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1227, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1229, column 22. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1230, column 3. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1231, column 3. See page 97 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1233, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1242, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1243, column 26. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1248, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1252, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1253, column 26. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1258, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1262, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 1263, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1264, column 50. See page 53 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1270, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1272, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1274, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1274, column 9. See page 51 of PBP. (Severity: 1) -Double-sigil dereference at line 1274, column 39. See page 228 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1274, column 70. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 1276, column 50. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1278, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1281, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1285, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 1286, column 49. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 1287, column 30. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1288, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1294, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1298, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1301, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1305, column 57. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1308, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1311, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1315, column 77. See pages 93,94 of PBP. (Severity: 2) -Double-sigil dereference at line 1318, column 2. See page 228 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1319, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1322, column 48. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1322, column 57. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1322, column 73. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1323, column 5. See pages 93,94 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1326, column 51. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1326, column 60. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1326, column 76. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1327, column 3. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1330, column 2. See page 97 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1333, column 21. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1333, column 53. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1341, column 9. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1342, column 38. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1343, column 4. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1350, column 4. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1352, column 38. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1359, column 36. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1361, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1363, column 19. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1364, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1366, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1368, column 79. See pages 93,94 of PBP. (Severity: 2) -Double-sigil dereference at line 1372, column 2. See page 228 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1376, column 48. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1376, column 57. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1376, column 73. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1377, column 3. See pages 93,94 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1380, column 51. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1380, column 60. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1380, column 76. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1381, column 3. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1385, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 1389, column 37. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1390, column 9. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1391, column 25. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1397, column 4. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1400, column 36. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1402, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1403, column 9. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1403, column 107. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1404, column 10. See pages 93,94 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1405, column 19. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1409, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1410, column 32. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1411, column 53. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1412, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1414, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1415, column 32. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1416, column 53. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1418, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1419, column 33. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1423, column 4. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1424, column 4. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 1424, column 33. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1425, column 4. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1432, column 4. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1433, column 39. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1436, column 18. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1437, column 38. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1440, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1441, column 23. See page 13 of PBP. (Severity: 1) -"unless" block used at line 1446, column 4. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1446, column 12. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 1448, column 45. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1448, column 45. See page 51 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1449, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1449, column 31. See page 237 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1450, column 5. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1451, column 7. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1452, column 5. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 1452, column 32. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1453, column 5. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1460, column 4. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1461, column 25. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 1461, column 52. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1462, column 4. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1469, column 4. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1470, column 39. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1473, column 18. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1474, column 38. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1478, column 19. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1479, column 10. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1483, column 4. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1483, column 13. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 1484, column 49. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1484, column 49. See page 51 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1485, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1485, column 31. See page 237 of PBP. (Severity: 2) -"unless" block used at line 1486, column 5. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1496, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1499, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1501, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1504, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1505, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1508, column 25. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1511, column 38. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1514, column 34. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1515, column 41. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 1515, column 70. See pages 93,94 of PBP. (Severity: 2) -Code structure is deeply nested at line 1516, column 41. Consider refactoring. (Severity: 3) -"unless" block used at line 1516, column 41. See page 97 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1523, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1526, column 4. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1527, column 39. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1530, column 18. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1531, column 38. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1534, column 59. Don't use whitespace at the end of lines. (Severity: 1) -"unless" block used at line 1549, column 3. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1549, column 11. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1552, column 42. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1553, column 26. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1566, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1569, column 44. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1573, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 1584, column 47. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1585, column 44. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 1585, column 59. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1586, column 4. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1587, column 4. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1590, column 23. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1593, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1606, column 56. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1608, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1616, column 34. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1617, column 18. See pages 208,278 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 1622, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1624, column 3. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1625, column 3. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1628, column 3. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 1629, column 3. See page 97 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1632, column 19. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1640, column 10. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1642, column 10. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1646, column 1. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1647, column 18. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1654, column 51. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1655, column 51. See page 51 of PBP. (Severity: 1) -Postfix control "unless" used at line 1658, column 20. See pages 96,97 of PBP. (Severity: 2) -Postfix control "unless" used at line 1659, column 20. See pages 96,97 of PBP. (Severity: 2) -Postfix control "if" used at line 1663, column 17. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 1673, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Too many arguments at line 1683, column 1. See page 182 of PBP. (Severity: 3) -Useless interpolation of literal string at line 1686, column 41. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1690, column 45. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1690, column 58. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1691, column 45. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1691, column 58. See page 53 of PBP. (Severity: 2) -Too many arguments at line 1698, column 1. See page 182 of PBP. (Severity: 3) -Found "\N{SPACE}" at the end of the line at line 1700, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1703, column 9. See pages 208,278 of PBP. (Severity: 1) -Too many arguments at line 1708, column 1. See page 182 of PBP. (Severity: 3) -Found "\N{SPACE}" at the end of the line at line 1711, column 31. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1718, column 31. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1721, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1723, column 22. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 1723, column 28. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1724, column 22. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 1724, column 28. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1727, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1733, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 1736, column 26. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1746, column 28. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1746, column 28. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1748, column 19. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1750, column 27. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1751, column 27. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1752, column 31. See page 51 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1754, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1754, column 17. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 1764, column 55. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1764, column 55. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1765, column 74. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1765, column 74. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1770, column 17. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1770, column 17. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 1770, column 58. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1771, column 17. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1771, column 17. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1781, column 28. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1783, column 10. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1787, column 21. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1788, column 21. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1789, column 21. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1790, column 12. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1790, column 34. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1791, column 28. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1792, column 28. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1793, column 32. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1794, column 23. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1794, column 34. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1795, column 18. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1795, column 25. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1795, column 36. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1802, column 23. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1802, column 23. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1802, column 28. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1804, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1810, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1810, column 9. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1815, column 16. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1821, column 12. See page 13 of PBP. (Severity: 1) -Subroutine "modules_VERSION" is not all lower case or all upper case at line 1825, column 1. See pages 45,46 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1830, column 77. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1830, column 77. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1831, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1833, column 65. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1833, column 65. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1834, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1836, column 73. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1836, column 73. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1837, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1839, column 77. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1839, column 77. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1840, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1842, column 76. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1842, column 76. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1843, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1845, column 68. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1845, column 68. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1846, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1848, column 67. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1848, column 67. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1849, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1851, column 77. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1851, column 77. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1852, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1854, column 79. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1854, column 79. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1855, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1857, column 71. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1857, column 71. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1858, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1860, column 69. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1860, column 69. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1861, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1863, column 65. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1863, column 65. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1864, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1866, column 67. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1866, column 67. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1867, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1869, column 67. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1869, column 67. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1870, column 2. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1872, column 69. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 1872, column 69. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1873, column 2. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1883, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 1886, column 13. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 1887, column 15. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1887, column 15. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 1888, column 4. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1889, column 4. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1889, column 33. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 1891, column 4. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 1899, column 5. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1903, column 43. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 1906, column 5. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1910, column 44. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 1917, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1928, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1936, column 2. See pages 208,278 of PBP. (Severity: 1) -Too many arguments at line 1942, column 1. See page 182 of PBP. (Severity: 3) -Local lexical variable "$SSL_version" is not all lower case or all upper case at line 1943, column 2. See pages 45,46 of PBP. (Severity: 1) -Postfix control "if" used at line 1946, column 19. See pages 93,94 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 1951, column 17. See page 79 of PBP. (Severity: 2) -Postfix control "if" used at line 1956, column 29. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 1963, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1963, column 8. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1964, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1964, column 8. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1964, column 35. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1964, column 35. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1966, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1966, column 8. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 1967, column 2. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 1967, column 8. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 1967, column 35. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 1967, column 35. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 1976, column 48. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1980, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1981, column 14. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 1988, column 48. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 1992, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 1993, column 14. See pages 93,94 of PBP. (Severity: 2) -Too many arguments at line 1997, column 1. See page 182 of PBP. (Severity: 3) -Found "\N{SPACE}" at the end of the line at line 1999, column 45. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2000, column 39. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2007, column 43. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2008, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 2012, column 35. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2012, column 38. See page 13 of PBP. (Severity: 1) -Local lexical variable "$Side" is not all lower case or all upper case at line 2020, column 2. See pages 45,46 of PBP. (Severity: 1) -Local lexical variable "$SSL_version" is not all lower case or all upper case at line 2020, column 2. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2020, column 45. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2021, column 39. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2025, column 13. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 2029, column 17. See page 79 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2030, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2033, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2038, column 4. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 2044, column 22. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2045, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2047, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2048, column 2. See pages 208,278 of PBP. (Severity: 1) -Too many arguments at line 2053, column 1. See page 182 of PBP. (Severity: 3) -Local lexical variable "$Side" is not all lower case or all upper case at line 2055, column 2. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2056, column 52. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2057, column 39. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2064, column 38. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2064, column 38. See page 51 of PBP. (Severity: 1) -Postfix control "unless" used at line 2067, column 51. See pages 96,97 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2070, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 2071, column 32. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 2072, column 35. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2073, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 2074, column 32. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2074, column 36. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2077, column 1. Don't use whitespace at the end of lines. (Severity: 1) -"unless" block used at line 2078, column 2. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2081, column 3. See page 13 of PBP. (Severity: 1) -File handle for "print" or "printf" is not braced at line 2086, column 4. See page 217 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2086, column 4. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2088, column 3. See pages 208,278 of PBP. (Severity: 1) -Quotes used with an empty string at line 2089, column 24. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2089, column 24. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2098, column 25. See page 13 of PBP. (Severity: 1) -Local lexical variable "$Side" is not all lower case or all upper case at line 2108, column 2. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2109, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2113, column 3. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2115, column 3. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2117, column 3. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2120, column 4. See pages 208,278 of PBP. (Severity: 1) -Local lexical variable "$SSL_version" is not all lower case or all upper case at line 2128, column 2. See pages 45,46 of PBP. (Severity: 1) -Quotes used with an empty string at line 2132, column 40. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2134, column 43. Don't use whitespace at the end of lines. (Severity: 1) -Too many arguments at line 2143, column 1. See page 182 of PBP. (Severity: 3) -Local lexical variable "$Side" is not all lower case or all upper case at line 2144, column 2. See pages 45,46 of PBP. (Severity: 1) -Local lexical variable "$SSL_version" is not all lower case or all upper case at line 2144, column 2. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2144, column 45. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2145, column 39. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2150, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2152, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 2154, column 19. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2164, column 2. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 2166, column 41. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2169, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2179, column 22. See page 13 of PBP. (Severity: 1) -Numeric escapes in interpolated string at line 2179, column 30. See page 56 of PBP. (Severity: 2) -Quotes used with an empty string at line 2181, column 41. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2181, column 41. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2191, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2193, column 22. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2194, column 19. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2194, column 27. See page 51 of PBP. (Severity: 1) -Local lexical variable "$URLparm" is not all lower case or all upper case at line 2195, column 9. See pages 45,46 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2195, column 23. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2195, column 31. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2196, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2199, column 26. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 2199, column 32. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2199, column 32. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2201, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2208, column 39. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2212, column 65. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2212, column 65. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2213, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2215, column 25. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2215, column 25. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2218, column 39. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2218, column 39. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2220, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2223, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2227, column 82. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2227, column 82. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2228, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2230, column 63. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2231, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2234, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2236, column 32. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2236, column 32. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2236, column 45. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2236, column 45. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2236, column 61. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2236, column 61. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 2239, column 22. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2239, column 22. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2242, column 39. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2242, column 39. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2244, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2247, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2249, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2251, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2253, column 41. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2253, column 41. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2266, column 24. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2266, column 29. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2266, column 29. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2266, column 32. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2267, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2268, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2269, column 5. See page 51 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 2272, column 5. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2281, column 26. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2282, column 8. See page 79 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2287, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2289, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2290, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2292, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2293, column 17. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2294, column 3. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2296, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2299, column 2. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2300, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2303, column 1. Don't use whitespace at the end of lines. (Severity: 1) -File handle for "print" or "printf" is not braced at line 2304, column 2. See page 217 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2304, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of "close" ignored at line 2305, column 2. Check the return value of "close" for success. (Severity: 2) -Return value of flagged function ignored - close at line 2305, column 2. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2306, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2308, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2313, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2314, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2319, column 2. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2321, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Magic punctuation variable used in interpolated string at line 2325, column 12. See page 79 of PBP. (Severity: 2) -Subroutine "fix_Inbox_INBOX_mapping" is not all lower case or all upper case at line 2330, column 1. See pages 45,46 of PBP. (Severity: 1) -Quotes used with an empty string at line 2333, column 14. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2335, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2336, column 79. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 2337, column 79. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2338, column 79. See page 51 of PBP. (Severity: 1) -Subroutine "tests_fix_Inbox_INBOX_mapping" is not all lower case or all upper case at line 2343, column 1. See pages 45,46 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2346, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2347, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2348, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2349, column 6. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2350, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2351, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2352, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2353, column 6. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2354, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2355, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2356, column 25. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 2357, column 6. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2358, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2359, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2360, column 25. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 2361, column 6. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2362, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2363, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2364, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2365, column 6. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2366, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2367, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2368, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2369, column 6. See page 53 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 2377, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2377, column 8. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2391, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2391, column 8. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2405, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2406, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2407, column 27. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2409, column 17. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2414, column 4. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2414, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2452, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2453, column 10. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2459, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2463, column 10. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2468, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2472, column 10. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2477, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2478, column 22. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2478, column 48. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2479, column 22. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2479, column 52. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2480, column 21. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2481, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2482, column 10. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2483, column 10. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 2490, column 28. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2492, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 2494, column 26. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2495, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 2503, column 36. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2504, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2511, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2513, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2527, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2528, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2529, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2530, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2531, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2532, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2533, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2534, column 46. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2537, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2538, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2539, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2540, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2541, column 43. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2543, column 50. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2547, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2548, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2548, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2549, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2549, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2550, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2550, column 34. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2551, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2551, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2552, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2552, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2553, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2553, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2553, column 38. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2554, column 26. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2554, column 32. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2554, column 32. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2554, column 37. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2554, column 47. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2554, column 52. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2555, column 31. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2555, column 37. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2555, column 37. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2555, column 42. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2555, column 52. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2555, column 57. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2564, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2566, column 7. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2567, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2572, column 30. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2578, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2578, column 8. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2579, column 5. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2579, column 47. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2591, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2592, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2593, column 7. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2594, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2599, column 29. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2602, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2602, column 8. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2603, column 5. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2603, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2604, column 22. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2609, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2610, column 5. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2610, column 47. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2620, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2626, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2632, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with a noisy string at line 2637, column 49. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2638, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2647, column 16. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2647, column 21. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2654, column 11. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2655, column 11. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2655, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2656, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2656, column 42. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2657, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2658, column 6. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 30. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 34. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2659, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2659, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2660, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2660, column 51. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2661, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2661, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2662, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2662, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2663, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2663, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2664, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2664, column 55. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2666, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2666, column 55. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2668, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2668, column 55. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 2676, column 27. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2676, column 54. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2676, column 86. See page 13 of PBP. (Severity: 1) -Numeric escapes in interpolated string at line 2678, column 12. See page 56 of PBP. (Severity: 2) -Use only '//' or '{}' to delimit regexps at line 2681, column 14. See page 246 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 2681, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2681, column 14. See page 237 of PBP. (Severity: 2) -Use only '//' or '{}' to delimit regexps at line 2682, column 14. See page 246 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 2682, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2682, column 14. See page 237 of PBP. (Severity: 2) -Use only '//' or '{}' to delimit regexps at line 2683, column 14. See page 246 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 2683, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2683, column 14. See page 237 of PBP. (Severity: 2) -Use only '//' or '{}' to delimit regexps at line 2684, column 21. See page 246 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 2684, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2684, column 21. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 2684, column 30. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2684, column 49. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2684, column 74. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2686, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2691, column 27. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2692, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2693, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2704, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2704, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2711, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2711, column 28. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 2721, column 17. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2722, column 45. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 2726, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2726, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2733, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2734, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2735, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2735, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2742, column 14. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2756, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2756, column 13. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2761, column 34. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "unless" used at line 2762, column 4. See pages 96,97 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2762, column 26. See page 51 of PBP. (Severity: 1) -Use 'eq' or hash instead of fixed-pattern regexps at line 2762, column 62. See pages 271,272 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2762, column 62. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2762, column 62. See page 237 of PBP. (Severity: 2) -Expression form of "eval" at line 2768, column 13. See page 161 of PBP. (Severity: 5) -Builtin function called with parentheses at line 2768, column 13. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2770, column 28. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used at line 2770, column 49. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2771, column 14. See page 79 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2780, column 28. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2788, column 42. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2788, column 42. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 2789, column 17. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2789, column 21. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 2800, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 2801, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2805, column 3. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2806, column 47. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2807, column 11. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2807, column 11. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2810, column 47. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2811, column 11. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 2811, column 11. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2814, column 1. Don't use whitespace at the end of lines. (Severity: 1) -"unless" block used at line 2815, column 3. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 2816, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2816, column 9. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2822, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2825, column 14. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 2827, column 3. See page 228 of PBP. (Severity: 2) -Postfix control "if" used at line 2827, column 35. See pages 93,94 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2830, column 32. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2830, column 71. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2830, column 71. See page 79 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2833, column 59. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 2833, column 100. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2833, column 100. See page 79 of PBP. (Severity: 2) -Double-sigil dereference at line 2835, column 15. See page 228 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2836, column 59. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2841, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 2842, column 3. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2842, column 11. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2843, column 3. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2843, column 11. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2844, column 3. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2849, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2850, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2851, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2852, column 2. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2877, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2878, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2879, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2879, column 23. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2879, column 28. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2880, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2880, column 42. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 2883, column 19. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 2883, column 41. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2884, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2886, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2886, column 35. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2886, column 59. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2887, column 16. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2888, column 37. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2888, column 61. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2888, column 91. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2889, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2891, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2892, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2892, column 37. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2892, column 92. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2893, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2895, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2895, column 41. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2895, column 120. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2896, column 5. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2896, column 43. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2896, column 133. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2898, column 16. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2899, column 67. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2901, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2902, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2903, column 64. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2904, column 51. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2905, column 43. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2907, column 16. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2908, column 55. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2909, column 64. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2910, column 52. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2912, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2913, column 16. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2913, column 49. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2914, column 2. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2915, column 63. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2916, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2917, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2918, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2919, column 83. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2920, column 61. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2921, column 72. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2922, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2923, column 16. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2924, column 77. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2926, column 78. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2927, column 1. Don't use whitespace at the end of lines. (Severity: 1) -List declaration without trailing comma at line 2928, column 15. See page 17 of PBP. (Severity: 1) -String *may* require interpolation at line 2929, column 2. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2930, column 2. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2930, column 42. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2931, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2934, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2935, column 63. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2936, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2937, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2938, column 59. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2939, column 83. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2940, column 61. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2941, column 72. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 2942, column 5. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2942, column 48. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2943, column 1. Don't use whitespace at the end of lines. (Severity: 1) -List declaration without trailing comma at line 2944, column 15. See page 17 of PBP. (Severity: 1) -String *may* require interpolation at line 2945, column 2. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 2946, column 2. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2946, column 80. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2947, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2950, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2951, column 28. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2952, column 17. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2952, column 67. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 2953, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2953, column 23. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2953, column 28. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 2954, column 5. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2954, column 7. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2955, column 17. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 2955, column 48. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2956, column 46. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2957, column 65. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2958, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 2959, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2961, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2963, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2964, column 28. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2965, column 17. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2965, column 67. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2966, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2967, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2968, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2968, column 23. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 2968, column 28. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2969, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 2970, column 5. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 2970, column 7. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 2971, column 17. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2971, column 47. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2972, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2973, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2974, column 46. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 2975, column 64. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 2976, column 2. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 2977, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Expression form of "eval" at line 2986, column 13. See page 161 of PBP. (Severity: 5) -Builtin function called with parentheses at line 2986, column 13. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used at line 2988, column 45. See page 79 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 2989, column 4. See pages 208,278 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 2989, column 10. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3000, column 14. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3002, column 14. See page 79 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3003, column 15. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 3003, column 37. See page 228 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3003, column 49. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 3003, column 54. See page 228 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3004, column 26. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3005, column 35. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 3006, column 4. See pages 208,278 of PBP. (Severity: 1) -"unless" block used at line 3009, column 4. See page 97 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 3010, column 5. See pages 208,278 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 3012, column 16. See page 79 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3021, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3023, column 5. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3023, column 82. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3025, column 95. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3027, column 23. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3028, column 32. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3033, column 5. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3041, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3041, column 17. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3044, column 28. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3044, column 28. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 3045, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3050, column 17. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3056, column 6. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3059, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3061, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3068, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3069, column 14. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 3069, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3069, column 21. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3070, column 38. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3070, column 44. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3073, column 18. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3073, column 24. See page 53 of PBP. (Severity: 2) -Subroutine "flagsCase" is not all lower case or all upper case at line 3078, column 1. See pages 45,46 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3080, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3081, column 14. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 3081, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3081, column 21. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3082, column 34. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3082, column 40. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3083, column 53. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3083, column 78. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3085, column 18. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3085, column 24. See page 53 of PBP. (Severity: 2) -Subroutine "tests_flagsCase" is not all lower case or all upper case at line 3090, column 1. See pages 45,46 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3096, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3105, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3106, column 31. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3107, column 41. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 3107, column 67. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3107, column 77. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3108, column 41. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3108, column 69. See page 13 of PBP. (Severity: 1) -Subroutine "select_msgs" does not end with "return" at line 3127, column 1. See page 197 of PBP. (Severity: 4) -Found "\N{SPACE}" at the end of the line at line 3131, column 24. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3142, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3148, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3149, column 18. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3149, column 45. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3149, column 72. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3155, column 49. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3156, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3157, column 22. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3161, column 26. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3161, column 53. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3161, column 80. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3165, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3166, column 14. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3180, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3189, column 46. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3190, column 40. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3193, column 45. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3194, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3195, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3199, column 18. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3199, column 45. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3199, column 72. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3202, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3203, column 14. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 3204, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3211, column 7. See page 13 of PBP. (Severity: 1) -Long number not separated with underscores at line 3211, column 63. See page 59 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3212, column 7. See page 13 of PBP. (Severity: 1) -Long number not separated with underscores at line 3212, column 63. See page 59 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3216, column 8. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3217, column 4. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3219, column 8. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3220, column 4. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3229, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3231, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3232, column 7. See page 13 of PBP. (Severity: 1) -Long number not separated with underscores at line 3233, column 45. See page 59 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3235, column 7. See page 13 of PBP. (Severity: 1) -Long number not separated with underscores at line 3236, column 46. See page 59 of PBP. (Severity: 2) -Double-sigil dereference at line 3247, column 9. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3248, column 9. See page 228 of PBP. (Severity: 2) -"unless" block used at line 3251, column 3. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3251, column 11. See page 13 of PBP. (Severity: 1) -"unless" block used at line 3252, column 3. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3252, column 11. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3253, column 26. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3255, column 31. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3256, column 31. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3261, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3266, column 1. See page 197 of PBP. (Severity: 4) -Found "\t" at the end of the line at line 3288, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3299, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3302, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3303, column 7. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3313, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 3314, column 22. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 3316, column 3. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 3322, column 3. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3334, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Subroutine "copy_message" with high complexity score (21) at line 3343, column 1. Consider refactoring. (Severity: 3) -Too many arguments at line 3343, column 1. See page 182 of PBP. (Severity: 3) -Found "\t" at the end of the line at line 3345, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3349, column 42. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3350, column 42. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 3350, column 54. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 3351, column 42. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 3351, column 61. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3352, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3353, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3358, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 3359, column 7. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 3359, column 41. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 3360, column 2. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 3360, column 95. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3362, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3370, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3372, column 16. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3372, column 44. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 3376, column 11. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3376, column 88. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3383, column 31. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3388, column 31. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 3391, column 19. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3391, column 35. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 3391, column 35. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3392, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3399, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Too many arguments at line 3403, column 1. See page 182 of PBP. (Severity: 3) -Found "\N{SPACE}" at the end of the line at line 3405, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3407, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3408, column 60. See page 53 of PBP. (Severity: 2) -"unless" block used at line 3410, column 2. See page 97 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3410, column 11. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3413, column 24. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 3415, column 34. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3420, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3424, column 28. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 3425, column 18. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3426, column 80. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3432, column 62. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3439, column 25. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3440, column 3. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 3440, column 3. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3440, column 17. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3443, column 49. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 3443, column 49. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3451, column 16. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 3451, column 16. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3459, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 3461, column 41. See page 51 of PBP. (Severity: 1) -Use only '//' or '{}' to delimit regexps at line 3473, column 15. See page 246 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 3473, column 15. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3473, column 15. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 3478, column 37. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 3479, column 64. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3480, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3486, column 16. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3487, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3490, column 60. Don't use whitespace at the end of lines. (Severity: 1) -Subroutine "tests_subject" does not end with "return" at line 3497, column 1. See page 197 of PBP. (Severity: 4) -Quotes used with an empty string at line 3498, column 6. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3498, column 21. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 3501, column 63. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 3538, column 6. See page 53 of PBP. (Severity: 2) -Too many arguments at line 3560, column 1. See page 182 of PBP. (Severity: 3) -Found "\t" at the end of the line at line 3562, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3569, column 58. See page 53 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 3570, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3571, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 3581, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3581, column 20. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3592, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3593, column 4. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3593, column 70. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3595, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 3596, column 75. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3596, column 75. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3598, column 44. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 3621, column 2. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 3625, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3633, column 10. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3634, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3638, column 17. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3638, column 26. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3652, column 41. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3653, column 42. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3654, column 42. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3662, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3665, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 3666, column 2. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3666, column 22. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3667, column 2. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3667, column 22. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3668, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 3669, column 26. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3672, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3673, column 72. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3678, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3683, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3686, column 6. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3694, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3696, column 12. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3720, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3723, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 3726, column 37. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3727, column 37. See page 228 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3740, column 23. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3740, column 23. See page 237 of PBP. (Severity: 2) -String *may* require interpolation at line 3748, column 6. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3748, column 32. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3748, column 43. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3749, column 6. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3749, column 37. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3749, column 50. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3758, column 16. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3765, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 3767, column 50. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3770, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3773, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 3774, column 18. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 3774, column 25. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3775, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3776, column 38. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3778, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3780, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3790, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3794, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3807, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3808, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3813, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3814, column 35. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 68. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 35. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 68. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 90. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3816, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 3819, column 37. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3820, column 37. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3827, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3836, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3837, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 3841, column 15. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3841, column 47. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3841, column 72. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3842, column 14. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3842, column 38. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3843, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3856, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3861, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3862, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 43. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 76. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 43. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 76. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 87. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3864, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 3865, column 33. See page 51 of PBP. (Severity: 1) -Double-sigil dereference at line 3866, column 34. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3867, column 34. See page 228 of PBP. (Severity: 2) -String *may* require interpolation at line 3870, column 9. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3871, column 9. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3872, column 11. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 3873, column 11. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 3880, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 3882, column 16. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3882, column 16. See page 237 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3894, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3895, column 47. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3898, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3902, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3924, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3926, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 3927, column 78. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3928, column 21. See page 228 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3931, column 19. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 3931, column 102. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 3934, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3935, column 14. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 3940, column 4. See page 13 of PBP. (Severity: 1) -Quotes used with a noisy string at line 3940, column 29. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3940, column 29. See page 79 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3943, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3952, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3965, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 3972, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 3977, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3979, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3980, column 24. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 3982, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 3984, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3985, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3986, column 24. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 3989, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4003, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4016, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4023, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4028, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4030, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4031, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4032, column 24. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4034, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4036, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4037, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4038, column 24. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4040, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4041, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4042, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4044, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4058, column 25. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4060, column 52. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4080, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 4086, column 18. See pages 208,278 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4103, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with a noisy string at line 4104, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4105, column 25. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4106, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4110, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4119, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4120, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4120, column 20. See page 237 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4136, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4137, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4137, column 13. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 4143, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4143, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4143, column 36. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4144, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4145, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4148, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4149, column 60. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4155, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4156, column 5. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4156, column 27. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4156, column 38. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4159, column 11. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4159, column 30. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4159, column 45. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4160, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4162, column 5. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4162, column 27. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4162, column 38. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4163, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4165, column 35. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4166, column 51. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4167, column 5. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4168, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4170, column 15. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4170, column 17. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4171, column 15. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4173, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4174, column 15. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4174, column 46. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4175, column 15. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4177, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4178, column 22. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4178, column 53. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4179, column 22. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4181, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4182, column 31. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4182, column 62. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4183, column 31. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4185, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4186, column 15. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 4187, column 15. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4187, column 17. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4188, column 15. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4190, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4191, column 15. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4191, column 17. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4192, column 15. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4194, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4195, column 22. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4195, column 53. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4196, column 22. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4198, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4200, column 15. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 4200, column 15. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 4200, column 31. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4200, column 62. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4201, column 31. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4203, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 4225, column 14. See page 51 of PBP. (Severity: 1) -Expression form of "eval" at line 4317, column 13. See page 161 of PBP. (Severity: 5) -Builtin function called with parentheses at line 4317, column 13. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used at line 4319, column 38. See page 79 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 4320, column 4. See pages 208,278 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 4320, column 10. See page 79 of PBP. (Severity: 2) -Long number not separated with underscores at line 4333, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4334, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4336, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4337, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4339, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4340, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4342, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4343, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4345, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4346, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4348, column 49. See page 59 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4349, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4354, column 27. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4357, column 23. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4358, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4361, column 29. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4361, column 38. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4361, column 66. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4365, column 29. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4365, column 38. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4369, column 22. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4369, column 30. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4373, column 22. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4373, column 31. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4376, column 22. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4376, column 31. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4385, column 13. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4388, column 22. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4389, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4391, column 47. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4392, column 67. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4397, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4398, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4399, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4400, column 2. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4401, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4402, column 2. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 4402, column 65. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 4403, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4404, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4405, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4406, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4407, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4408, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4409, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4410, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4411, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4414, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4417, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4420, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4423, column 9. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4427, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4428, column 2. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4429, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4430, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4431, column 2. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4432, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4435, column 2. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4438, column 2. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4442, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4444, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4445, column 2. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 4461, column 31. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4462, column 41. Don't use whitespace at the end of lines. (Severity: 1) -Too many arguments at line 4472, column 1. See page 182 of PBP. (Severity: 3) -Found "\t" at the end of the line at line 4474, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4476, column 17. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4476, column 24. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 4476, column 29. See page 228 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4478, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 4480, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4481, column 24. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4483, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4486, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4487, column 29. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4487, column 37. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 4487, column 43. See page 228 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4495, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4497, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4498, column 55. See page 51 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4500, column 3. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4501, column 15. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4502, column 22. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4506, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4507, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4508, column 33. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4509, column 33. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4510, column 10. See page 13 of PBP. (Severity: 1) -Postfix control "unless" used at line 4510, column 29. See pages 96,97 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4534, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4536, column 23. See page 13 of PBP. (Severity: 1) -Double-sigil dereference at line 4536, column 29. See page 228 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4537, column 31. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4537, column 51. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4538, column 31. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4541, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4543, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4546, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4547, column 30. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4547, column 30. See page 237 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4560, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4562, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4562, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4565, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4565, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4568, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4568, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4571, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4571, column 24. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4574, column 59. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 4574, column 98. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4574, column 98. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4579, column 27. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 4587, column 37. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4587, column 41. See page 53 of PBP. (Severity: 2) -Numeric escapes in interpolated string at line 4592, column 51. See page 56 of PBP. (Severity: 2) -Quotes used with an empty string at line 4602, column 21. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 4602, column 21. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4603, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4604, column 9. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 4604, column 52. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4606, column 9. Check the return value of "close" for success. (Severity: 2) -Return value of flagged function ignored - close at line 4606, column 9. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4615, column 2. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 4615, column 46. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4617, column 2. Check the return value of "close" for success. (Severity: 2) -Return value of flagged function ignored - close at line 4617, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4618, column 9. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 4618, column 14. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4624, column 2. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 4624, column 67. See page 79 of PBP. (Severity: 2) -File handle for "print" or "printf" is not braced at line 4625, column 2. See page 217 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4625, column 2. See pages 208,278 of PBP. (Severity: 1) -Return value of "close" ignored at line 4626, column 2. Check the return value of "close" for success. (Severity: 2) -Return value of flagged function ignored - close at line 4626, column 2. See pages 208,278 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4640, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4641, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4641, column 21. See page 237 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4651, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4653, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4657, column 10. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 4662, column 21. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4664, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4665, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4665, column 24. See page 237 of PBP. (Severity: 2) -Useless interpolation of literal string at line 4668, column 30. See page 51 of PBP. (Severity: 1) -Magic punctuation variable used at line 4682, column 18. See page 79 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4687, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4690, column 42. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4691, column 13. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4691, column 34. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4697, column 17. Don't use whitespace at the end of lines. (Severity: 1) -File handle for "print" or "printf" is not braced at line 4700, column 2. See page 217 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 4700, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4705, column 2. See page 13 of PBP. (Severity: 1) -Return value of "close" ignored at line 4705, column 2. Check the return value of "close" for success. (Severity: 2) -Return value of flagged function ignored - close at line 4705, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4707, column 2. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4715, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4718, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4722, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4724, column 60. See page 51 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated string at line 4725, column 20. See page 79 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4727, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4729, column 3. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4735, column 3. See page 13 of PBP. (Severity: 1) -Magic punctuation variable used at line 4739, column 23. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used at line 4741, column 7. See page 79 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4741, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4741, column 13. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4745, column 4. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4755, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 4756, column 15. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 4756, column 20. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 4756, column 20. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4756, column 23. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4757, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4758, column 11. See page 53 of PBP. (Severity: 2) -Useless interpolation of literal string at line 4758, column 11. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4758, column 15. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4762, column 11. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4762, column 24. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4763, column 19. See page 51 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 4778, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4788, column 13. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4801, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4804, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String delimiter used with "split" at line 4810, column 28. Express it as a regex instead. (Severity: 2) -Builtin function called with parentheses at line 4810, column 28. See page 13 of PBP. (Severity: 1) -Quotes used with a noisy string at line 4810, column 34. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4815, column 4. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4820, column 4. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4837, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4839, column 29. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4841, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4855, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 4865, column 37. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4866, column 38. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4867, column 43. See page 51 of PBP. (Severity: 1) -Subroutine "remove_Ko" is not all lower case or all upper case at line 4871, column 1. See pages 45,46 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 4873, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4873, column 17. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4882, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4882, column 17. See page 237 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 4906, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4915, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 4918, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 4920, column 13. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4920, column 24. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 4923, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4923, column 17. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4926, column 16. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 4926, column 30. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 4927, column 22. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4927, column 29. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4931, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4932, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4932, column 12. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4944, column 38. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4944, column 72. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4944, column 72. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4945, column 38. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4946, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 4947, column 46. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4948, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4948, column 32. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4949, column 25. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4949, column 33. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4950, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4950, column 32. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 4951, column 30. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4951, column 37. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4952, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4952, column 32. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 4953, column 34. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4953, column 41. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4957, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4958, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4958, column 12. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4966, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4966, column 32. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4967, column 25. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4967, column 33. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4968, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4968, column 32. See page 51 of PBP. (Severity: 1) -Builtin function called with parentheses at line 4969, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4969, column 32. See page 51 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 4974, column 19. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4974, column 19. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 4986, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4987, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4987, column 12. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4993, column 29. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 4994, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 4994, column 32. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 4998, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 4999, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4999, column 12. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5005, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5005, column 32. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5009, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 5010, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5010, column 12. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5015, column 24. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5015, column 32. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5019, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5023, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5026, column 2. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 5031, column 5. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 5073, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 5082, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Double-sigil dereference at line 5083, column 33. See page 228 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5085, column 3. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 5097, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5101, column 35. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 5104, column 8. See page 13 of PBP. (Severity: 1) -Expression form of "eval" at line 5104, column 43. See page 161 of PBP. (Severity: 5) -Builtin function called with parentheses at line 5104, column 43. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 5105, column 4. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 5108, column 8. See page 13 of PBP. (Severity: 1) -Expression form of "eval" at line 5108, column 45. See page 161 of PBP. (Severity: 5) -Builtin function called with parentheses at line 5108, column 45. See page 13 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 5109, column 4. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 5113, column 34. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5114, column 36. See pages 93,94 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 5116, column 4. See pages 208,278 of PBP. (Severity: 1) -Return value of flagged function ignored - print at line 5118, column 4. See pages 208,278 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5127, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 5128, column 26. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 5128, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5128, column 33. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 5129, column 36. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 5136, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 5142, column 1. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5155, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5161, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5165, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Builtin function called with parentheses at line 5167, column 20. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 5167, column 27. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5167, column 27. See page 237 of PBP. (Severity: 2) -Use 'eq' or hash instead of fixed-pattern regexps at line 5171, column 36. See pages 271,272 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5171, column 36. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5171, column 36. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5173, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5173, column 31. See page 237 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5177, column 25. See page 13 of PBP. (Severity: 1) -Regular expression without "/s" flag at line 5179, column 34. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5179, column 34. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 5182, column 65. See pages 93,94 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 5198, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5214, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5215, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5218, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5221, column 26. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5224, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5227, column 28. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5230, column 21. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5235, column 1. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 5244, column 13. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5244, column 60. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5255, column 12. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5256, column 105. Don't use whitespace at the end of lines. (Severity: 1) -String *may* require interpolation at line 5270, column 9. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5273, column 9. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5287, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5288, column 20. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5291, column 26. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5294, column 37. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 5303, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Quotes used with an empty string at line 5308, column 17. See page 53 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5308, column 28. See page 13 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5312, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 5313, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5313, column 20. See page 237 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 5315, column 85. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5318, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 5319, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5319, column 33. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 5320, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5320, column 33. See page 53 of PBP. (Severity: 2) -Found "\N{SPACE}" at the end of the line at line 5321, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5322, column 88. Don't use whitespace at the end of lines. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5324, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Local lexical variable "$header_Message_Id" is not all lower case or all upper case at line 5347, column 2. See pages 45,46 of PBP. (Severity: 1) -String *may* require interpolation at line 5347, column 58. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5352, column 6. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5353, column 6. See page 51 of PBP. (Severity: 1) -Long number not separated with underscores at line 5353, column 55. See page 59 of PBP. (Severity: 2) -Subroutine "tests_Banner" is not all lower case or all upper case at line 5358, column 1. See pages 45,46 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5361, column 50. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5362, column 42. See page 51 of PBP. (Severity: 1) -"$i" is declared but not used at line 5372, column 9. Unused variables clutter code and make it harder to read. (Severity: 3) -Builtin function called with parentheses at line 5374, column 28. See page 13 of PBP. (Severity: 1) -Quotes used with an empty string at line 5383, column 28. See page 53 of PBP. (Severity: 2) -String *may* require interpolation at line 5384, column 36. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5385, column 38. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5386, column 42. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5387, column 28. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5388, column 38. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5389, column 40. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5390, column 41. See page 51 of PBP. (Severity: 1) -Long number not separated with underscores at line 5391, column 40. See page 59 of PBP. (Severity: 2) -String *may* require interpolation at line 5391, column 49. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5392, column 44. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5394, column 46. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5395, column 48. See page 51 of PBP. (Severity: 1) -String *may* require interpolation at line 5396, column 96. See page 51 of PBP. (Severity: 1) -Quotes used with an empty string at line 5403, column 25. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 5404, column 43. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5404, column 51. See page 13 of PBP. (Severity: 1) -Quotes used with a noisy string at line 5405, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5405, column 60. See page 53 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 5406, column 9. See pages 208,278 of PBP. (Severity: 1) -Magic punctuation variable used in interpolated here-document at line 5406, column 15. See page 79 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 5622, column 2. See pages 208,278 of PBP. (Severity: 1) -Builtin function called with parentheses at line 5647, column 15. See page 13 of PBP. (Severity: 1) -Builtin function called with parentheses at line 5648, column 15. See page 13 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5648, column 20. See page 51 of PBP. (Severity: 1) -Quotes used with a noisy string at line 5648, column 20. See page 53 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 5649, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Regular expression without "/s" flag at line 5653, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5653, column 14. See page 237 of PBP. (Severity: 2) -Return value of flagged function ignored - print at line 5654, column 3. See pages 208,278 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5658, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5659, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5660, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5661, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5662, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5663, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5664, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5665, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5666, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5667, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5668, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5669, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5670, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5671, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5672, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5673, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5674, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5675, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5676, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5677, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5678, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5679, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5680, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5681, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5682, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5683, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5684, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5685, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5686, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5687, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5688, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5689, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5690, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5691, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5692, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5693, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5694, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5695, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5696, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5697, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5698, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5699, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5700, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5701, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5702, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5703, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5704, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5705, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5706, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5707, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5708, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5709, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5710, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5711, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5712, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5713, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5714, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5715, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5716, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5717, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5718, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5719, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5720, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5721, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5722, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5723, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5724, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5725, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5726, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5727, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5728, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5729, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5730, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5731, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5732, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5733, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5734, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5735, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5736, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5737, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5738, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5739, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5740, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5741, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5742, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5743, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5744, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5745, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5746, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5747, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5748, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5749, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5750, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5751, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5752, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5753, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5754, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5755, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5756, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5757, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5758, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5759, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5760, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5761, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5762, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5763, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5764, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5765, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5766, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5767, column 8. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5767, column 49. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 5768, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5769, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5770, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5771, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5772, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5773, column 8. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5774, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5775, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5776, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5777, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5778, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5779, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5780, column 36. See page 51 of PBP. (Severity: 1) -Useless interpolation of literal string at line 5781, column 36. See page 51 of PBP. (Severity: 1) -Found "\N{SPACE}" at the end of the line at line 5781, column 73. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 5783, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Return value of flagged function ignored - print at line 5787, column 9. See pages 208,278 of PBP. (Severity: 1) -Postfix control "if" used at line 5787, column 49. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 5788, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Found "\t" at the end of the line at line 5799, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Postfix control "if" used at line 5800, column 12. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5804, column 23. See page 13 of PBP. (Severity: 1) -Postfix control "if" used at line 5804, column 32. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5807, column 9. See page 13 of PBP. (Severity: 1) -Postfix control "unless" used at line 5807, column 30. See pages 96,97 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 5813, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 5815, column 8. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 5815, column 32. See pages 93,94 of PBP. (Severity: 2) -Found "\t" at the end of the line at line 5822, column 1. Don't use whitespace at the end of lines. (Severity: 1) -Useless interpolation of literal string at line 5824, column 8. See page 51 of PBP. (Severity: 1) -Postfix control "if" used at line 5824, column 32. See pages 93,94 of PBP. (Severity: 2) -Subroutine "Tls" is not all lower case or all upper case at line 5878, column 1. See pages 45,46 of PBP. (Severity: 1) -Builtin function called with parentheses at line 5881, column 7. See page 13 of PBP. (Severity: 1) -Subroutine "Reconnect_counter" is not all lower case or all upper case at line 5885, column 1. See pages 45,46 of PBP. (Severity: 1) -Postfix control "if" used at line 5888, column 33. See pages 93,94 of PBP. (Severity: 2) -Builtin function called with parentheses at line 5889, column 7. See page 13 of PBP. (Severity: 1) -Subroutine "Banner" is not all lower case or all upper case at line 5894, column 1. See pages 45,46 of PBP. (Severity: 1) -Builtin function called with parentheses at line 5897, column 7. See page 13 of PBP. (Severity: 1) -Found "\t" at the end of the line at line 5903, column 1. Don't use whitespace at the end of lines. (Severity: 1) diff --git a/perlcritic_2.out b/perlcritic_2.out index 1271fb2..d756517 100644 --- a/perlcritic_2.out +++ b/perlcritic_2.out @@ -5,568 +5,575 @@ Missing "DEPENDENCIES" section in POD at line 1, column 1. See pages 133,138 of Missing "INCOMPATIBILITIES" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) Missing "BUGS AND LIMITATIONS" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) Missing "LICENSE AND COPYRIGHT" section in POD at line 1, column 1. See pages 133,138 of PBP. (Severity: 2) -Main code has high complexity score (335) at line 1, column 1. Consider refactoring. (Severity: 3) -Magic punctuation variable used at line 551, column 3. See page 79 of PBP. (Severity: 2) -64 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 711, column 10. Unnamed numeric literals make code less maintainable. (Severity: 2) -Quotes used with an empty string at line 734, column 61. See page 53 of PBP. (Severity: 2) -5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 762, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) -5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 763, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) -Postfix control "if" used at line 772, column 15. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 773, column 21. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 779, column 25. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 784, column 24. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 791, column 25. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 798, column 15. See pages 93,94 of PBP. (Severity: 2) -100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 801, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) -100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 802, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) -993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 805, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) -143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 805, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) -993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 808, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) -143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 808, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) -Postfix control "if" used at line 810, column 31. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 811, column 12. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 825, column 5. See pages 93,94 of PBP. (Severity: 2) -3 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 850, column 21. Unnamed numeric literals make code less maintainable. (Severity: 2) -Long number not separated with underscores at line 937, column 20. See page 59 of PBP. (Severity: 2) -Postfix control "unless" used at line 939, column 57. See pages 96,97 of PBP. (Severity: 2) -Quotes used with an empty string at line 966, column 19. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 967, column 50. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 969, column 22. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 970, column 22. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 974, column 26. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 981, column 49. See page 53 of PBP. (Severity: 2) -Postfix control "unless" used at line 1006, column 43. See pages 96,97 of PBP. (Severity: 2) -Postfix control "unless" used at line 1008, column 43. See pages 96,97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1011, column 34. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1012, column 34. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 1015, column 15. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1077, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1077, column 33. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1086, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1086, column 33. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 1160, column 15. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1170, column 3. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1178, column 32. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1223, column 3. See page 97 of PBP. (Severity: 2) +Main code has high complexity score (338) at line 1, column 1. Consider refactoring. (Severity: 3) +Magic punctuation variable used at line 553, column 3. See page 79 of PBP. (Severity: 2) +64 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 715, column 10. Unnamed numeric literals make code less maintainable. (Severity: 2) +Quotes used with an empty string at line 738, column 61. See page 53 of PBP. (Severity: 2) +5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 766, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) +5 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 767, column 48. Unnamed numeric literals make code less maintainable. (Severity: 2) +Postfix control "if" used at line 776, column 15. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 777, column 21. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 783, column 25. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 788, column 24. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 795, column 27. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 806, column 17. See pages 93,94 of PBP. (Severity: 2) +100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 809, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) +100 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 810, column 13. Unnamed numeric literals make code less maintainable. (Severity: 2) +993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 813, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) +143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 813, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) +993 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 816, column 24. Unnamed numeric literals make code less maintainable. (Severity: 2) +143 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 816, column 30. Unnamed numeric literals make code less maintainable. (Severity: 2) +Postfix control "if" used at line 818, column 31. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 819, column 12. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 833, column 5. See pages 93,94 of PBP. (Severity: 2) +3 is not one of the allowed literal values (0, 1, 2). Use the Readonly module or the "constant" pragma instead at line 858, column 21. Unnamed numeric literals make code less maintainable. (Severity: 2) +Long number not separated with underscores at line 945, column 20. See page 59 of PBP. (Severity: 2) +Postfix control "unless" used at line 947, column 57. See pages 96,97 of PBP. (Severity: 2) +Quotes used with an empty string at line 974, column 19. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 975, column 50. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 977, column 22. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 978, column 22. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 982, column 26. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 989, column 49. See page 53 of PBP. (Severity: 2) +Postfix control "unless" used at line 1014, column 43. See pages 96,97 of PBP. (Severity: 2) +Postfix control "unless" used at line 1016, column 43. See pages 96,97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1019, column 34. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1020, column 34. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 1023, column 15. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1085, column 33. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1085, column 33. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1094, column 33. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1094, column 33. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 1168, column 15. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1178, column 3. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1186, column 32. See pages 93,94 of PBP. (Severity: 2) "unless" block used at line 1231, column 3. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1263, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1264, column 50. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 1274, column 39. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 1276, column 50. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 1286, column 49. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 1287, column 30. See page 228 of PBP. (Severity: 2) -Postfix control "if" used at line 1305, column 57. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1315, column 77. See pages 93,94 of PBP. (Severity: 2) -Double-sigil dereference at line 1318, column 2. See page 228 of PBP. (Severity: 2) -Postfix control "if" used at line 1323, column 5. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1327, column 3. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1330, column 2. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1333, column 53. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 1368, column 79. See pages 93,94 of PBP. (Severity: 2) -Double-sigil dereference at line 1372, column 2. See page 228 of PBP. (Severity: 2) -Postfix control "if" used at line 1377, column 3. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1381, column 3. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1404, column 10. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1424, column 33. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1425, column 4. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1433, column 39. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1437, column 38. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1446, column 4. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1448, column 45. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1449, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1449, column 31. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 1451, column 7. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1452, column 32. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1453, column 5. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1461, column 52. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1462, column 4. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1470, column 39. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1474, column 38. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1483, column 4. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1484, column 49. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1485, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1485, column 31. See page 237 of PBP. (Severity: 2) -"unless" block used at line 1486, column 5. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1515, column 70. See pages 93,94 of PBP. (Severity: 2) -Code structure is deeply nested at line 1516, column 41. Consider refactoring. (Severity: 3) -"unless" block used at line 1516, column 41. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1527, column 39. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1531, column 38. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1549, column 3. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 1584, column 47. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 1585, column 59. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1587, column 4. See page 97 of PBP. (Severity: 2) -Postfix control "if" used at line 1590, column 23. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 1625, column 3. See page 97 of PBP. (Severity: 2) -"unless" block used at line 1629, column 3. See page 97 of PBP. (Severity: 2) -Postfix control "unless" used at line 1658, column 20. See pages 96,97 of PBP. (Severity: 2) -Postfix control "unless" used at line 1659, column 20. See pages 96,97 of PBP. (Severity: 2) -Postfix control "if" used at line 1663, column 17. See pages 93,94 of PBP. (Severity: 2) -Too many arguments at line 1683, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 1690, column 58. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1691, column 58. See page 53 of PBP. (Severity: 2) -Too many arguments at line 1698, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 1708, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 1723, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1724, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1736, column 26. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1746, column 28. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1754, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1754, column 17. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 1764, column 55. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1765, column 74. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 1770, column 58. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 1802, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1830, column 77. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1833, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1836, column 73. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1839, column 77. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1842, column 76. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1845, column 68. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1848, column 67. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1851, column 77. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1854, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1857, column 71. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1860, column 69. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1863, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1866, column 67. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1869, column 67. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 1872, column 69. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 1887, column 15. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 1887, column 15. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 1899, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1906, column 5. See page 53 of PBP. (Severity: 2) -Too many arguments at line 1942, column 1. See page 182 of PBP. (Severity: 3) -Postfix control "if" used at line 1946, column 19. See pages 93,94 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 1951, column 17. See page 79 of PBP. (Severity: 2) -Postfix control "if" used at line 1956, column 29. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 1964, column 35. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 1967, column 35. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 1981, column 14. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 1993, column 14. See pages 93,94 of PBP. (Severity: 2) -Too many arguments at line 1997, column 1. See page 182 of PBP. (Severity: 3) -Postfix control "if" used at line 2012, column 35. See pages 93,94 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2029, column 17. See page 79 of PBP. (Severity: 2) -Postfix control "if" used at line 2044, column 22. See pages 93,94 of PBP. (Severity: 2) -Too many arguments at line 2053, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 2064, column 38. See page 53 of PBP. (Severity: 2) -Postfix control "unless" used at line 2067, column 51. See pages 96,97 of PBP. (Severity: 2) -Postfix control "if" used at line 2071, column 32. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 2072, column 35. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 2074, column 32. See pages 93,94 of PBP. (Severity: 2) -"unless" block used at line 2078, column 2. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 2089, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2132, column 40. See page 53 of PBP. (Severity: 2) -Too many arguments at line 2143, column 1. See page 182 of PBP. (Severity: 3) -Postfix control "if" used at line 2154, column 19. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 2166, column 41. See pages 93,94 of PBP. (Severity: 2) -Numeric escapes in interpolated string at line 2179, column 30. See page 56 of PBP. (Severity: 2) -Quotes used with an empty string at line 2181, column 41. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2199, column 32. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2199, column 32. See page 237 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2212, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2215, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2218, column 39. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2227, column 82. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2236, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2236, column 45. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2236, column 61. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2239, column 22. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2242, column 39. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2253, column 41. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2266, column 29. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2272, column 5. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2281, column 26. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2282, column 8. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 2305, column 2. Check the return value of "close" for success. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2325, column 12. See page 79 of PBP. (Severity: 2) -Quotes used with an empty string at line 2333, column 14. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2335, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2336, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2347, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2348, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2349, column 6. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2351, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2352, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2353, column 6. See page 53 of PBP. (Severity: 2) +"unless" block used at line 1239, column 3. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1271, column 50. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1272, column 50. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 1282, column 39. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 1284, column 50. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 1294, column 49. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 1295, column 30. See page 228 of PBP. (Severity: 2) +Postfix control "if" used at line 1313, column 57. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1323, column 77. See pages 93,94 of PBP. (Severity: 2) +Double-sigil dereference at line 1326, column 2. See page 228 of PBP. (Severity: 2) +Postfix control "if" used at line 1331, column 5. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1335, column 3. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1338, column 2. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1341, column 53. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 1376, column 79. See pages 93,94 of PBP. (Severity: 2) +Double-sigil dereference at line 1380, column 2. See page 228 of PBP. (Severity: 2) +Postfix control "if" used at line 1385, column 3. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1389, column 3. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1412, column 10. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1432, column 33. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1433, column 4. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1441, column 39. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1445, column 38. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1454, column 4. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1456, column 45. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1457, column 31. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1457, column 31. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 1459, column 7. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1460, column 32. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1461, column 5. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1469, column 52. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1470, column 4. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1478, column 39. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1482, column 38. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1491, column 4. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1492, column 49. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1493, column 31. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1493, column 31. See page 237 of PBP. (Severity: 2) +"unless" block used at line 1494, column 5. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1523, column 70. See pages 93,94 of PBP. (Severity: 2) +Code structure is deeply nested at line 1524, column 41. Consider refactoring. (Severity: 3) +"unless" block used at line 1524, column 41. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1535, column 39. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 1539, column 38. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1557, column 3. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 1592, column 47. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 1593, column 59. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1595, column 4. See page 97 of PBP. (Severity: 2) +Postfix control "if" used at line 1598, column 23. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 1633, column 3. See page 97 of PBP. (Severity: 2) +"unless" block used at line 1637, column 3. See page 97 of PBP. (Severity: 2) +Postfix control "unless" used at line 1666, column 20. See pages 96,97 of PBP. (Severity: 2) +Postfix control "unless" used at line 1667, column 20. See pages 96,97 of PBP. (Severity: 2) +Postfix control "if" used at line 1671, column 17. See pages 93,94 of PBP. (Severity: 2) +Too many arguments at line 1691, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 1698, column 58. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1699, column 58. See page 53 of PBP. (Severity: 2) +Too many arguments at line 1706, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 1716, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 1731, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1732, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1744, column 26. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1754, column 28. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1762, column 17. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1762, column 17. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 1772, column 55. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1773, column 74. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 1778, column 58. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 1810, column 23. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1838, column 77. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1841, column 65. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1844, column 73. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1847, column 77. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1850, column 76. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1853, column 68. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1856, column 67. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1859, column 77. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1862, column 79. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1865, column 71. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1868, column 69. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1871, column 65. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1874, column 67. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1877, column 67. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 1880, column 69. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 1895, column 15. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 1895, column 15. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 1907, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1914, column 5. See page 53 of PBP. (Severity: 2) +Too many arguments at line 1950, column 1. See page 182 of PBP. (Severity: 3) +Postfix control "if" used at line 1954, column 19. See pages 93,94 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 1959, column 17. See page 79 of PBP. (Severity: 2) +Postfix control "if" used at line 1964, column 29. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 1972, column 35. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 1975, column 35. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 1989, column 14. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 2001, column 14. See pages 93,94 of PBP. (Severity: 2) +Too many arguments at line 2005, column 1. See page 182 of PBP. (Severity: 3) +Postfix control "if" used at line 2020, column 35. See pages 93,94 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2037, column 17. See page 79 of PBP. (Severity: 2) +Postfix control "if" used at line 2052, column 22. See pages 93,94 of PBP. (Severity: 2) +Too many arguments at line 2061, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 2072, column 38. See page 53 of PBP. (Severity: 2) +Postfix control "unless" used at line 2075, column 51. See pages 96,97 of PBP. (Severity: 2) +Postfix control "if" used at line 2079, column 32. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 2080, column 35. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 2082, column 32. See pages 93,94 of PBP. (Severity: 2) +"unless" block used at line 2086, column 2. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 2097, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2140, column 40. See page 53 of PBP. (Severity: 2) +Too many arguments at line 2151, column 1. See page 182 of PBP. (Severity: 3) +Postfix control "if" used at line 2162, column 19. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 2174, column 41. See pages 93,94 of PBP. (Severity: 2) +Numeric escapes in interpolated string at line 2187, column 30. See page 56 of PBP. (Severity: 2) +Quotes used with an empty string at line 2189, column 41. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2207, column 32. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2207, column 32. See page 237 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2220, column 65. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2223, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2226, column 39. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2235, column 82. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2244, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2244, column 45. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2244, column 61. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2247, column 22. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2250, column 39. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2261, column 41. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2274, column 29. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2280, column 5. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2289, column 26. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2290, column 8. See page 79 of PBP. (Severity: 2) +Return value of "close" ignored at line 2313, column 2. Check the return value of "close" for success. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2333, column 12. See page 79 of PBP. (Severity: 2) +Quotes used with an empty string at line 2341, column 14. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2343, column 79. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2344, column 79. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2355, column 25. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2356, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2357, column 6. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2359, column 25. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2360, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2361, column 6. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2363, column 25. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2364, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2365, column 6. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2367, column 25. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 2368, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2369, column 6. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 2490, column 28. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 2494, column 26. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 2503, column 36. See page 228 of PBP. (Severity: 2) -Quotes used with an empty string at line 2554, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2555, column 37. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2637, column 49. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2647, column 21. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2655, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2656, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2656, column 42. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 6. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 30. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 34. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2658, column 38. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2659, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2659, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2660, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2660, column 51. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2661, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2661, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2662, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2662, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2663, column 48. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2663, column 53. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2664, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2664, column 55. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2666, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2666, column 55. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2668, column 50. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2668, column 55. See page 53 of PBP. (Severity: 2) -Numeric escapes in interpolated string at line 2678, column 12. See page 56 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2681, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2681, column 14. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2682, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2682, column 14. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2683, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2683, column 14. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2684, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2684, column 21. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 2684, column 30. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2684, column 49. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2684, column 74. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2691, column 27. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2692, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2693, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2704, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2704, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2711, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2711, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2726, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2726, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2733, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2734, column 11. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2735, column 4. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2735, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2742, column 14. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2756, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2756, column 13. See page 237 of PBP. (Severity: 2) -Postfix control "unless" used at line 2762, column 4. See pages 96,97 of PBP. (Severity: 2) -Use 'eq' or hash instead of fixed-pattern regexps at line 2762, column 62. See pages 271,272 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2762, column 62. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2762, column 62. See page 237 of PBP. (Severity: 2) -Expression form of "eval" at line 2768, column 13. See page 161 of PBP. (Severity: 5) -Magic punctuation variable used at line 2770, column 49. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2771, column 14. See page 79 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 28. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2779, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2780, column 28. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 2788, column 42. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 2788, column 42. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 2789, column 17. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2789, column 21. See page 53 of PBP. (Severity: 2) -"unless" block used at line 2815, column 3. See page 97 of PBP. (Severity: 2) -Double-sigil dereference at line 2827, column 3. See page 228 of PBP. (Severity: 2) -Postfix control "if" used at line 2827, column 35. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2830, column 71. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2830, column 71. See page 79 of PBP. (Severity: 2) -Quotes used with a noisy string at line 2833, column 100. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2833, column 100. See page 79 of PBP. (Severity: 2) -Double-sigil dereference at line 2835, column 15. See page 228 of PBP. (Severity: 2) -Quotes used with an empty string at line 2879, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2879, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2883, column 41. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2942, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2953, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2953, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2954, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2968, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2968, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 2970, column 5. See page 53 of PBP. (Severity: 2) -Expression form of "eval" at line 2986, column 13. See page 161 of PBP. (Severity: 5) -Magic punctuation variable used at line 2988, column 45. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 2989, column 10. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3000, column 14. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3002, column 14. See page 79 of PBP. (Severity: 2) -Double-sigil dereference at line 3003, column 37. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3003, column 54. See page 228 of PBP. (Severity: 2) -"unless" block used at line 3009, column 4. See page 97 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3012, column 16. See page 79 of PBP. (Severity: 2) -Quotes used with an empty string at line 3023, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3033, column 5. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3041, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3041, column 17. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3044, column 28. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3044, column 28. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 3045, column 23. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3050, column 17. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3056, column 6. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3069, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3069, column 21. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 3070, column 44. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3073, column 24. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3081, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3081, column 21. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 3082, column 40. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3085, column 24. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 3107, column 67. See pages 93,94 of PBP. (Severity: 2) -Subroutine "select_msgs" does not end with "return" at line 3127, column 1. See page 197 of PBP. (Severity: 4) -Long number not separated with underscores at line 3211, column 63. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 3212, column 63. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 3233, column 45. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 3236, column 46. See page 59 of PBP. (Severity: 2) -Double-sigil dereference at line 3247, column 9. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3248, column 9. See page 228 of PBP. (Severity: 2) -"unless" block used at line 3251, column 3. See page 97 of PBP. (Severity: 2) -"unless" block used at line 3252, column 3. See page 97 of PBP. (Severity: 2) -Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3266, column 1. See page 197 of PBP. (Severity: 4) -Postfix control "if" used at line 3314, column 22. See pages 93,94 of PBP. (Severity: 2) -Subroutine "copy_message" with high complexity score (21) at line 3343, column 1. Consider refactoring. (Severity: 3) -Too many arguments at line 3343, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 3350, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3351, column 61. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 3359, column 41. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 3360, column 95. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 3391, column 19. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3391, column 35. See page 53 of PBP. (Severity: 2) -Too many arguments at line 3403, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 3408, column 60. See page 53 of PBP. (Severity: 2) -"unless" block used at line 3410, column 2. See page 97 of PBP. (Severity: 2) -Quotes used with an empty string at line 3413, column 24. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 3415, column 34. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 3440, column 3. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 3443, column 49. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3451, column 16. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3473, column 15. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3473, column 15. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 3478, column 37. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 3479, column 64. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3486, column 16. See page 53 of PBP. (Severity: 2) -Subroutine "tests_subject" does not end with "return" at line 3497, column 1. See page 197 of PBP. (Severity: 4) -Quotes used with an empty string at line 3498, column 6. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3498, column 21. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3538, column 6. See page 53 of PBP. (Severity: 2) -Too many arguments at line 3560, column 1. See page 182 of PBP. (Severity: 3) -Quotes used with an empty string at line 3569, column 58. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3581, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3581, column 20. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3596, column 75. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3596, column 75. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 3625, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3633, column 10. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 3666, column 2. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3666, column 22. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3667, column 2. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3667, column 22. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3669, column 26. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3726, column 37. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3727, column 37. See page 228 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3740, column 23. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3740, column 23. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 3767, column 50. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 35. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 68. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3814, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 35. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 57. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 68. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 79. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3815, column 90. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 3819, column 37. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3820, column 37. See page 228 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 43. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3862, column 76. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 43. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 65. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 76. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3863, column 87. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 3866, column 34. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3867, column 34. See page 228 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 3882, column 16. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 3882, column 16. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 3895, column 47. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 3927, column 78. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 3928, column 21. See page 228 of PBP. (Severity: 2) -Quotes used with an empty string at line 3931, column 102. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 3940, column 29. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 3940, column 29. See page 79 of PBP. (Severity: 2) -Quotes used with an empty string at line 3979, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3980, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3984, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3985, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 3986, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4030, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4031, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4032, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4036, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4037, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2371, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2372, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2373, column 6. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2375, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2376, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2377, column 6. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 2498, column 28. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 2502, column 26. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 2511, column 36. See page 228 of PBP. (Severity: 2) +Quotes used with an empty string at line 2562, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2563, column 37. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2645, column 49. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2655, column 21. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2663, column 38. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2664, column 38. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2664, column 42. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2666, column 6. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2666, column 30. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2666, column 34. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2666, column 38. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2667, column 46. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2667, column 50. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2668, column 46. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2668, column 51. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2669, column 48. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2669, column 53. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2670, column 48. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2670, column 53. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2671, column 48. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2671, column 53. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2672, column 50. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2672, column 55. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2674, column 50. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2674, column 55. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2676, column 50. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2676, column 55. See page 53 of PBP. (Severity: 2) +Numeric escapes in interpolated string at line 2686, column 12. See page 56 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2689, column 14. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2689, column 14. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2690, column 14. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2690, column 14. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2691, column 14. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2691, column 14. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2692, column 21. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2692, column 21. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 2692, column 30. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2692, column 49. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2692, column 74. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2699, column 27. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2700, column 11. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2701, column 11. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2712, column 4. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2712, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2719, column 4. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2719, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2734, column 4. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2734, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2741, column 11. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2742, column 11. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2743, column 4. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2743, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2750, column 14. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2764, column 13. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2764, column 13. See page 237 of PBP. (Severity: 2) +Postfix control "unless" used at line 2770, column 4. See pages 96,97 of PBP. (Severity: 2) +Use 'eq' or hash instead of fixed-pattern regexps at line 2770, column 62. See pages 271,272 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2770, column 62. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2770, column 62. See page 237 of PBP. (Severity: 2) +Expression form of "eval" at line 2776, column 13. See page 161 of PBP. (Severity: 5) +Magic punctuation variable used at line 2778, column 49. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2779, column 14. See page 79 of PBP. (Severity: 2) +Quotes used with an empty string at line 2787, column 28. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2787, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2787, column 57. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2788, column 28. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 2796, column 42. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 2796, column 42. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 2797, column 17. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2797, column 21. See page 53 of PBP. (Severity: 2) +"unless" block used at line 2823, column 3. See page 97 of PBP. (Severity: 2) +Double-sigil dereference at line 2835, column 3. See page 228 of PBP. (Severity: 2) +Postfix control "if" used at line 2835, column 35. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2838, column 71. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2838, column 71. See page 79 of PBP. (Severity: 2) +Quotes used with a noisy string at line 2841, column 100. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2841, column 100. See page 79 of PBP. (Severity: 2) +Double-sigil dereference at line 2843, column 15. See page 228 of PBP. (Severity: 2) +Quotes used with an empty string at line 2887, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2887, column 23. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2891, column 41. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2950, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2961, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2961, column 23. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2962, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2976, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2976, column 23. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 2978, column 5. See page 53 of PBP. (Severity: 2) +Expression form of "eval" at line 2994, column 13. See page 161 of PBP. (Severity: 5) +Magic punctuation variable used at line 2996, column 45. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 2997, column 10. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 3008, column 14. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 3010, column 14. See page 79 of PBP. (Severity: 2) +Double-sigil dereference at line 3011, column 37. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3011, column 54. See page 228 of PBP. (Severity: 2) +"unless" block used at line 3017, column 4. See page 97 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 3020, column 16. See page 79 of PBP. (Severity: 2) +Quotes used with an empty string at line 3031, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3041, column 5. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3049, column 17. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3049, column 17. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3052, column 28. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3052, column 28. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 3053, column 23. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3058, column 17. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3064, column 6. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3077, column 21. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3077, column 21. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 3078, column 44. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3081, column 24. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3089, column 21. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3089, column 21. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 3090, column 40. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3093, column 24. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 3115, column 67. See pages 93,94 of PBP. (Severity: 2) +Subroutine "select_msgs" does not end with "return" at line 3135, column 1. See page 197 of PBP. (Severity: 4) +Long number not separated with underscores at line 3219, column 63. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 3220, column 63. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 3241, column 45. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 3244, column 46. See page 59 of PBP. (Severity: 2) +Double-sigil dereference at line 3255, column 9. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3256, column 9. See page 228 of PBP. (Severity: 2) +"unless" block used at line 3259, column 3. See page 97 of PBP. (Severity: 2) +"unless" block used at line 3260, column 3. See page 97 of PBP. (Severity: 2) +Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3274, column 1. See page 197 of PBP. (Severity: 4) +Postfix control "if" used at line 3322, column 22. See pages 93,94 of PBP. (Severity: 2) +Subroutine "copy_message" with high complexity score (21) at line 3351, column 1. Consider refactoring. (Severity: 3) +Too many arguments at line 3351, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 3358, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3359, column 61. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 3367, column 41. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 3368, column 95. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 3399, column 19. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 3399, column 35. See page 53 of PBP. (Severity: 2) +Too many arguments at line 3411, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 3416, column 60. See page 53 of PBP. (Severity: 2) +"unless" block used at line 3418, column 2. See page 97 of PBP. (Severity: 2) +Quotes used with an empty string at line 3421, column 24. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 3423, column 34. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 3448, column 3. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 3451, column 49. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3459, column 16. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3481, column 15. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3481, column 15. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 3486, column 37. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 3487, column 64. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 3494, column 16. See page 53 of PBP. (Severity: 2) +Subroutine "tests_subject" does not end with "return" at line 3505, column 1. See page 197 of PBP. (Severity: 4) +Quotes used with an empty string at line 3506, column 6. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3506, column 21. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3546, column 6. See page 53 of PBP. (Severity: 2) +Too many arguments at line 3568, column 1. See page 182 of PBP. (Severity: 3) +Quotes used with an empty string at line 3577, column 58. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3589, column 20. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3589, column 20. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3604, column 75. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3604, column 75. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 3633, column 28. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 3641, column 10. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 3674, column 2. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3674, column 22. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3675, column 2. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3675, column 22. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3677, column 26. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3734, column 37. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3735, column 37. See page 228 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3748, column 23. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3748, column 23. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 3775, column 50. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 3822, column 35. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3822, column 46. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3822, column 57. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3822, column 68. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3822, column 79. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 35. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 46. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 57. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 68. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 79. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3823, column 90. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 3827, column 37. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3828, column 37. See page 228 of PBP. (Severity: 2) +Quotes used with an empty string at line 3870, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3870, column 43. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3870, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3870, column 65. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3870, column 76. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 43. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 65. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 76. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3871, column 87. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 3874, column 34. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3875, column 34. See page 228 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 3890, column 16. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 3890, column 16. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 3903, column 47. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 3935, column 78. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 3936, column 21. See page 228 of PBP. (Severity: 2) +Quotes used with an empty string at line 3939, column 102. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 3948, column 29. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 3948, column 29. See page 79 of PBP. (Severity: 2) +Quotes used with an empty string at line 3987, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3988, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3992, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3993, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 3994, column 24. See page 53 of PBP. (Severity: 2) Quotes used with an empty string at line 4038, column 24. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4104, column 25. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4105, column 25. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4120, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4120, column 20. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4137, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4137, column 13. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 4143, column 5. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4143, column 32. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4143, column 36. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4144, column 46. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4145, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4148, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 4149, column 60. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4170, column 15. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4171, column 15. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4187, column 15. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4188, column 15. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4191, column 15. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4200, column 15. See page 53 of PBP. (Severity: 2) -Expression form of "eval" at line 4317, column 13. See page 161 of PBP. (Severity: 5) -Magic punctuation variable used at line 4319, column 38. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 4320, column 10. See page 79 of PBP. (Severity: 2) -Long number not separated with underscores at line 4333, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4334, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4336, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4337, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4339, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4340, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4342, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4343, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4345, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4346, column 46. See page 59 of PBP. (Severity: 2) -Long number not separated with underscores at line 4348, column 49. See page 59 of PBP. (Severity: 2) -Quotes used with an empty string at line 4357, column 23. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 4402, column 65. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 4461, column 31. See pages 93,94 of PBP. (Severity: 2) -Too many arguments at line 4472, column 1. See page 182 of PBP. (Severity: 3) -Double-sigil dereference at line 4476, column 29. See page 228 of PBP. (Severity: 2) -Double-sigil dereference at line 4487, column 43. See page 228 of PBP. (Severity: 2) -Postfix control "unless" used at line 4510, column 29. See pages 96,97 of PBP. (Severity: 2) -Double-sigil dereference at line 4536, column 29. See page 228 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4547, column 30. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4547, column 30. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4562, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4562, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4565, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4565, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4568, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4568, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4571, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4571, column 24. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4574, column 98. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4574, column 98. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 4587, column 37. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4587, column 41. See page 53 of PBP. (Severity: 2) -Numeric escapes in interpolated string at line 4592, column 51. See page 56 of PBP. (Severity: 2) -Quotes used with an empty string at line 4602, column 21. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 4604, column 52. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4606, column 9. Check the return value of "close" for success. (Severity: 2) -Magic punctuation variable used in interpolated string at line 4615, column 46. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4617, column 2. Check the return value of "close" for success. (Severity: 2) -Quotes used with an empty string at line 4618, column 14. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated string at line 4624, column 67. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4626, column 2. Check the return value of "close" for success. (Severity: 2) -Regular expression without "/s" flag at line 4641, column 21. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4641, column 21. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4665, column 24. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4665, column 24. See page 237 of PBP. (Severity: 2) -Magic punctuation variable used at line 4682, column 18. See page 79 of PBP. (Severity: 2) -Return value of "close" ignored at line 4705, column 2. Check the return value of "close" for success. (Severity: 2) -Magic punctuation variable used in interpolated string at line 4725, column 20. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used at line 4739, column 23. See page 79 of PBP. (Severity: 2) -Magic punctuation variable used at line 4741, column 7. See page 79 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4741, column 13. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4741, column 13. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 4756, column 20. See page 53 of PBP. (Severity: 2) -Quotes used with an empty string at line 4758, column 11. See page 53 of PBP. (Severity: 2) -String delimiter used with "split" at line 4810, column 28. Express it as a regex instead. (Severity: 2) -Quotes used with a noisy string at line 4810, column 34. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4873, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4873, column 17. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4882, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4882, column 17. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 4920, column 13. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4923, column 17. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4923, column 17. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4926, column 16. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 4926, column 30. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 4927, column 22. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4932, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4932, column 12. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4944, column 38. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4944, column 72. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4944, column 72. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4945, column 38. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 4947, column 46. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 4951, column 30. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 4953, column 34. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4958, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4958, column 12. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4974, column 19. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4974, column 19. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4987, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4987, column 12. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 4993, column 29. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 4999, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 4999, column 12. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5010, column 12. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5010, column 12. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 5031, column 5. See page 53 of PBP. (Severity: 2) -Double-sigil dereference at line 5083, column 33. See page 228 of PBP. (Severity: 2) -Expression form of "eval" at line 5104, column 43. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 5108, column 45. See page 161 of PBP. (Severity: 5) -Postfix control "if" used at line 5113, column 34. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5114, column 36. See pages 93,94 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5128, column 33. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5128, column 33. See page 237 of PBP. (Severity: 2) -Quotes used with an empty string at line 5129, column 36. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5167, column 27. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5167, column 27. See page 237 of PBP. (Severity: 2) -Use 'eq' or hash instead of fixed-pattern regexps at line 5171, column 36. See pages 271,272 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5171, column 36. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5171, column 36. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5173, column 31. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5173, column 31. See page 237 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5179, column 34. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5179, column 34. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 5182, column 65. See pages 93,94 of PBP. (Severity: 2) -Quotes used with an empty string at line 5308, column 17. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5313, column 20. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5313, column 20. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 5319, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5319, column 33. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 5320, column 28. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5320, column 33. See page 53 of PBP. (Severity: 2) -Long number not separated with underscores at line 5353, column 55. See page 59 of PBP. (Severity: 2) -"$i" is declared but not used at line 5372, column 9. Unused variables clutter code and make it harder to read. (Severity: 3) -Quotes used with an empty string at line 5383, column 28. See page 53 of PBP. (Severity: 2) -Long number not separated with underscores at line 5391, column 40. See page 59 of PBP. (Severity: 2) -Quotes used with an empty string at line 5403, column 25. See page 53 of PBP. (Severity: 2) -Postfix control "if" used at line 5404, column 43. See pages 93,94 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5405, column 54. See page 53 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5405, column 60. See page 53 of PBP. (Severity: 2) -Magic punctuation variable used in interpolated here-document at line 5406, column 15. See page 79 of PBP. (Severity: 2) -Quotes used with a noisy string at line 5648, column 20. See page 53 of PBP. (Severity: 2) -Regular expression without "/s" flag at line 5653, column 14. See pages 240,241 of PBP. (Severity: 2) -Regular expression without "/m" flag at line 5653, column 14. See page 237 of PBP. (Severity: 2) -Postfix control "if" used at line 5787, column 49. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5800, column 12. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5804, column 32. See pages 93,94 of PBP. (Severity: 2) -Postfix control "unless" used at line 5807, column 30. See pages 96,97 of PBP. (Severity: 2) -Postfix control "if" used at line 5815, column 32. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5824, column 32. See pages 93,94 of PBP. (Severity: 2) -Postfix control "if" used at line 5888, column 33. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 4039, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4040, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4044, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4045, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4046, column 24. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4104, column 33. See page 53 of PBP. (Severity: 2) +Hard tabs used at line 4139, column 10. See page 20 of PBP. (Severity: 3) +Quotes used with an empty string at line 4174, column 43. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4175, column 44. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4176, column 48. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4187, column 25. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4188, column 25. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4204, column 21. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4204, column 21. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4206, column 20. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4206, column 20. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4230, column 13. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4230, column 13. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 4236, column 5. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4236, column 32. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4236, column 36. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4237, column 46. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4238, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4241, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 4242, column 60. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4263, column 15. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4264, column 15. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4280, column 15. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4281, column 15. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4284, column 15. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4293, column 15. See page 53 of PBP. (Severity: 2) +Expression form of "eval" at line 4410, column 13. See page 161 of PBP. (Severity: 5) +Magic punctuation variable used at line 4412, column 38. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 4413, column 10. See page 79 of PBP. (Severity: 2) +Long number not separated with underscores at line 4426, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4427, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4429, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4430, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4432, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4433, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4435, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4436, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4438, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4439, column 46. See page 59 of PBP. (Severity: 2) +Long number not separated with underscores at line 4441, column 49. See page 59 of PBP. (Severity: 2) +Quotes used with an empty string at line 4450, column 23. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 4495, column 65. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 4554, column 31. See pages 93,94 of PBP. (Severity: 2) +Too many arguments at line 4565, column 1. See page 182 of PBP. (Severity: 3) +Double-sigil dereference at line 4569, column 29. See page 228 of PBP. (Severity: 2) +Double-sigil dereference at line 4580, column 43. See page 228 of PBP. (Severity: 2) +Postfix control "unless" used at line 4603, column 29. See pages 96,97 of PBP. (Severity: 2) +Double-sigil dereference at line 4629, column 29. See page 228 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4640, column 30. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4640, column 30. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4655, column 24. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4655, column 24. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4658, column 24. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4658, column 24. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4661, column 24. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4661, column 24. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4664, column 24. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4664, column 24. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4667, column 98. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4667, column 98. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 4680, column 37. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4680, column 41. See page 53 of PBP. (Severity: 2) +Numeric escapes in interpolated string at line 4685, column 51. See page 56 of PBP. (Severity: 2) +Quotes used with an empty string at line 4695, column 21. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 4697, column 52. See page 79 of PBP. (Severity: 2) +Return value of "close" ignored at line 4699, column 9. Check the return value of "close" for success. (Severity: 2) +Magic punctuation variable used in interpolated string at line 4708, column 46. See page 79 of PBP. (Severity: 2) +Return value of "close" ignored at line 4710, column 2. Check the return value of "close" for success. (Severity: 2) +Quotes used with an empty string at line 4711, column 14. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated string at line 4717, column 67. See page 79 of PBP. (Severity: 2) +Return value of "close" ignored at line 4719, column 2. Check the return value of "close" for success. (Severity: 2) +Regular expression without "/s" flag at line 4734, column 21. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4734, column 21. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4758, column 24. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4758, column 24. See page 237 of PBP. (Severity: 2) +Magic punctuation variable used at line 4775, column 18. See page 79 of PBP. (Severity: 2) +Return value of "close" ignored at line 4798, column 2. Check the return value of "close" for success. (Severity: 2) +Magic punctuation variable used in interpolated string at line 4818, column 20. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used at line 4832, column 23. See page 79 of PBP. (Severity: 2) +Magic punctuation variable used at line 4834, column 7. See page 79 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4834, column 13. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4834, column 13. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 4849, column 20. See page 53 of PBP. (Severity: 2) +Quotes used with an empty string at line 4851, column 11. See page 53 of PBP. (Severity: 2) +String delimiter used with "split" at line 4903, column 28. Express it as a regex instead. (Severity: 2) +Quotes used with a noisy string at line 4903, column 34. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4966, column 17. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4966, column 17. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 4975, column 17. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 4975, column 17. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 5013, column 13. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5016, column 17. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5016, column 17. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5019, column 16. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 5019, column 30. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 5020, column 22. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5025, column 12. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5025, column 12. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5037, column 38. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5037, column 72. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5037, column 72. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5038, column 38. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5040, column 46. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5044, column 30. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5046, column 34. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5051, column 12. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5051, column 12. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5067, column 19. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5067, column 19. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5080, column 12. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5080, column 12. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5086, column 29. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5092, column 12. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5092, column 12. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5103, column 12. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5103, column 12. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 5124, column 5. See page 53 of PBP. (Severity: 2) +Double-sigil dereference at line 5176, column 33. See page 228 of PBP. (Severity: 2) +Expression form of "eval" at line 5197, column 43. See page 161 of PBP. (Severity: 5) +Expression form of "eval" at line 5201, column 45. See page 161 of PBP. (Severity: 5) +Postfix control "if" used at line 5206, column 34. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5207, column 36. See pages 93,94 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5221, column 33. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5221, column 33. See page 237 of PBP. (Severity: 2) +Quotes used with an empty string at line 5222, column 36. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5260, column 27. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5260, column 27. See page 237 of PBP. (Severity: 2) +Use 'eq' or hash instead of fixed-pattern regexps at line 5264, column 36. See pages 271,272 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5264, column 36. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5264, column 36. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5266, column 31. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5266, column 31. See page 237 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5272, column 34. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5272, column 34. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5275, column 65. See pages 93,94 of PBP. (Severity: 2) +Quotes used with an empty string at line 5401, column 17. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5406, column 20. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5406, column 20. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5412, column 28. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 5412, column 33. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 5413, column 28. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 5413, column 33. See page 53 of PBP. (Severity: 2) +Long number not separated with underscores at line 5446, column 55. See page 59 of PBP. (Severity: 2) +"$i" is declared but not used at line 5465, column 9. Unused variables clutter code and make it harder to read. (Severity: 3) +Quotes used with an empty string at line 5476, column 28. See page 53 of PBP. (Severity: 2) +Long number not separated with underscores at line 5484, column 40. See page 59 of PBP. (Severity: 2) +Quotes used with an empty string at line 5496, column 25. See page 53 of PBP. (Severity: 2) +Postfix control "if" used at line 5497, column 43. See pages 93,94 of PBP. (Severity: 2) +Quotes used with a noisy string at line 5498, column 54. See page 53 of PBP. (Severity: 2) +Quotes used with a noisy string at line 5498, column 60. See page 53 of PBP. (Severity: 2) +Magic punctuation variable used in interpolated here-document at line 5499, column 15. See page 79 of PBP. (Severity: 2) +Quotes used with a noisy string at line 5742, column 20. See page 53 of PBP. (Severity: 2) +Regular expression without "/s" flag at line 5747, column 14. See pages 240,241 of PBP. (Severity: 2) +Regular expression without "/m" flag at line 5747, column 14. See page 237 of PBP. (Severity: 2) +Postfix control "if" used at line 5882, column 49. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5895, column 12. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5899, column 32. See pages 93,94 of PBP. (Severity: 2) +Postfix control "unless" used at line 5902, column 30. See pages 96,97 of PBP. (Severity: 2) +Postfix control "if" used at line 5910, column 32. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5921, column 32. See pages 93,94 of PBP. (Severity: 2) +Postfix control "if" used at line 5986, column 33. See pages 93,94 of PBP. (Severity: 2) diff --git a/perlcritic_3.out b/perlcritic_3.out index 9a772aa..6f847d0 100644 --- a/perlcritic_3.out +++ b/perlcritic_3.out @@ -1,23 +1,24 @@ -Main code has high complexity score (335) at line 1, column 1. Consider refactoring. (Severity: 3) -Code structure is deeply nested at line 1516, column 41. Consider refactoring. (Severity: 3) -Too many arguments at line 1683, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 1698, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 1708, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 1942, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 1997, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 2053, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 2143, column 1. See page 182 of PBP. (Severity: 3) -Expression form of "eval" at line 2768, column 13. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 2986, column 13. See page 161 of PBP. (Severity: 5) -Subroutine "select_msgs" does not end with "return" at line 3127, column 1. See page 197 of PBP. (Severity: 4) -Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3266, column 1. See page 197 of PBP. (Severity: 4) -Subroutine "copy_message" with high complexity score (21) at line 3343, column 1. Consider refactoring. (Severity: 3) -Too many arguments at line 3343, column 1. See page 182 of PBP. (Severity: 3) -Too many arguments at line 3403, column 1. See page 182 of PBP. (Severity: 3) -Subroutine "tests_subject" does not end with "return" at line 3497, column 1. See page 197 of PBP. (Severity: 4) -Too many arguments at line 3560, column 1. See page 182 of PBP. (Severity: 3) -Expression form of "eval" at line 4317, column 13. See page 161 of PBP. (Severity: 5) -Too many arguments at line 4472, column 1. See page 182 of PBP. (Severity: 3) -Expression form of "eval" at line 5104, column 43. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 5108, column 45. See page 161 of PBP. (Severity: 5) -"$i" is declared but not used at line 5372, column 9. Unused variables clutter code and make it harder to read. (Severity: 3) +Main code has high complexity score (338) at line 1, column 1. Consider refactoring. (Severity: 3) +Code structure is deeply nested at line 1524, column 41. Consider refactoring. (Severity: 3) +Too many arguments at line 1691, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 1706, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 1716, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 1950, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 2005, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 2061, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 2151, column 1. See page 182 of PBP. (Severity: 3) +Expression form of "eval" at line 2776, column 13. See page 161 of PBP. (Severity: 5) +Expression form of "eval" at line 2994, column 13. See page 161 of PBP. (Severity: 5) +Subroutine "select_msgs" does not end with "return" at line 3135, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3274, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "copy_message" with high complexity score (21) at line 3351, column 1. Consider refactoring. (Severity: 3) +Too many arguments at line 3351, column 1. See page 182 of PBP. (Severity: 3) +Too many arguments at line 3411, column 1. See page 182 of PBP. (Severity: 3) +Subroutine "tests_subject" does not end with "return" at line 3505, column 1. See page 197 of PBP. (Severity: 4) +Too many arguments at line 3568, column 1. See page 182 of PBP. (Severity: 3) +Hard tabs used at line 4139, column 10. See page 20 of PBP. (Severity: 3) +Expression form of "eval" at line 4410, column 13. See page 161 of PBP. (Severity: 5) +Too many arguments at line 4565, column 1. See page 182 of PBP. (Severity: 3) +Expression form of "eval" at line 5197, column 43. See page 161 of PBP. (Severity: 5) +Expression form of "eval" at line 5201, column 45. See page 161 of PBP. (Severity: 5) +"$i" is declared but not used at line 5465, column 9. Unused variables clutter code and make it harder to read. (Severity: 3) diff --git a/tests.sh b/tests.sh index b543ef8..f5b1351 100644 --- a/tests.sh +++ b/tests.sh @@ -1,9 +1,9 @@ #!/bin/sh -# $Id: tests.sh,v 1.225 2013/09/21 21:55:17 gilles Exp gilles $ +# $Id: tests.sh,v 1.227 2013/09/28 11:11:16 gilles Exp gilles $ # Example 1: -# CMD_PERL='perl -I./Mail-IMAPClient-3.33/lib' sh -x tests.sh +# CMD_PERL='perl -I./W/Mail-IMAPClient-3.34/lib' sh -x tests.sh # Example 2: # To select which Mail-IMAPClient within arguments: @@ -23,7 +23,7 @@ echo HOST2=$HOST2 # few debugging tests use: CMD_PERL_2xx='perl -I./W/Mail-IMAPClient-2.2.9' -CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.33/lib' +CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.34/lib' CMD_PERL=${CMD_PERL:-$CMD_PERL_3xx} @@ -2312,7 +2312,8 @@ xxxxx_gmail_5_justfolders() { --user2 gilles.lamiral@gmail.com \ --passfile2 ../../var/pass/secret.gilles_gmail \ --justfolders --nofoldersizes \ - --regextrans2 's,(/|^) +,$1,g' --regextrans2 's, +(/|$),$1,g' + --regextrans2 's,(/|^) +,$1,g' --regextrans2 's, +(/|$),$1,g' \ + --regextrans2 "s/[\^]/_/g" --debug } @@ -2822,6 +2823,35 @@ ll_nofastio() ########################## +courier_45() { + $CMD_PERL ./imapsync \ + --host1 imap.timeweb.ru --user1 imaptest@avanta-consulting.ru \ + --passfile1 ../../var/pass/secret.avanta \ + --host2 $HOST2 --user2 tobbit \ + --passfile2 ../../var/pass/secret.tobbit \ + --folder INBOX +} + +courier_45_reverse() { + $CMD_PERL ./imapsync \ + --host2 imap.timeweb.ru --user2 imaptest@avanta-consulting.ru \ + --passfile2 ../../var/pass/secret.avanta \ + --host1 $HOST2 --user1 tobbit \ + --passfile1 ../../var/pass/secret.tobbit \ + --folder INBOX +} + +courier_45_reverse_empty() { + $CMD_PERL ./imapsync \ + --host2 imap.timeweb.ru --user2 imaptest@avanta-consulting.ru \ + --passfile2 ../../var/pass/secret.avanta \ + --host1 $HOST2 --user1 empty \ + --passfile1 ../../var/pass/secret.empty \ + --folder INBOX --delete2 +} + + + tobbit_11() { $CMD_PERL ./imapsync \ --host1 217.22.84.74 --user1 Test_IMAP \