Email-Simple-2.216/000755 000767 000024 00000000000 13306001053 014076 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/LICENSE000644 000767 000024 00000043655 13306001053 015120 0ustar00rjbsstaff000000 000000 This software is copyright (c) 2003 by Simon Cozens. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2003 by Simon Cozens. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. 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 the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2003 by Simon Cozens. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Email-Simple-2.216/Changes000644 000767 000024 00000016112 13306001053 015372 0ustar00rjbsstaff000000 000000 Revision history for Perl extension Email::Simple 2.216 2018-06-06 11:47:52-04:00 America/New_York - no changes since v2.215 2.215 2018-05-04 16:21:28+10:00 Australia/Melbourne (TRIAL RELEASE) - do not re-fold folded lines (Marc Bradshaw) 2.214 2017-09-08 14:21:20-04:00 America/New_York - the method header_raw_prepend is now available on emails and headers 2.213 2017-01-11 09:21:54-05:00 America/New_York - no changes since v2.212 2.212 2016-12-18 20:05:09-05:00 America/New_York (TRIAL RELEASE) - add an $index arg to ->header to get the nth header (thanks, Pali Rohár) 2.211 2016-11-12 09:39:09-05:00 America/New_York - fix a fencepost error in headers and header_names that led to a spurious undef in return and to a warning (thanks, Pali Rohár) 2.210 2016-03-05 12:16:16-05:00 America/New_York - fix a bug where folding treated the string "0" as an empty string (thanks, Pali Rohár) 2.209 2015-10-11 22:57:04-04:00 America/New_York (TRIAL RELEASE) - avoid opportunity for pathological backtracking behavior on malformed messages 2.208 2015-07-20 20:34:04-04:00 America/New_York - same as v2.207 - ...but bump perl required to v5.8 2.207 2015-07-04 14:23:36-04:00 America/New_York (TRIAL RELEASE) - fold headers passed to header arg in create method https://github.com/rjbs/Email-Simple/issues/7 2.206 2015-03-26 23:30:51-04:00 America/New_York - the changes from 2.204 are back (and re-listed here), but now with the added benefit of not breaking Email::MIME; see the git repository for the sordid details - provide header_raw and header_raw_set for consistent behavior between Email::Simple and Email::MIME; also, header_raw_pairs 2.205 2015-03-26 14:54:45-04:00 America/New_York - undo changes from 2.204 until safe Email::MIME upgrade path is available 2.204 2015-03-25 22:50:49-04:00 America/New_York - provide header_raw and header_raw_set for consistent behavior between Email::Simple and Email::MIME; also, header_raw_pairs 2.203 2014-02-14 21:56:14-05:00 America/New_York - translate vertical whitespace in headers into horizontal whitespace, with a warning 2.202 2013-09-04 09:48:33 America/New_York repackage with Dist::Zilla; update repo and bug tracker 2.201 2013-04-16 no changes 2.200_01 2013-04-09 preserve the original header layout unless changed 2.103 2013-04-09 fix a bug in header unfolding where "0\n 1" could be unfolded to "01" 2.102 2012-07-13 recognize crlf correctly even if there is no body (thanks, Christian Walde) 2.101 2011-12-23 remove instruction to use ::Creator instead of just ->create documentation improvements (thanks, Michael Stevens) 2.100 2009-11-03 merge Email-Simple-Creator into Email-Simple distribution 2.005 2009-01-22 add repository metadata 2.004 2008-06-25 publicize default_header_class method remove the long-deprecated Headers.pm 2.003 2007-07-19 improve tests, for 5.5 compat remove conditional circular prereq on Email::MIME, replace it with a warning and delay 2.002 2007-07-14 change initialization order to unbreak Email::MIME do not return ->body from ->body_set to simplify subclass behavior 2.001 2007-07-13 fix t/perl-minver.t to properly skip if T::MV not installed retroactively set 2.000 release date! 2.000 2007-07-13 huge improvement to speed of bodyless message parsing pointed out by Dan Dascalescu; thanks! more documentation of header class new Header crlf defaults to real CRLF fix tests to avoid requiring 5.6 1.999 2007-03-20 fix bug 25496: deletion of headers affected the wrong range, sometimes deleting too many headers -- thanks, Nicholas Oxhoej! fix bug 24922: errant space in last header of CRLF-delim email thanks, Barry Downes and Alex Vandiver 1.998 2007-02-07 MAJOR REFACTORING OF GUTS If you run Email::MIME, you MUST be running Email::MIME 1.857 or better. require Email::MIME 1.857 in Makefile.PL only if an older version is already installed boldly moving forward with refactored headers and Email::Simple:::Header greatly reduce memory footprint add crlf method to allow other modules to avoid ->{mycrlf} fix broken header-junk test 1.996 2006-11-27 - do not wrap Content-Type field; it can cause Outlook to go nuts while this is a special case, it does not make E::S incorrect, as folding long headers is allowed (for aesthetics) and not mandated 1.995 2006-10-19 - tentative refactoring of headers 1.992 2006-10-05 - fix a number of bugs when setting multiple headers, which would often refuse to set more values than were currently present - added a test for prepending (rather than appending) headers; while E::S does not yet support this, the header behavior will be easier to replace in future versions, and this is a forward-looking test 1.990 2006-09-05 - ->header('foo') returns false if there is no foo header (formerly '') - croak if an undef value is passed to new() 1.980 2006-08-17 - fix _fold() to add a missing line ending [RT #20764] (Brian Cassidy) 1.970 2006-08-17 - bring ->headers method into Email::Simple - ->header_names and ->header_pairs 1.96 2006-07-28 - output headers in predictable order - give tests more meaningful names - improved test coverage 1.95 2006-07-21 - update PEP url - reorganize dist 1.94 2006-07-03 - Fix folding of long headers with \r as line ending (thanks Adam Worrall) - add tests for message with no body 1.92 2004-11-11 - Update dependencies. - Update test suite to support proper Test::More syntax. 1.91 2004-10-27 - Tests use alarm(), skip those tests on MSWin32. - body() is initialized to '' if it isn't defined. - Author changes. 1.9 Fix our own damned line-wrapping. 1.8 Do our own damned line-wrapping 1.7 Sample, don't assume, what CRLF we're using. This means that mail with funny crlfs is round-trippable. 1.61 fixes to test suite. there was a 5.6ish open my $fh which led to test failures under 5.00503 1.6 - fixes to test suite. We were using no_plan which fails on older versions of Test::Harness 1.5 - fixes more warnings during ->as_string calls Documents more strongly that Email::Simple is intended for use with RFC2822 messages only 1.4 - fixes a warning emitted during ->as_string calls fix for header unfolding 1.3 - Many fixes from Richard Clamp 1.2 - Text::Wrapper->Text::Wrap 0.01 Thu Feb 13 15:07:01 2003 - original version; created by h2xs 1.22 with options -b 5.5.3 -AX -n Email::Simple Email-Simple-2.216/MANIFEST000644 000767 000024 00000001562 13306001053 015233 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v7.000. Changes LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Email/Simple.pm lib/Email/Simple/Creator.pm lib/Email/Simple/Header.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/badly-folded.t t/basic.t t/create.t t/ct-header.t t/folding.t t/header-case.t t/header-junk.t t/header-many.t t/header-names.t t/header-new.t t/header-pairs.t t/header-prepend.t t/header-space.t t/header-zero.t t/long-msgid.t t/many-repeats.t t/no-body.t t/preserve-linefeed.t t/test-mails/badly-folded t/test-mails/badly-folded-noindent t/test-mails/josey-fold t/test-mails/josey-nobody t/test-mails/josey-nobody-blank t/test-mails/josey-nofold t/test-mails/junk-in-header t/test-mails/long-msgid t/test-mails/many-repeats t/undef-message.t t/unit.t xt/author/pod-syntax.t xt/release/changes_has_content.t Email-Simple-2.216/t/000755 000767 000024 00000000000 13306001053 014341 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/xt/000755 000767 000024 00000000000 13306001053 014531 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/README000644 000767 000024 00000000602 13306001053 014754 0ustar00rjbsstaff000000 000000 This archive contains the distribution Email-Simple, version 2.216: simple parsing of RFC2822 message format and headers This software is copyright (c) 2003 by Simon Cozens. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v7.000. Email-Simple-2.216/META.yml000644 000767 000024 00000026672 13306001053 015364 0ustar00rjbsstaff000000 000000 --- abstract: 'simple parsing of RFC2822 message format and headers' author: - 'Simon Cozens' - 'Casey West' - 'Ricardo SIGNES' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' Test::More: '0.96' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 7.000, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Email-Simple requires: Carp: '0' Email::Date::Format: '0' perl: '5.008' strict: '0' warnings: '0' resources: bugtracker: https://github.com/rjbs/Email-Simple/issues homepage: https://github.com/rjbs/Email-Simple repository: https://github.com/rjbs/Email-Simple.git version: '2.216' x_Dist_Zilla: perl: version: '5.026001' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@RJBS/Git::GatherDir' version: '2.043' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RJBS/CheckPrereqsIndexed' version: '0.020' - class: Dist::Zilla::Plugin::CheckExtraTests name: '@RJBS/CheckExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::RJBS phase: build run_under_travis: 0 skip: [] name: '@RJBS/RJBS-Outdated' version: '0.054' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 0 modules: [] phase: release run_under_travis: 0 skip: [] name: '@RJBS/CPAN-Outdated' version: '0.054' - class: Dist::Zilla::Plugin::PruneCruft name: '@RJBS/@Filter/PruneCruft' version: '7.000' - class: Dist::Zilla::Plugin::ManifestSkip name: '@RJBS/@Filter/ManifestSkip' version: '7.000' - class: Dist::Zilla::Plugin::MetaYAML name: '@RJBS/@Filter/MetaYAML' version: '7.000' - class: Dist::Zilla::Plugin::License name: '@RJBS/@Filter/License' version: '7.000' - class: Dist::Zilla::Plugin::Readme name: '@RJBS/@Filter/Readme' version: '7.000' - class: Dist::Zilla::Plugin::ExecDir name: '@RJBS/@Filter/ExecDir' version: '7.000' - class: Dist::Zilla::Plugin::ShareDir name: '@RJBS/@Filter/ShareDir' version: '7.000' - class: Dist::Zilla::Plugin::Manifest name: '@RJBS/@Filter/Manifest' version: '7.000' - class: Dist::Zilla::Plugin::TestRelease name: '@RJBS/@Filter/TestRelease' version: '7.000' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RJBS/@Filter/ConfirmRelease' version: '7.000' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RJBS/@Filter/UploadToCPAN' version: '7.000' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@RJBS/MakeMaker' version: '7.000' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RJBS/AutoPrereqs' version: '7.000' - class: Dist::Zilla::Plugin::Git::NextVersion config: Dist::Zilla::Plugin::Git::NextVersion: first_version: '0.001' version_by_branch: 1 version_regexp: (?^:^([0-9]+\.[0-9]+)$) Dist::Zilla::Role::Git::Repo: git_version: 2.17.0 repo_root: . name: '@RJBS/Git::NextVersion' version: '2.043' - class: Dist::Zilla::Plugin::PkgVersion name: '@RJBS/PkgVersion' version: '7.000' - class: Dist::Zilla::Plugin::MetaConfig name: '@RJBS/MetaConfig' version: '7.000' - class: Dist::Zilla::Plugin::MetaJSON name: '@RJBS/MetaJSON' version: '7.000' - class: Dist::Zilla::Plugin::NextRelease name: '@RJBS/NextRelease' version: '7.000' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@RJBS/Test::ChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RJBS/PodSyntaxTests' version: '7.000' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@RJBS/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@RJBS/TestMoreWithSubtests' version: '7.000' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@RJBS' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@RJBS/SingleEncoding' version: '4.015' - class: Pod::Weaver::Section::Name name: '@RJBS/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@RJBS/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@RJBS/Prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: '@RJBS/Synopsis' version: '4.015' - class: Pod::Weaver::Section::Generic name: '@RJBS/Description' version: '4.015' - class: Pod::Weaver::Section::Generic name: '@RJBS/Overview' version: '4.015' - class: Pod::Weaver::Section::Generic name: '@RJBS/Stability' version: '4.015' - class: Pod::Weaver::Section::Collect name: Attributes version: '4.015' - class: Pod::Weaver::Section::Collect name: Methods version: '4.015' - class: Pod::Weaver::Section::Collect name: Functions version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@RJBS/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@RJBS/postlude' version: '4.015' - class: Pod::Weaver::Section::Authors name: '@RJBS/Authors' version: '4.015' - class: Pod::Weaver::Section::Contributors name: '@RJBS/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@RJBS/Legal' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@RJBS/List' version: '4.015' name: '@RJBS/PodWeaver' version: '4.009' - class: Dist::Zilla::Plugin::GithubMeta name: '@RJBS/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.17.0 repo_root: . name: '@RJBS/@Git/Check' version: '2.043' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.17.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Commit' version: '2.043' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: '2.216' tag_format: '%v' tag_message: v%v Dist::Zilla::Role::Git::Repo: git_version: 2.17.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Tag' version: '2.043' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - 'rjbs :' - 'github :' remotes_must_exist: 0 Dist::Zilla::Role::Git::Repo: git_version: 2.17.0 repo_root: . name: '@RJBS/@Git/Push' version: '2.043' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.17.0 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@RJBS/Git::Contributors' version: '0.034' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '7.000' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '7.000' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '7.000' x_contributors: - 'Brian Cassidy ' - 'Christian Walde ' - 'Marc Bradshaw ' - 'Michael Stevens ' - 'Pali ' - 'Ricardo SIGNES ' - 'Ronald F. Guilmette ' - 'William Yardley ' x_generated_by_perl: v5.26.1 x_serialization_backend: 'YAML::Tiny version 1.73' Email-Simple-2.216/lib/000755 000767 000024 00000000000 13306001053 014644 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/Makefile.PL000644 000767 000024 00000002427 13306001053 016055 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v7.000. use strict; use warnings; use 5.008; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "simple parsing of RFC2822 message format and headers", "AUTHOR" => "Simon Cozens, Casey West, Ricardo SIGNES", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Email-Simple", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008", "NAME" => "Email::Simple", "PREREQ_PM" => { "Carp" => 0, "Email::Date::Format" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Test::More" => "0.96" }, "VERSION" => "2.216", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Email::Date::Format" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Test::More" => "0.96", "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Email-Simple-2.216/META.json000644 000767 000024 00000043540 13306001053 015525 0ustar00rjbsstaff000000 000000 { "abstract" : "simple parsing of RFC2822 message format and headers", "author" : [ "Simon Cozens", "Casey West", "Ricardo SIGNES" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 7.000, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Email-Simple", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Encode" : "0", "Test::More" : "0", "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Carp" : "0", "Email::Date::Format" : "0", "perl" : "5.008", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Test::More" : "0.96" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/rjbs/Email-Simple/issues" }, "homepage" : "https://github.com/rjbs/Email-Simple", "repository" : { "type" : "git", "url" : "https://github.com/rjbs/Email-Simple.git", "web" : "https://github.com/rjbs/Email-Simple" } }, "version" : "2.216", "x_Dist_Zilla" : { "perl" : { "version" : "5.026001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@RJBS/Git::GatherDir", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RJBS/CheckPrereqsIndexed", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@RJBS/CheckExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::RJBS" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@RJBS/RJBS-Outdated", "version" : "0.054" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 0, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [] } }, "name" : "@RJBS/CPAN-Outdated", "version" : "0.054" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RJBS/@Filter/PruneCruft", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@RJBS/@Filter/ManifestSkip", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RJBS/@Filter/MetaYAML", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RJBS/@Filter/License", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@RJBS/@Filter/Readme", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RJBS/@Filter/ExecDir", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RJBS/@Filter/ShareDir", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RJBS/@Filter/Manifest", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RJBS/@Filter/TestRelease", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RJBS/@Filter/ConfirmRelease", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RJBS/@Filter/UploadToCPAN", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@RJBS/MakeMaker", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RJBS/AutoPrereqs", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "config" : { "Dist::Zilla::Plugin::Git::NextVersion" : { "first_version" : "0.001", "version_by_branch" : 1, "version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.17.0", "repo_root" : "." } }, "name" : "@RJBS/Git::NextVersion", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@RJBS/PkgVersion", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RJBS/MetaConfig", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RJBS/MetaJSON", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RJBS/NextRelease", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@RJBS/Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RJBS/PodSyntaxTests", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@RJBS/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@RJBS/TestMoreWithSubtests", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@RJBS" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@RJBS/SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@RJBS/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@RJBS/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/Prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Synopsis", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Description", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Overview", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Stability", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Attributes", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Methods", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Functions", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@RJBS/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@RJBS/Authors", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@RJBS/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@RJBS/Legal", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@RJBS/List", "version" : "4.015" } ] } }, "name" : "@RJBS/PodWeaver", "version" : "4.009" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RJBS/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.17.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Check", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.17.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Commit", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "2.216", "tag_format" : "%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.17.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Tag", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "rjbs :", "github :" ], "remotes_must_exist" : 0 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.17.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Push", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.17.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@RJBS/Git::Contributors", "version" : "0.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "7.000" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "7.000" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "7.000" } }, "x_contributors" : [ "Brian Cassidy ", "Christian Walde ", "Marc Bradshaw ", "Michael Stevens ", "Pali ", "Ricardo SIGNES ", "Ronald F. Guilmette ", "William Yardley " ], "x_generated_by_perl" : "v5.26.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" } Email-Simple-2.216/dist.ini000644 000767 000024 00000000256 13306001053 015545 0ustar00rjbsstaff000000 000000 name = Email-Simple author = Simon Cozens author = Casey West author = Ricardo SIGNES license = Perl_5 copyright_holder = Simon Cozens copyright_year = 2003 [@RJBS] Email-Simple-2.216/lib/Email/000755 000767 000024 00000000000 13306001053 015673 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/lib/Email/Simple/000755 000767 000024 00000000000 13306001053 017124 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/lib/Email/Simple.pm000644 000767 000024 00000037474 13306001053 017501 0ustar00rjbsstaff000000 000000 use 5.008; use strict; use warnings; package Email::Simple; # ABSTRACT: simple parsing of RFC2822 message format and headers $Email::Simple::VERSION = '2.216'; use Carp (); use Email::Simple::Creator; use Email::Simple::Header; our $GROUCHY = 0; # We are liberal in what we accept. sub __crlf_re { qr/\x0a\x0d|\x0d\x0a|\x0a|\x0d/; } #pod =head1 SYNOPSIS #pod #pod use Email::Simple; #pod my $email = Email::Simple->new($text); #pod #pod my $from_header = $email->header("From"); #pod my @received = $email->header("Received"); #pod #pod $email->header_set("From", 'Simon Cozens '); #pod #pod my $old_body = $email->body; #pod $email->body_set("Hello world\nSimon"); #pod #pod print $email->as_string; #pod #pod ...or, to create a message from scratch... #pod #pod my $email = Email::Simple->create( #pod header => [ #pod From => 'casey@geeknest.com', #pod To => 'drain@example.com', #pod Subject => 'Message in a bottle', #pod ], #pod body => '...', #pod ); #pod #pod $email->header_set( 'X-Content-Container' => 'bottle/glass' ); #pod #pod print $email->as_string; #pod #pod =head1 DESCRIPTION #pod #pod The Email:: namespace was begun as a reaction against the increasing complexity #pod and bugginess of Perl's existing email modules. C modules are meant #pod to be simple to use and to maintain, pared to the bone, fast, minimal in their #pod external dependencies, and correct. #pod #pod =method new #pod #pod my $email = Email::Simple->new($message, \%arg); #pod #pod This method parses an email from a scalar containing an RFC2822 formatted #pod message and returns an object. C<$message> may be a reference to a message #pod string, in which case the string will be altered in place. This can result in #pod significant memory savings. #pod #pod If you want to create a message from scratch, you should use the C> #pod method. #pod #pod Valid arguments are: #pod #pod header_class - the class used to create new header objects #pod The named module is not 'require'-ed by Email::Simple! #pod #pod =cut sub new { my ($class, $text, $arg) = @_; $arg ||= {}; Carp::croak 'Unable to parse undefined message' if ! defined $text; my $text_ref = (ref $text || '' eq 'SCALAR') ? $text : \$text; my ($pos, $mycrlf) = $class->_split_head_from_body($text_ref); my $self = bless { mycrlf => $mycrlf } => $class; my $head; if (defined $pos) { $head = substr $$text_ref, 0, $pos, ''; substr($head, -(length $mycrlf)) = ''; } else { $head = $$text_ref; $text_ref = \''; } my $header_class = $arg->{header_class} || $self->default_header_class; $self->header_obj_set( $header_class->new(\$head, { crlf => $self->crlf }) ); $self->body_set($text_ref); return $self; } # Given the text of an email, return ($pos, $crlf) where $pos is the position # at which the body text begins and $crlf is the type of newline used in the # message. sub _split_head_from_body { my ($self, $text_ref) = @_; # For body/header division, see RFC 2822, section 2.1 # # Honestly, are we *ever* going to have LFCR messages?? -- rjbs, 2015-10-11 my $re = qr{\x0a\x0d\x0a\x0d|\x0d\x0a\x0d\x0a|\x0d\x0d|\x0a\x0a}; if ($$text_ref =~ /($re)/gsm) { my $crlf = substr $1, 0, length($1)/2; return (pos($$text_ref), $crlf); } else { # The body is, of course, optional. my $re = $self->__crlf_re; $$text_ref =~ /($re)/gsm; return (undef, ($1 || "\n")); } } #pod =method create #pod #pod my $email = Email::Simple->create(header => [ @headers ], body => '...'); #pod #pod This method is a constructor that creates an Email::Simple object #pod from a set of named parameters. The C
parameter's value is a #pod list reference containing a set of headers to be created. The C #pod parameter's value is a scalar value holding the contents of the message #pod body. Line endings in the body will normalized to CRLF. #pod #pod If no C header is specified, one will be provided for you based on the #pod C of the local machine. This is because the C field is a required #pod header and is a pain in the neck to create manually for every message. The #pod C field is also a required header, but it is I provided for you. #pod #pod =cut our $CREATOR = 'Email::Simple::Creator'; sub create { my ($class, %args) = @_; # We default it in here as well as below because by having it here, then we # know that if there are no other headers, we'll get the proper CRLF. # Otherwise, we get a message with incorrect CRLF. -- rjbs, 2007-07-13 my $headers = $args{header} || [ Date => $CREATOR->_date_header ]; my $body = $args{body} || ''; my $empty = q{}; my $header = \$empty; for my $idx (map { $_ * 2 } 0 .. @$headers / 2 - 1) { my ($key, $value) = @$headers[ $idx, $idx + 1 ]; $CREATOR->_add_to_header($header, $key, $value); } $CREATOR->_finalize_header($header); my $email = $class->new($header); $email->header_raw_set(Date => $CREATOR->_date_header) unless defined $email->header_raw('Date'); $body = (join $CREATOR->_crlf, split /\x0d\x0a|\x0a\x0d|\x0a|\x0d/, $body) . $CREATOR->_crlf; $email->body_set($body); return $email; } #pod =method header_obj #pod #pod my $header = $email->header_obj; #pod #pod This method returns the object representing the email's header. For the #pod interface for this object, see L. #pod #pod =cut sub header_obj { my ($self) = @_; return $self->{header}; } # Probably needs to exist in perpetuity for modules released during the "__head # is tentative" phase, until we have a way to force modules below us on the # dependency tree to upgrade. i.e., never and/or in Perl 6 -- rjbs, 2006-11-28 BEGIN { *__head = \&header_obj } #pod =method header_obj_set #pod #pod $email->header_obj_set($new_header_obj); #pod #pod This method substitutes the given new header object for the email's existing #pod header object. #pod #pod =cut sub header_obj_set { my ($self, $obj) = @_; $self->{header} = $obj; } #pod =method header #pod #pod my @values = $email->header($header_name); #pod my $first = $email->header($header_name); #pod my $value = $email->header($header_name, $index); #pod #pod In list context, this returns every value for the named header. In scalar #pod context, it returns the I value for the named header. If second #pod parameter is specified then instead I value it returns value at #pod position C<$index> (negative C<$index> is from the end). #pod #pod =method header_set #pod #pod $email->header_set($field, $line1, $line2, ...); #pod #pod Sets the header to contain the given data. If you pass multiple lines #pod in, you get multiple headers, and order is retained. If no values are given to #pod set, the header will be removed from to the message entirely. #pod #pod =method header_raw #pod #pod This is another name (and the preferred one) for C
. #pod #pod =method header_raw_set #pod #pod This is another name (and the preferred one) for C. #pod #pod =method header_raw_prepend #pod #pod $email->header_raw_prepend($field => $value); #pod #pod This method adds a new instance of the name field as the first field in the #pod header. #pod #pod =method header_names #pod #pod my @header_names = $email->header_names; #pod #pod This method returns the list of header names currently in the email object. #pod These names can be passed to the C
method one-at-a-time to get header #pod values. You are guaranteed to get a set of headers that are unique. You are not #pod guaranteed to get the headers in any order at all. #pod #pod For backwards compatibility, this method can also be called as B. #pod #pod =method header_pairs #pod #pod my @headers = $email->header_pairs; #pod #pod This method returns a list of pairs describing the contents of the header. #pod Every other value, starting with and including zeroth, is a header name and the #pod value following it is the header value. #pod #pod =method header_raw_pairs #pod #pod This is another name (and the preferred one) for C. #pod #pod =cut BEGIN { no strict 'refs'; for my $method (qw( header_raw header header_raw_set header_set header_raw_prepend header_raw_pairs header_pairs header_names )) { *$method = sub { (shift)->header_obj->$method(@_) }; } *headers = \&header_names; } #pod =method body #pod #pod Returns the body text of the mail. #pod #pod =cut sub body { my ($self) = @_; return (defined ${ $self->{body} }) ? ${ $self->{body} } : ''; } #pod =method body_set #pod #pod Sets the body text of the mail. #pod #pod =cut sub body_set { my ($self, $text) = @_; my $text_ref = ref $text ? $text : \$text; $self->{body} = $text_ref; return; } #pod =method as_string #pod #pod Returns the mail as a string, reconstructing the headers. #pod #pod =cut sub as_string { my $self = shift; return $self->header_obj->as_string . $self->crlf . $self->body; } #pod =method crlf #pod #pod This method returns the type of newline used in the email. It is an accessor #pod only. #pod #pod =cut sub crlf { $_[0]->{mycrlf} } #pod =method default_header_class #pod #pod This returns the class used, by default, for header objects, and is provided #pod for subclassing. The default default is Email::Simple::Header. #pod #pod =cut sub default_header_class { 'Email::Simple::Header' } 1; =pod =encoding UTF-8 =head1 NAME Email::Simple - simple parsing of RFC2822 message format and headers =head1 VERSION version 2.216 =head1 SYNOPSIS use Email::Simple; my $email = Email::Simple->new($text); my $from_header = $email->header("From"); my @received = $email->header("Received"); $email->header_set("From", 'Simon Cozens '); my $old_body = $email->body; $email->body_set("Hello world\nSimon"); print $email->as_string; ...or, to create a message from scratch... my $email = Email::Simple->create( header => [ From => 'casey@geeknest.com', To => 'drain@example.com', Subject => 'Message in a bottle', ], body => '...', ); $email->header_set( 'X-Content-Container' => 'bottle/glass' ); print $email->as_string; =head1 DESCRIPTION The Email:: namespace was begun as a reaction against the increasing complexity and bugginess of Perl's existing email modules. C modules are meant to be simple to use and to maintain, pared to the bone, fast, minimal in their external dependencies, and correct. =head1 METHODS =head2 new my $email = Email::Simple->new($message, \%arg); This method parses an email from a scalar containing an RFC2822 formatted message and returns an object. C<$message> may be a reference to a message string, in which case the string will be altered in place. This can result in significant memory savings. If you want to create a message from scratch, you should use the C> method. Valid arguments are: header_class - the class used to create new header objects The named module is not 'require'-ed by Email::Simple! =head2 create my $email = Email::Simple->create(header => [ @headers ], body => '...'); This method is a constructor that creates an Email::Simple object from a set of named parameters. The C
parameter's value is a list reference containing a set of headers to be created. The C parameter's value is a scalar value holding the contents of the message body. Line endings in the body will normalized to CRLF. If no C header is specified, one will be provided for you based on the C of the local machine. This is because the C field is a required header and is a pain in the neck to create manually for every message. The C field is also a required header, but it is I provided for you. =head2 header_obj my $header = $email->header_obj; This method returns the object representing the email's header. For the interface for this object, see L. =head2 header_obj_set $email->header_obj_set($new_header_obj); This method substitutes the given new header object for the email's existing header object. =head2 header my @values = $email->header($header_name); my $first = $email->header($header_name); my $value = $email->header($header_name, $index); In list context, this returns every value for the named header. In scalar context, it returns the I value for the named header. If second parameter is specified then instead I value it returns value at position C<$index> (negative C<$index> is from the end). =head2 header_set $email->header_set($field, $line1, $line2, ...); Sets the header to contain the given data. If you pass multiple lines in, you get multiple headers, and order is retained. If no values are given to set, the header will be removed from to the message entirely. =head2 header_raw This is another name (and the preferred one) for C
. =head2 header_raw_set This is another name (and the preferred one) for C. =head2 header_raw_prepend $email->header_raw_prepend($field => $value); This method adds a new instance of the name field as the first field in the header. =head2 header_names my @header_names = $email->header_names; This method returns the list of header names currently in the email object. These names can be passed to the C
method one-at-a-time to get header values. You are guaranteed to get a set of headers that are unique. You are not guaranteed to get the headers in any order at all. For backwards compatibility, this method can also be called as B. =head2 header_pairs my @headers = $email->header_pairs; This method returns a list of pairs describing the contents of the header. Every other value, starting with and including zeroth, is a header name and the value following it is the header value. =head2 header_raw_pairs This is another name (and the preferred one) for C. =head2 body Returns the body text of the mail. =head2 body_set Sets the body text of the mail. =head2 as_string Returns the mail as a string, reconstructing the headers. =head2 crlf This method returns the type of newline used in the email. It is an accessor only. =head2 default_header_class This returns the class used, by default, for header objects, and is provided for subclassing. The default default is Email::Simple::Header. =head1 CAVEATS Email::Simple handles only RFC2822 formatted messages. This means you cannot expect it to cope well as the only parser between you and the outside world, say for example when writing a mail filter for invocation from a .forward file (for this we recommend you use L anyway). =head1 AUTHORS =over 4 =item * Simon Cozens =item * Casey West =item * Ricardo SIGNES =back =head1 CONTRIBUTORS =for stopwords Brian Cassidy Christian Walde Marc Bradshaw Michael Stevens Pali Ricardo SIGNES Ronald F. Guilmette William Yardley =over 4 =item * Brian Cassidy =item * Christian Walde =item * Marc Bradshaw =item * Michael Stevens =item * Pali =item * Ricardo SIGNES =item * Ronald F. Guilmette =item * William Yardley =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2003 by Simon Cozens. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut __END__ #pod =head1 CAVEATS #pod #pod Email::Simple handles only RFC2822 formatted messages. This means you cannot #pod expect it to cope well as the only parser between you and the outside world, #pod say for example when writing a mail filter for invocation from a .forward file #pod (for this we recommend you use L anyway). #pod #pod =cut Email-Simple-2.216/lib/Email/Simple/Header.pm000644 000767 000024 00000034154 13306001053 020661 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Email::Simple::Header; # ABSTRACT: the header of an Email::Simple message $Email::Simple::Header::VERSION = '2.216'; use Carp (); require Email::Simple; #pod =head1 SYNOPSIS #pod #pod my $email = Email::Simple->new($text); #pod #pod my $header = $email->header_obj; #pod print $header->as_string; #pod #pod =head1 DESCRIPTION #pod #pod This method implements the headers of an Email::Simple object. It is a very #pod minimal interface, and is mostly for private consumption at the moment. #pod #pod =method new #pod #pod my $header = Email::Simple::Header->new($head, \%arg); #pod #pod C<$head> is a string containing a valid email header, or a reference to such a #pod string. If a reference is passed in, don't expect that it won't be altered. #pod #pod Valid arguments are: #pod #pod crlf - the header's newline; defaults to CRLF #pod #pod =cut # We need to be able to: # * get all values by lc name # * produce all pairs, with case intact sub new { my ($class, $head, $arg) = @_; my $head_ref = ref $head ? $head : \$head; my $self = { mycrlf => $arg->{crlf} || "\x0d\x0a", }; my $headers = $class->_header_to_list($head_ref, $self->{mycrlf}); # for my $header (@$headers) { # push @{ $self->{order} }, $header->[0]; # push @{ $self->{head}{ $header->[0] } }, $header->[1]; # } # # $self->{header_names} = { map { lc $_ => $_ } keys %{ $self->{head} } }; $self->{headers} = $headers; bless $self => $class; } sub _header_to_list { my ($self, $head, $mycrlf) = @_; my @headers; my $crlf = Email::Simple->__crlf_re; while ($$head =~ m/\G(.+?)$crlf/go) { local $_ = $1; if (/^\s+/ or not /^([^:]+):\s*(.*)/) { # This is a continuation line. We fold it onto the end of # the previous header. next if !@headers; # Well, that sucks. We're continuing nothing? (my $trimmed = $_) =~ s/^\s+//; $headers[-1][0] .= $headers[-1][0] =~ /\S/ ? " $trimmed" : $trimmed; $headers[-1][1] .= "$mycrlf$_"; } else { push @headers, $1, [ $2, $_ ]; } } return \@headers; } #pod =method as_string #pod #pod my $string = $header->as_string(\%arg); #pod #pod This returns a stringified version of the header. #pod #pod =cut # RFC 2822, 3.6: # ...for the purposes of this standard, header fields SHOULD NOT be reordered # when a message is transported or transformed. More importantly, the trace # header fields and resent header fields MUST NOT be reordered, and SHOULD be # kept in blocks prepended to the message. sub as_string { my ($self, $arg) = @_; $arg ||= {}; my $header_str = ''; my $headers = $self->{headers}; my $fold_arg = { # at => (exists $arg->{fold_at} ? $arg->{fold_at} : $self->default_fold_at), # indent => (exists $arg->{fold_indent} ? $arg->{fold_indent} : $self->default_fold_indent), at => $self->_default_fold_at, indent => $self->_default_fold_indent, }; for (my $i = 0; $i < @$headers; $i += 2) { if (ref $headers->[ $i + 1 ]) { $header_str .= $headers->[ $i + 1 ][1] . $self->crlf; } else { my $header = "$headers->[$i]: $headers->[$i + 1]"; $header_str .= $self->_fold($header, $fold_arg); } } return $header_str; } #pod =method header_names #pod #pod This method returns a list of the unique header names found in this header, in #pod no particular order. #pod #pod =cut sub header_names { my $headers = $_[0]->{headers}; my %seen; grep { !$seen{ lc $_ }++ } map { $headers->[ $_ * 2 ] } 0 .. @$headers / 2 - 1; } #pod =method header_raw_pairs #pod #pod my @pairs = $header->header_raw_pairs; #pod my $first_name = $pairs[0]; #pod my $first_value = $pairs[1]; #pod #pod This method returns a list of all the field/value pairs in the header, in the #pod order that they appear in the header. (Remember: don't try assigning that to a #pod hash. Some fields may appear more than once!) #pod #pod =method header_pairs #pod #pod L is another name for L, which was the original #pod name for the method and which you'll see most often. In general, though, it's #pod better to be explicit and use L. (In Email::MIME, #pod L exists for letting the library do the header decoding for #pod you.) #pod #pod =cut sub header_raw_pairs { my ($self) = @_; my @pairs = map {; _str_value($_) } @{ $self->{headers} }; return @pairs; } sub header_pairs { my ($self) = @_; $self->header_raw_pairs; } #pod =method header_raw #pod #pod my $first_value = $header->header_raw($field); #pod my $nth_value = $header->header_raw($field, $index); #pod my @all_values = $header->header_raw($field); #pod #pod This method returns the value or values of the given header field. If the #pod named field does not appear in the header, this method returns false. #pod #pod =method header #pod #pod This method just calls C. It's the older name for C, #pod but it can be a problem because L, a subclass of Email::Simple, #pod makes C
return the header's decoded value. #pod #pod =cut sub _str_value { return ref $_[0] ? $_[0][0] : $_[0] } sub header_raw { my ($self, $field, $index) = @_; my $headers = $self->{headers}; my $lc_field = lc $field; if (wantarray and not defined $index) { return map { _str_value($headers->[ $_ * 2 + 1 ]) } grep { lc $headers->[ $_ * 2 ] eq $lc_field } 0 .. @$headers / 2 - 1; } else { $index = 0 unless defined $index; my $max = @$headers / 2 - 1; my @indexes = $index >= 0 ? (0 .. $max) : reverse(0 .. $max); $index = -1-$index if $index < 0; for (@indexes) { next unless lc $headers->[ $_ * 2 ] eq $lc_field; return _str_value($headers->[ $_ * 2 + 1 ]) if $index-- == 0; } return undef; } } *header = \&header_raw; #pod =method header_raw_set #pod #pod $header->header_raw_set($field => @values); #pod #pod This method updates the value of the given header. Existing headers have their #pod values set in place. Additional headers are added at the end. If no values #pod are given to set, the header will be removed from to the message entirely. #pod #pod =method header_set #pod #pod L is another name for L, which was the original #pod name for the method and which you'll see most often. In general, though, it's #pod better to be explicit and use L. (In Email::MIME, #pod L exists for letting the library do the header encoding for #pod you.) #pod #pod =cut # Header fields are lines composed of a field name, followed by a colon (":"), # followed by a field body, and terminated by CRLF. A field name MUST be # composed of printable US-ASCII characters (i.e., characters that have values # between 33 and 126, inclusive), except colon. A field body may be composed # of any US-ASCII characters, except for CR and LF. # However, a field body may contain CRLF when used in header "folding" and # "unfolding" as described in section 2.2.3. sub header_raw_set { my ($self, $field, @data) = @_; # I hate this block. -- rjbs, 2006-10-06 if ($Email::Simple::GROUCHY) { Carp::croak "field name contains illegal characters" unless $field =~ /^[\x21-\x39\x3b-\x7e]+$/; Carp::carp "field name is not limited to hyphens and alphanumerics" unless $field =~ /^[\w-]+$/; } my $headers = $self->{headers}; my $lc_field = lc $field; my @indices = grep { lc $headers->[$_] eq $lc_field } map { $_ * 2 } 0 .. @$headers / 2 - 1; if (@indices > @data) { my $overage = @indices - @data; splice @{$headers}, $_, 2 for reverse @indices[ -$overage .. -1 ]; pop @indices for (1 .. $overage); } elsif (@data > @indices) { my $underage = @data - @indices; for (1 .. $underage) { push @$headers, $field, undef; # temporary value push @indices, $#$headers - 1; } } for (0 .. $#indices) { $headers->[ $indices[$_] + 1 ] = $data[$_]; } return wantarray ? @data : $data[0]; } sub header_set { my ($self, $field, @data) = @_; $self->header_raw_set($field, @data); } #pod =method header_raw_prepend #pod #pod $header->header_raw_prepend($field => $value); #pod #pod This method adds a new instance of the name field as the first field in the #pod header. #pod #pod =cut sub header_raw_prepend { my ($self, $field, $value) = @_; Carp::confess("tried to prepend raw header with undefined field name") unless defined $field; Carp::confess(qq{tried to prepend raw header "$field" with undefined value}) unless defined $value; unshift @{ $self->{headers} }, $field => $value; return; } #pod =method crlf #pod #pod This method returns the newline string used in the header. #pod #pod =cut sub crlf { $_[0]->{mycrlf} } # =method fold # # my $folded = $header->fold($line, \%arg); # # Given a header string, this method returns a folded version, if the string is # long enough to warrant folding. This method is used internally. # # Valid arguments are: # # at - fold lines to be no longer than this length, if possible # if given and false, never fold headers # indent - indent lines with this string # =cut sub _fold { my ($self, $line, $arg) = @_; $arg ||= {}; $arg->{at} = $self->_default_fold_at unless exists $arg->{at}; $arg->{indent} = $self->_default_fold_indent unless exists $arg->{indent}; my $indent = $arg->{indent} || $self->_default_fold_indent; # We will not folder headers if... # * the header has vertical whitespace # * all vertical whitespace is followed by horizontal whitespace or END if ($line =~ /\n/) { if ($line =~ s/\n([^\s\t])/\n$indent$1/g) { Carp::carp("bad space in header: newline followed by non-space: $line"); } else { $line .= $self->crlf unless $line =~ /\n$/; return $line; } } return $line . $self->crlf unless $arg->{at} and $arg->{at} > 0; my $limit = ($arg->{at} || $self->_default_fold_at) - 1; return $line . $self->crlf if length $line <= $limit; return $self->__fold_objless($line, $limit, $indent, $self->crlf); } sub __fold_objless { my ($self, $line, $limit, $indent, $crlf) = @_; # We know it will not contain any new lines at present my $folded = ""; while (length $line) { if ($line =~ s/^(.{0,$limit})(\s|\z)//) { $folded .= $1 . $crlf; $folded .= $indent if length $line; } else { # Basically nothing we can do. :( $folded .= $line . $crlf; last; } } return $folded; } # =method default_fold_at # # This method (provided for subclassing) returns the default length at which to # try to fold header lines. The default default is 78. # # =cut sub _default_fold_at { 78 } # =method default_fold_indent # # This method (provided for subclassing) returns the default string used to # indent folded headers. The default default is a single space. # # =cut sub _default_fold_indent { " " } 1; __END__ =pod =encoding UTF-8 =head1 NAME Email::Simple::Header - the header of an Email::Simple message =head1 VERSION version 2.216 =head1 SYNOPSIS my $email = Email::Simple->new($text); my $header = $email->header_obj; print $header->as_string; =head1 DESCRIPTION This method implements the headers of an Email::Simple object. It is a very minimal interface, and is mostly for private consumption at the moment. =head1 METHODS =head2 new my $header = Email::Simple::Header->new($head, \%arg); C<$head> is a string containing a valid email header, or a reference to such a string. If a reference is passed in, don't expect that it won't be altered. Valid arguments are: crlf - the header's newline; defaults to CRLF =head2 as_string my $string = $header->as_string(\%arg); This returns a stringified version of the header. =head2 header_names This method returns a list of the unique header names found in this header, in no particular order. =head2 header_raw_pairs my @pairs = $header->header_raw_pairs; my $first_name = $pairs[0]; my $first_value = $pairs[1]; This method returns a list of all the field/value pairs in the header, in the order that they appear in the header. (Remember: don't try assigning that to a hash. Some fields may appear more than once!) =head2 header_pairs L is another name for L, which was the original name for the method and which you'll see most often. In general, though, it's better to be explicit and use L. (In Email::MIME, L exists for letting the library do the header decoding for you.) =head2 header_raw my $first_value = $header->header_raw($field); my $nth_value = $header->header_raw($field, $index); my @all_values = $header->header_raw($field); This method returns the value or values of the given header field. If the named field does not appear in the header, this method returns false. =head2 header This method just calls C. It's the older name for C, but it can be a problem because L, a subclass of Email::Simple, makes C
return the header's decoded value. =head2 header_raw_set $header->header_raw_set($field => @values); This method updates the value of the given header. Existing headers have their values set in place. Additional headers are added at the end. If no values are given to set, the header will be removed from to the message entirely. =head2 header_set L is another name for L, which was the original name for the method and which you'll see most often. In general, though, it's better to be explicit and use L. (In Email::MIME, L exists for letting the library do the header encoding for you.) =head2 header_raw_prepend $header->header_raw_prepend($field => $value); This method adds a new instance of the name field as the first field in the header. =head2 crlf This method returns the newline string used in the header. =head1 AUTHORS =over 4 =item * Simon Cozens =item * Casey West =item * Ricardo SIGNES =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2003 by Simon Cozens. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Email-Simple-2.216/lib/Email/Simple/Creator.pm000644 000767 000024 00000002404 13306001053 021061 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Email::Simple::Creator; # ABSTRACT: private helper for building Email::Simple objects $Email::Simple::Creator::VERSION = '2.216'; sub _crlf { "\x0d\x0a"; } sub _date_header { require Email::Date::Format; Email::Date::Format::email_date(); } our @CARP_NOT = qw(Email::Simple Email::MIME); sub _add_to_header { my ($class, $header, $key, $value) = @_; $value = '' unless defined $value; if ($value =~ s/[\x0a\x0b\x0c\x0d\x85\x{2028}\x{2029}]+/ /g) { Carp::carp("replaced vertical whitespace in $key header with space; this will become fatal in a future version"); } $$header .= Email::Simple::Header->__fold_objless("$key: $value", 78, q{ }, $class->_crlf); } sub _finalize_header { my ($class, $header) = @_; $$header .= $class->_crlf; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Email::Simple::Creator - private helper for building Email::Simple objects =head1 VERSION version 2.216 =head1 AUTHORS =over 4 =item * Simon Cozens =item * Casey West =item * Ricardo SIGNES =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2003 by Simon Cozens. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Email-Simple-2.216/xt/author/000755 000767 000024 00000000000 13306001053 016033 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/xt/release/000755 000767 000024 00000000000 13306001053 016151 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/xt/release/changes_has_content.t000644 000767 000024 00000002101 13306001053 022325 0ustar00rjbsstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '2.216'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); if ($encoding) { require Encode; $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK()); } close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Email-Simple-2.216/xt/author/pod-syntax.t000644 000767 000024 00000000252 13306001053 020325 0ustar00rjbsstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Email-Simple-2.216/t/header-junk.t000644 000767 000024 00000000537 13306001053 016730 0ustar00rjbsstaff000000 000000 #!perl use strict; use Test::More tests => 3; use_ok('Email::Simple'); sub read_file { local $/; local *FH; open FH, shift or die $!; return } my $mail_text = read_file("t/test-mails/junk-in-header"); my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); unlike($mail->as_string, qr/linden/, "junk droped from header"); Email-Simple-2.216/t/ct-header.t000644 000767 000024 00000001403 13306001053 016360 0ustar00rjbsstaff000000 000000 #!perl -w use strict; use Test::More tests => 2; use Email::Simple; # This asinine exception is made for Lotus Notes sending to Outlook. When # reconstituting this value (created by Lotus Notes), Outlook becomes unable to # locate the MIME boundary. The proper fix would be to note structure fields # and analyze and reformat them correctly. Fat chance. -- rjbs, 2006-11-27 my $ct_text = qq{Content-Type: multipart/alternative; boundary="=_alternative 0065F3338525722E_="\n}; { my $count = my @lines = split /\n/, $ct_text; is($count, 1, "we start with one line (Content-Type header)"); } { my $email = Email::Simple->new($ct_text); my $count = my @lines = split /\n/, $email->as_string; is($count, 1, "we end with one, because C-T doesn't wrap"); } Email-Simple-2.216/t/many-repeats.t000644 000767 000024 00000001047 13306001053 017135 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More tests => 4; sub read_file { local $/; local *FH; open FH, shift or die $!; return } use_ok("Email::Simple"); # Very basic functionality test my $mail_text = read_file("t/test-mails/many-repeats"); my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); my $body = $mail->body; $mail->body_set($body); is($mail->as_string, $mail_text, "Good grief, it's round-trippable"); is(Email::Simple->new($mail->as_string)->as_string, $mail_text, "Good grief, it's still round-trippable"); Email-Simple-2.216/t/badly-folded.t000644 000767 000024 00000001557 13306001053 017064 0ustar00rjbsstaff000000 000000 #!perl -w use strict; use Test::More tests => 5; # This time, with folding! use_ok("Email::Simple"); sub read_file { local $/; local *FH; open FH, shift or die $!; return } { my $mail_text = read_file("t/test-mails/badly-folded"); my $msg1 = Email::Simple->new($mail_text); my $msg2 = Email::Simple->new($msg1->as_string); is( $msg2->header('X-Sieve'), 'CMU Sieve 2.2', "still have X-Sieve header after round trip", ); } { my $mail_text = read_file("t/test-mails/badly-folded-noindent"); my $msg1 = Email::Simple->new($mail_text); is($msg1->header('Bar'), 'Bar', "got first header ok"); is( $msg1->header('Badly-Folded'), 'This header is badly folded because even though it goes onto the second line, it has no indent.', "got badly folded, middle header OK", ); is($msg1->header('Foo'), 'Foo', "got final header ok"); } Email-Simple-2.216/t/test-mails/000755 000767 000024 00000000000 13306001053 016423 5ustar00rjbsstaff000000 000000 Email-Simple-2.216/t/header-space.t000644 000767 000024 00000001011 13306001053 017040 0ustar00rjbsstaff000000 000000 #!perl -T use strict; use Test::More tests => 12; use Email::Simple; my @crlf = ( 'CR' => "\x0d", 'CRLF' => "\x0d\x0a", 'LF' => "\x0a", 'LFCR' => "\x0a\x0d", ); while (my ($name, $eol) = splice @crlf, 0, 2) { my $m = Email::Simple->new("Foo-Bar: Baz${eol}${eol}test${eol}"); is($m->header('foo-bar'), 'Baz', "no spaces trail with $name"); is($m->crlf, $eol, "correctly detected crlf value"); $m = Email::Simple->new("Foo-Bar: Baz${eol}"); is($m->crlf, $eol, "correctly detected crlf value"); } Email-Simple-2.216/t/header-many.t000644 000767 000024 00000005731 13306001053 016726 0ustar00rjbsstaff000000 000000 #!perl use strict; use Test::More tests => 16; use_ok('Email::Simple'); my $email_text = <new($email_text); isa_ok($email, "Email::Simple"); is_deeply( [ $email->header('alpha') ], [ 'this header comes first', 'this header comes third' ], "we get both values, in order, for a multi-entry header", ); is_deeply( [ $email->header_pairs ], [ Alpha => 'this header comes first', Bravo => 'this header comes second', Alpha => 'this header comes third', ], "and we get everything in order for header_pairs", ); my @rv = $email->header_set(alpha => ('header one', 'header three')); is_deeply( \@rv, [ 'header one', 'header three' ], "header_set in list context returns all set values", ); is_deeply( [ $email->header('alpha') ], [ 'header one', 'header three' ], "headers are replaced in order", ); is_deeply( [ $email->header_pairs ], [ Alpha => 'header one', Bravo => 'this header comes second', Alpha => 'header three', ], "and we still get everything in order for header_pairs", ); my $rv = $email->header_set(alpha => qw(h1 h3 h4)); is($rv, 'h1', "header_set in scalar context returns first set header"); is_deeply( [ $email->header('alpha') ], [ qw(h1 h3 h4) ], "headers are replaced in order, extras appended", ); is_deeply( [ $email->header_pairs ], [ Alpha => 'h1', Bravo => 'this header comes second', Alpha => 'h3', alpha => 'h4', ], "and we still get everything in order for header_pairs", ); $email->header_set(alpha => 'one is the loneliest header'); is_deeply( [ $email->header('alpha') ], [ 'one is the loneliest header' ], "and we drop down to one value for alpha header ok", ); is_deeply( [ $email->header_pairs ], [ Alpha => 'one is the loneliest header', Bravo => 'this header comes second', ], "and we still get everything in order for header_pairs", ); $email->header_set(Gamma => 'gammalon'); is_deeply( [ $email->header_pairs ], [ Alpha => 'one is the loneliest header', Bravo => 'this header comes second', Gamma => 'gammalon', ], "a third header goes in at the end", ); $email->header_set(alpha => ('header one', 'header omega')); is_deeply( [ $email->header_pairs ], [ Alpha => 'header one', Bravo => 'this header comes second', Gamma => 'gammalon', alpha => 'header omega', ], "and re-adding to the previously third header puts it fourth", ); $email->header_set('Bravo'); is_deeply( [ $email->header_pairs ], [ Alpha => 'header one', Gamma => 'gammalon', alpha => 'header omega', ], "Bravo header gets completely removed", ); $email->header_set('Omega'); is_deeply( [ $email->header_pairs ], [ Alpha => 'header one', Gamma => 'gammalon', alpha => 'header omega', ], "nothing weird happens when deleting absent headers", ); Email-Simple-2.216/t/folding.t000644 000767 000024 00000006705 13306001053 016160 0ustar00rjbsstaff000000 000000 #!perl -w use strict; use Test::More tests => 14; # This time, with folding! use_ok("Email::Simple"); sub read_file { local $/; local *FH; open FH, shift or die $!; return } my $mail_text = read_file("t/test-mails/josey-fold"); my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); is($mail->header("References"), q{<200211120937.JAA28130@xoneweb.opengroup.org> <1021112125524.ZM7503@skye.rdg.opengroup.org> <3DD221BB.13116D47@sun.com>}, "References header checks out"); is($mail->header("reFerEnceS"), q{<200211120937.JAA28130@xoneweb.opengroup.org> <1021112125524.ZM7503@skye.rdg.opengroup.org> <3DD221BB.13116D47@sun.com>}, "References header checks out with case folding"); is_deeply([$mail->header("Received")], [ 'from mailman.opengroup.org ([192.153.166.9]) by deep-dark-truthful-mirror.pad with smtp (Exim 3.36 #1 (Debian)) id 18Buh5-0006Zr-00 for ; Wed, 13 Nov 2002 10:24:23 +0000', '(qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000'], "And the received headers are folded gracefully, and multiple headers work"); { my $text = <<'END'; Fold-1: 1 2 3 Fold-2: 0 1 2 Body END my $email = Email::Simple->new($text); is($email->header('Fold-2'), '0 1 2', "we unfold with a false start string"); } { my $to = 'to@example.com'; my $from = 'from@example.com'; my $subject = 'A ' x 50; # Long enough to need to be folded my $email_1 = Email::Simple->create( header => [ To => $to, From => $from, Subject => $subject, # string specified in constructor does *not* get folded ] ); unlike($email_1->as_string, qr/\Q$subject/, "we fold the 50-A line"); } { my $to = 'to@example.com'; my $from = 'from@example.com'; my $subject = 'A ' x 50; # Long enough to need to be folded my $email_1 = Email::Simple->create( header => [ To => $to, From => $from, Subject => $subject, # string specified in constructor does *not* get folded ] ); $email_1->header_raw_prepend( 'Test' ,"This is a test of folding an existing header which is just the right xx\r\n size to fold twice" ); $email_1->header_raw_prepend( 'Test2' ,"This is a test of folding an existing header which is long enough to fold but should never fold because it is already folded\n manually." ); $email_1->header_raw_prepend( 'Test3', "this\n line\n is\n very\n folded" ); $email_1->header_raw_prepend( 'Test4', "Folded line with a crlf at the end\n" ); $email_1->header_raw_prepend( 'Test5', 'foobar' ); unlike($email_1->as_string(), qr/xx\r?\n\s+\r?\n/, 'we do not have a blank fold line' ); like( $email_1->as_string(), qr/This is a test of folding an existing header which is long enough to fold but should never fold because it is already folded\n manually./, 'do not refold if already folded long lines' ); like( $email_1->as_string(), qr/this\n line\n is\n very\n folded/, 'do not refold if already folded short lines' ); unlike($email_1->as_string(), qr/at the end\n\s+\n/, 'no double fold on line ending in newline' ); { my @warnings; my $string = do { local $SIG{__WARN__} = sub { push @warnings, $_[0] }; $email_1->header_raw_prepend( 'Test6', "Invalid\nFolding" ); $email_1->as_string; }; is(@warnings, 1, "setting an invalidly-folded header emits a warning"); like($warnings[0], qr/bad space/, "...and it's the right one"); like($string, qr/Test6: Invalid\r?\n Folding\r?\n/, "header fixed"); } } Email-Simple-2.216/t/undef-message.t000644 000767 000024 00000000332 13306001053 017247 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More tests => 3; use_ok("Email::Simple"); eval { Email::Simple->new }; ok( $@, 'throws an error' ); like( $@, qr/unable to parse undefined message/i, 'throws sane error' ); Email-Simple-2.216/t/unit.t000644 000767 000024 00000001705 13306001053 015510 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl # This is a series of unit tests to ensure that things do what I think # they do. use strict; use Email::Simple; package Email::Simple; use Test::More tests => 8; # Simple "email", no body my $text = "a\nb\nc\n"; my ($pos, $crlf) = Email::Simple->_split_head_from_body(\$text); is($pos, undef, "no body position!"); is($crlf, "\n", 'and \n is the crlf'); # Simple "email", properly formed $text = "a\n\nb\n"; ($pos, $crlf) = Email::Simple->_split_head_from_body(\$text); is($pos, 3, "body starts at pos 3"); is($crlf, "\n", 'and \n is the crlf'); # Simple "email" with blank lines $text = "a\n\nb\nc\n"; ($pos, $crlf) = Email::Simple->_split_head_from_body(\$text); is($pos, 3, "body starts at pos 3"); is($crlf, "\n", 'and \n is the crlf'); # Blank line as first line in email $text = "a\n\n\nb\nc\n"; ($pos, $crlf) = Email::Simple->_split_head_from_body(\$text); is($pos, 3, "body starts at pos 3"); is($crlf, "\n", 'and \n is the crlf'); Email-Simple-2.216/t/header-zero.t000644 000767 000024 00000000505 13306001053 016733 0ustar00rjbsstaff000000 000000 use Test::More tests => 1; use Email::Simple; my $m = Email::Simple->new("Foo-bar: foo\n"); $m->header_set("Foo-bar", "0000000000000000000000000000000000000000000000000000000000000000000 0"); is($m->as_string, "Foo-bar: 0000000000000000000000000000000000000000000000000000000000000000000\n 0\n\n", "Number zero in header"); Email-Simple-2.216/t/basic.t000644 000767 000024 00000005177 13306001053 015621 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More tests => 37; sub read_file { local $/; local *FH; open FH, shift or die $!; return } use_ok("Email::Simple"); # Very basic functionality test my $file_contents = read_file("t/test-mails/josey-nofold"); for my $mail_text ($file_contents, \$file_contents) { my $mail_text_string = ref $mail_text ? $$mail_text : $mail_text; my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); my $old_from; is($old_from = $mail->header("From"), 'Andrew Josey ', "We can get a header"); my $sc = 'Simon Cozens '; is($mail->header_set("From", $sc), $sc, "Setting returns new value"); is($mail->header("From"), $sc, "Which is consistently returned"); is( $mail->header("Bogus"), undef, "missing header returns undef" ); # Put andrew back: $mail->header_set("From", $old_from); my $body; like($body = $mail->body, qr/Austin Group Chair/, "Body has sane stuff in it"); my $old_body; my $hi = "Hi there!\n"; $mail->body_set($hi); is($mail->body, $hi, "Body can be set properly"); my $bye = "Goodbye!\n"; $mail->body_set(\$bye); is($mail->body, $bye, "Body can be set with a ref to a string, too"); $mail->body_set($body); is( $mail->as_string, $mail_text_string, "Good grief, it's round-trippable" ); is( Email::Simple->new($mail->as_string)->as_string, $mail_text_string, "Good grief, it's still round-trippable" ); { my $email = Email::Simple->new($mail->as_string); $email->body_set(undef); is( $email->body, '', "setting body to undef makes ->body return ''", ); $email->body_set(0); is( $email->body, '0', "setting body to false string makes ->body return that", ); $email->header_set('Previously-Unknown' => 'wonderful species'); is( $email->header('Previously-Unknown'), 'wonderful species', "we can add headers that were previously not in the message", ); like( $email->as_string, qr/Previously-Unknown: wonderful species/, "...and the show up in the stringification", ); } { # With nasty newlines my $nasty = "Subject: test\n\rTo: foo\n\r\n\rfoo\n\r"; my $mail = Email::Simple->new($nasty); my ($pos, $mycrlf) = Email::Simple->_split_head_from_body(\$nasty); is($pos, 26, "got proper header-end offset"); is($mycrlf, "\n\r", "got proper line terminator"); my $test = $mail->as_string; is($test, $nasty, "Round trip that too"); is(Email::Simple->new($mail->as_string)->as_string, $nasty, "... twice"); } } Email-Simple-2.216/t/header-case.t000644 000767 000024 00000000434 13306001053 016670 0ustar00rjbsstaff000000 000000 use Test::More tests => 1; use Email::Simple; my $m = Email::Simple->new("Foo-Bar: Baz\n\ntest\n"); $m->header_set("Foo-bar", "quux"); is($m->as_string, "Foo-Bar: quux test\n", "Only one header this time"); Email-Simple-2.216/t/no-body.t000644 000767 000024 00000000736 13306001053 016103 0ustar00rjbsstaff000000 000000 #!perl -w use strict; use Test::More tests => 5; # This time, with folding! use_ok("Email::Simple"); sub read_file { local $/; local *FH; open FH, shift or die $!; return } for ('', '-blank') { my $mail_text = read_file("t/test-mails/josey-nobody$_"); my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); is( $mail->header('From'), 'Andrew Josey ', 'correct From header on bodyless message', ); } Email-Simple-2.216/t/header-prepend.t000644 000767 000024 00000002415 13306001053 017413 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; use Test::More; # This test is not here to encourage you to muck about in the object guts, but # to provide a test for when Email::Simple has a way to provide optional # extended header munging. use_ok('Email::Simple'); my $email_text = <new($email_text); isa_ok($email, "Email::Simple"); $email->header_raw_prepend(Alpha => 'this header comes firstest'); is_deeply( [ $email->header_pairs ], [ Alpha => 'this header comes firstest', Alpha => 'this header comes first', Bravo => 'this header comes second', Alpha => 'this header comes third', ], "we can prepend an existing header", ); $email->header_raw_prepend('Zero' => 'and 0+1th'); $email->header_raw_prepend('Zero' => 'this header comes zeroeth'); is_deeply( [ $email->header_pairs ], [ Zero => 'this header comes zeroeth', Zero => 'and 0+1th', Alpha => 'this header comes firstest', Alpha => 'this header comes first', Bravo => 'this header comes second', Alpha => 'this header comes third', ], "we can prepend mutiply, too, and to a new header", ); done_testing; Email-Simple-2.216/t/header-new.t000644 000767 000024 00000003130 13306001053 016542 0ustar00rjbsstaff000000 000000 use strict; use Test::More tests => 7; # This test could test all manner of Email::Simple::Header stuff, but is mostly # just here specifically to test construction and sanity of result with both a # string AND a reference to it. -- rjbs, 2006-11-29 BEGIN { use_ok('Email::Simple::Header'); } my $header_string = <<'END_HEADER'; Foo: 1 Foo: 2 Foo: 3 Bar: 3 Baz: 1 END_HEADER for my $header_param ($header_string, \$header_string) { my $head = Email::Simple::Header->new($header_param); isa_ok($head, 'Email::Simple::Header'); for my $method (qw(header header_raw)) { subtest "checks via $method" => sub { is_deeply( [ $head->$method('foo') ], [ 1, 2, 3 ], "multi-value header", ); is_deeply( scalar $head->$method('foo'), 1, "single-value header", ); is_deeply( scalar $head->$method('foo', 0), 1, "first value", ); is_deeply( scalar $head->$method('foo', 1), 2, "second value", ); is_deeply( scalar $head->$method('foo', 2), 3, "third value", ); is_deeply( scalar $head->$method('foo', 3), undef, "non existent fourth value", ); is_deeply( scalar $head->$method('foo', -1), 3, "last value", ); is_deeply( scalar $head->$method('foo', -3), 1, "third value from end", ); is_deeply( scalar $head->$method('foo', -4), undef, "non existent fourth value from end", ); } } } Email-Simple-2.216/t/00-report-prereqs.t000644 000767 000024 00000013426 13306001053 017743 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Email-Simple-2.216/t/preserve-linefeed.t000644 000767 000024 00000000547 13306001053 020140 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More tests => 3; use_ok( 'Email::Simple' ); my $original = <<'EOM'; subject: =?utf-8?B?ZGVsLmljaW8udXMvbmV0d29yay9qb2VlIC0gW2Zyb20gbWlqaXRdIEJMQiBFY2MgMw==?= content-type: text/plain empty body EOM my $mail = Email::Simple->new( $original ); isa_ok( $mail, 'Email::Simple' ); is( $mail->as_string, $original ); Email-Simple-2.216/t/long-msgid.t000644 000767 000024 00000000664 13306001053 016574 0ustar00rjbsstaff000000 000000 #!perl -w use strict; use Test::More tests => 3; # This time, with folding! use_ok("Email::Simple"); sub read_file { local $/; local *FH; open FH, shift or die $!; return } my $mail_text = read_file("t/test-mails/long-msgid"); my $mail = Email::Simple->new($mail_text); isa_ok($mail, "Email::Simple"); SKIP: { skip "no alarm() on win32", 1 if $^O =~ /mswin32/i; alarm 5; ok($mail->as_string(), "Doesn't hang"); }; Email-Simple-2.216/t/header-pairs.t000644 000767 000024 00000001600 13306001053 017067 0ustar00rjbsstaff000000 000000 use Test::More tests => 3; use strict; $^W = 1; use_ok 'Email::Simple'; my $email = Email::Simple->new(<<'__MESSAGE__'); From: casey@geeknest.example.com X-Your-Face: your face is your face To: drain@example.com X-Your-Face: your face is my face X-Your-Face: from california Reply-To: xyzzy@plugh.example.net X-Your-Face: to the new york islface Subject: Message in a bottle HELP! __MESSAGE__ can_ok $email, 'header_names'; my @header_pairs = $email->header_pairs; is_deeply( \@header_pairs, [ 'From', 'casey@geeknest.example.com', 'X-Your-Face', 'your face is your face', 'To', 'drain@example.com', 'X-Your-Face', 'your face is my face', 'X-Your-Face', 'from california', 'Reply-To', 'xyzzy@plugh.example.net', 'X-Your-Face', 'to the new york islface', 'Subject', 'Message in a bottle', ], "header pairs came out properly", ); Email-Simple-2.216/t/00-report-prereqs.dd000644 000767 000024 00000002520 13306001053 020060 0ustar00rjbsstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Encode' => '0', 'Test::More' => '0', 'Test::Pod' => '1.41' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Email::Date::Format' => '0', 'perl' => '5.008', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Test::More' => '0.96' } } }; $x; }Email-Simple-2.216/t/create.t000644 000767 000024 00000006745 13306001053 016005 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More tests => 31; use_ok 'Email::Simple'; use_ok 'Email::Simple::Creator'; sub tested_email { my ($name, %args) = @_; my $email = Email::Simple->create(%args); isa_ok $email, 'Email::Simple', "$name message"; my $string = $email->as_string; my @last_two = ( substr($string, -2, 1), substr($string, -1, 1), ); is( sprintf("%03u %03u", map { ord } @last_two), '013 010', "$name: stringified message ends with std CRLF" ); unlike( $email->as_string, qr/(? body => $body, header => [ Subject => 'all tests and no code make rjbs something something', From => 'jack', To => 'sissy', ], ); } { # should get an automatic date header my $email = tested_email(auto_date => header => [ To => 'you', ], body => 'test test', ); like( $email->header('date'), qr/^[A-Z][a-z]{2},/, # lame -- rjbs, 2007-02-23 "we got an auto-generated date header starting with a DOW", ); } { # who needs args? (why is this legal? who knows -- rjbs, 2007-07-13) my $email = tested_email('argless'); like( $email->header('date'), qr/^[A-Z][a-z]{2},/, # lame -- rjbs, 2007-02-23 "we got an auto-generated date header starting with a DOW", ); } { # no need to add CRLF if it's there my $email = tested_email(has_crlf => header => [ To => 'you', ], body => "test test\x0d\x0a", ); } { # no date header, we provided one my $email = tested_email(has_date => header => [ Date => 'testing', 'X-Header' => 'one', 'X-Header' => 'two', 'X-Header' => 'three', ], body => q[This is a multi- line message.], ); my $expected = <<'END_MESSAGE'; Date: testing X-Header: one X-Header: two X-Header: three This is a multi- line message. END_MESSAGE my $string = $email->as_string; $string =~ s/\x0d\x0a/\n/gsm; is( $string, $expected, "we got just the string we expected", ); } { # a few headers with false values my $email = tested_email(falsies => header => [ Date => undef, Zero => 0, Empty => '', ], body => "The body is uninteresting.", ); is_deeply( [ $email->header_pairs ], [ Date => '', Zero => 0, Empty => '', ], "got the false headers back we want", ); my $expected = <<'END_MESSAGE'; Date: Zero: 0 Empty: The body is uninteresting. END_MESSAGE my $string = $email->as_string; $string =~ s/\x0d\x0a/\n/gsm; is( $string, $expected, "we got just the string we expected", ); } { # no date header, we provided one my @warnings; local $SIG{__WARN__} = sub { push @warnings, $_[0] }; my $email = tested_email(has_date => header => [ Date => 'testing', 'X-Header' => "foo\n\nbar", ], body => q[This is a single-line message.], ); is(@warnings, 1, "there was one warning"); like($warnings[0], qr/vertical whitespace/, 'and it was about \v characters'); my $expected = <<'END_MESSAGE'; Date: testing X-Header: foo bar This is a single-line message. END_MESSAGE my $string = $email->as_string; $string =~ s/\x0d\x0a/\n/gsm; is( $string, $expected, "we got just the string we expected", ); } Email-Simple-2.216/t/header-names.t000644 000767 000024 00000003310 13306001053 017054 0ustar00rjbsstaff000000 000000 use Test::More tests => 17; use strict; use warnings; use_ok 'Email::Simple'; my @emails; push @emails, Email::Simple->new(<<'__MESSAGE__'); From: casey@geeknest.com To: drain@example.com Subject: Message in a bottle __MESSAGE__ push @emails, Email::Simple->new(<<'__MESSAGE__'); From: casey@geeknest.com To: drain@example.com Subject: Message in a bottle subject: second subject! HELP! __MESSAGE__ for my $email (@emails) { for my $method ('header_names', 'headers') { can_ok($email, $method); is_deeply( [ qw(From To Subject) ], [ $email->$method() ], "have expected headers (via $method)" ); } } my $warned; $SIG{__WARN__} = sub { $warned = 1; warn $_[0]; }; my $email = Email::Simple->new(''); { $warned = 0; is_deeply( [ $email->headers() ], [], 'headers() returns empty list when no header was defined', ); ok( ! $warned, 'headers() does not produce any warning when no header was defined', ); } { $warned = 0; is_deeply( [ $email->header_names() ], [], 'header_names() returns empty list when no header was defined', ); ok( ! $warned, 'header_names() does not produce any warning when no header was defined', ); } { $warned = 0; is_deeply( [ $email->header_raw('unknown') ], [], 'header_raw returns empty list for unknwon header', ); ok( ! $warned, 'header_raw() does not produce any warning when no header was defined', ); } { $warned = 0; is_deeply( [ $email->header_raw_set('new_header', 'new_value') ], ['new_value'], 'header_raw_set returns new set value', ); ok( ! $warned, 'header_raw_set() does not produce any warning when no header was defined', ); } Email-Simple-2.216/t/test-mails/josey-nofold000644 000767 000024 00000007770 13306001053 020771 0ustar00rjbsstaff000000 000000 Received: (qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000 Resent-Date: 13 Nov 2002 10:10:49 -0000 Date: Wed, 13 Nov 2002 10:06:51 GMT From: Andrew Josey Message-Id: <1021113100650.ZM12997@skye.rdg.opengroup.org> In-Reply-To: Joanna Farley's message as of Nov 13, 9:56am. X-Mailer: Z-Mail (5.0.0 30July97) To: austin-group-l@opengroup.org Subject: Re: Defect in XBD lround MIME-Version: 1.0 Resent-Message-ID: Resent-To: austin-group-l@opengroup.org Resent-From: austin-group-l@opengroup.org X-Mailing-List: austin-group-l:archive/latest/4823 X-Loop: austin-group-l@opengroup.org Precedence: list Resent-Sender: austin-group-l-request@opengroup.org Content-Type: text/plain; charset=us-ascii Joanna, All Thanks. I got the following response from Fred Tydeman. C99 Defect Report (DR) 240 covers this. The main body of C99 (7.12.9.7) says range error, while Annex F (F.9.6.7 and F.9.6.5) says "invalid" (domain error). The result was to change 7.12.9.7 to allow for either range or domain error. The preferred error is domain error (so as match Annex F). So, no need to change XBD. regards Andrew On Nov 13, 9:56am in "Re: Defect in XBD lr", Joanna Farley wrote: > Sun's expert in this area after some discussions with a colleague > outside of Sun concluded that for lround, to align with both C99 and SUS > changes of the following form were necessary: > > + If x is +/-Inf/NaN, a domain error occurs, and > + errno is set to EDOM in MATH_ERRNO mode; > + the invalid exception is raised in MATH_ERREXCEPT mode. > [to align with C99 Annex F.4] > > + If x is too large to be represented as a long, a *range* error > may occur, and > + errno *may be* set to ERANGE in MATH_ERRNO mode; > [to align with C99 7.12.9.7] > + the invalid exception *is* raised in MATH_ERREXCEPT mode. > [to align with C99 Annex F.4] > > They believe it is a bit awkward to have errno set to ERANGE in > MATH_ERRNO mode yet the invalid exception raised in MAH_ERREXCEPT mode, > but that just reflects an imperfect mapping of the C notion of errno to > the IEEE 754 notion of data conversion. > > I'll work with our expert to draft text refecting the above to suggest > replacement text for lines 23678-23684 on lround page 721 of XSH6. > > Thanks > > Joanna > > > Andrew Josey wrote: > > > > The text referred to is MX shaded and part of the ISO 60559 floating > > point option. I do not think changing the Domain Error to a Range Error > > is the fix or at least not the fix for the NaN and +-Inf cases. ISO C > > 99 describes the range error case if the magnitude of x is too large as a > > may fail. I'll ask Fred T for his thoughts on this one... > > regards > > Andrew > > > > On Nov 12, 9:37am in "Defect in XBD lround", Erwin.Unruh@fujitsu-siemens.com wrote: > > > Defect report from : Erwin Unruh , Fujitsu Siemens Computers > > > > > > (Please direct followup comments direct to austin-group-l@opengroup.org) > > > > > > @ page 0 line 0 section lround objection {0} > > > > > > Problem: > > > > > > Defect code : 1. Error > > > > > > The function lround is described in http://www.opengroup.org/onlinepubs/007904975/functions/lround.html > > > On Error it is specified that errno has to be set to EDOM. However, the C99 standard ISO/IEC 9899:1999 (E) specifies this as a range error, which would result in a value of ERANGE. So an implementation could not be conformant to both these standards. > > > > > > Action: > > > > > > Change the value of errno to ERANGE, if the result is not represantable. More specific: In the description of the function, replace all occurences of "domain error" with "range error" and replace "EDOM" with "ERANGE" > > >-- End of excerpt from Erwin.Unruh@fujitsu-siemens.com > > ----- Andrew Josey The Open Group Austin Group Chair Apex Plaza,Forbury Road, Email: a.josey@opengroup.org Reading,Berks.RG1 1AX,England Tel: +44 118 9508311 ext 2250 Fax: +44 118 9500110 Email-Simple-2.216/t/test-mails/long-msgid000644 000767 000024 00000022472 13306001053 020415 0ustar00rjbsstaff000000 000000 Received: from ls2.sba.com ([206.69.91.6]:22703 helo=ls.sba.com) by smtp.paravolve.net with smtp (Exim 4.34) id 1BTp3v-0007sJ-Pj for jwb@paravolve.net; Fri, 28 May 2004 21:38:49 +0000 From: Encompass To: jwb@paravolve.net Subject: Encompass Points - May 2004 Date: Fri, 28 May 2004 16:02:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit List-Unsubscribe: Message-Id: X-ParaVolve-Scan-Signature: 85328c83c550adce6a970aeb2e21d0bc X-ParaVolve-Spam-Score: 0.0, (/) _Encompass Points_ Issue 17, May 2004 Thank you for subscribing to the newsletter _Encompass Points_! To view this publication online, go to http://www.encompassUS.org/news/points/index.html. Encompass Points is a monthly e-mail newsletter for Encompass, an independent, volunteer-driven organization providing HP users with opportunities for education, peer networking and vendor advocacy. Issue Contents: * HP World 2004 Heats Up With Hot Topics For the HP IT Community * Encompass 2004 Board of Directors Election * Webcasts Sponsored by Encompass and MindIQ Another Success * Sign Up For the Next Encompass and MindIQ Webcast * Sign Up for HP's Webcast * Encompass Local User Group News * Encompass Special Interest Groups * HP Customer News - Ready For You * Events Calendar * We Want Your Feedback and Submissions HP WORLD 2004 HEATS UP WITH HOT TOPICS FOR THE HP IT COMMUNITY HP World 2004 promises to offer a wide-ranging technical program covering today's hottest topics for HP customers and users. For the second consecutive year, the Encompass and Interex user communities have joined forces to bring you an opportunity-rich agenda of education, new product information, and peer networking. Join more than 7,000 of your colleagues from the HP IT community at this, the largest HP-focused technology conference in the Americas! Registration is now open with an "early bird" savings of $100 for registrations received by July 23. Encompass members qualify for an additional savings of $200. Find out more at http://www.hpworld.com/. Along with the 400+ technical sessions offered, the following is a sample of some of the technical information you'll find at HP World 2004: - Adaptive Enterprise - Find out more about HP's Adaptive Enterprise vision and how to apply various technologies toward making your enterprise more adaptive. - Storage - Benefit from an introduction to storage area networks. - HP-UX - Listen to a panel on HP-UX performance and a discussion of future directions. - Tru64 - Find out about HP's road map for integrating Tru64 functionality into HP-UX. - OpenVMS - Hear from a panel of engineering experts and get a technical update. - Linux - Hear actual case studies and gather "how-tos" for building Linux distribution. - Itanium - Learn about real-world experiences porting to Itanium, and take a look at HP's future Itanium plans. - Security - Witness a live hacking demo and learn how the super spies compromise security. - High Availability and Disaster Recovery - Hear a discussion of trends and best practices. - IA32 - Learn about ProLiant Clusters and how to put blade servers to effective use. - Networking - Get practical advice about troubleshooting and anti-spam solutions. - Windows - Learn about Windows 2003 and see a cost comparison of Windows and Linux. - MPE - Arm yourself with strategies for migrating from HP e3000-based applications to other platforms. For complete program details, visit http://www.hpworld.com/. Be sure to check back often for updates. And watch your e-mail inbox for more about the information-rich programs, training seminars, and workshops that will be offered at HP World 2004. ENCOMPASS 2004 BOARD OF DIRECTORS ELECTION The deadline for the Encompass Board of Directors Election Call for Candidates is fast approaching! All individual and corporate members in good standing are eligible to run for the Encompass Board of Directors. If you are interested in being a part of the leadership of Encompass, please go to http://www.encompassUS.org/elections.html and submit your application for candidacy by June 4, 2004 to mailto:elections@encompassUS.org. WEBCAST SPONSORED BY ENCOMPASS AND MINDIQ ANOTHER SUCCESS On April 15, Peter Sward from HP presented on the transition from Tru64 UNIX to HP-UX in the free Encompass and MindIQ webcast. The free webcast focused on the tools that HP is developing to assist customers with the transition of their home-grown applications from Tru64 UNIX to HP-UX on Itanium-based systems. SIGN UP FOR THE NEXT ENCOMPASS AND MIND IQ WEBCAST On June 10, James Percent, Software Engineer in the Enterprise UNIX Division at HP, will present "Selecting the Most Appropriate Cluster Interconnect Technology for a TruCluster Deployment". The free webcast will provide practical information regarding the impacts of the cluster interconnect upon overall application availability, scalability, and performance in a TruCluster Server environment. To register for this webcast offering, visit http://www.encompassUS.org/events/webcasts.html. SIGN UP FOR HP'S WEBCAST Sign-up for the June 15th HP webcast entitled "Using Intel Compilers to Best Extract Performance from Itanium 2-based Platforms Webcast." The webcast will cover the benefits of using threading tools to improve your development efforts. Shine a brilliant spotlight on the unseen internal behavior of your multithreaded application with the debugging and analysis tools. Easily navigate the threads and synchronization objects in your application with complete correlation back to the source code. After attending this event you should understand the capabilities of the Visual Threads debugging and analysis tool, and be able to easily apply it to your multithreaded application. You will be able to improve the robustness of your application, identify potential performance bottlenecks, and explore the previously unseen behavior of your application as it executes. For more information and to register go to: http://h21007.www2.hp.com/dspp/ne/ne_EventDetail_IDX/1,1394,723,00.html ENCOMPASS LOCAL USER GROUP NEWS "ESILUG, an Encompass Local User Group in the Washington, DC area will meet on Tuesday, June 1, from 1-4pm. We'll be taking a practical look at the tools that aid Windows server consolidation. Dennis Bonanni of HP will share his experiences and knowledge of ways to consolidate Windows servers effectively. Pete Nash of Microsoft will describe the Microsoft Virtual Server product. To register and to find out more, see http://encompasserve.org/lugs/esilug/." Local User Groups (LUGs) are a key part of the Encompass community. There are many Encompass LUGs which offer members an opportunity to interact with fellow IT professionals face-to-face, close to home. These LUGS host local meetings and events that allow customers to stay connected with HP developments. Become involved with a user group in your area to interact directly with others in a friendly, familiar forum. To find a LUG in your area visit http://www.encompassUS.org/community/LUGS/ ENCOMPASS SPECIAL INTEREST GROUPS (SIGS) Take advantage of the direct customer contact Encompass Special Interest Groups (SIGs) offer you. SIGs are recognized forums where HP users, with a vested interest in enterprise computing, exchange ideas and discuss technologies. Organized by Encompass members, SIG members meet annually at the annual conference and interact weekly via mailing lists. You are invited to join one of the four SIGS: Linux SIG, Enterprise Unix, OpenVMS, and Enterprise Storage at http://www.encompassUS.org/community/sigs/sigjoin.html. HP CUSTOMER NEWS - READY FOR YOU Have you read HP's 'Customer Times'? [http://www.hp.com/products1/evolution/customertimes/index.html] It's a storage and server newsletter brimming with stories of interest for HP's worldwide customers. It's available now in two easy versions: online (html) and print-ready (pdf). 'Customer Times' provides you with news updates from across the whole spectrum of HP offerings, including OpenVMS, Tru64 UNIX, HP-UX, Linux and more. It's simple to become a quarterly subscriber, too. Register now at http://www.hp.com/products1/evolution/customertimes/customertimes_reg.html! EVENTS CALENDAR Encompass and HP community events are promoted via an online events calendar at http://www.encompassUS.org/calendar/index.cfm Check this calendar on a regular basis to learn about upcoming Encompass events. Forward calendar posting requests to information@encompassUS.org. WE WANT YOUR FEEDBACK AND SUBMISSIONS Is there something you'd like to see in Encompass Points? Let us know. If you have news, updates or something special you'd like to let the Encompass community know, please send to information@encompassUS.org. * * * Interested in advertising? E-mail information@encompassUS.org. Previous issues of Encompass Points are available in the online archives. Access them at http://www.encompassUS.org/members/points_archive/. * * * How to Avoid Missing our Newsletter: Your newsletter will be coming from this address: {information@encompassUS.org} Add this to your list of addresses from which you want to receive mail. Encompass Headquarters 401 N. Michigan Avenue Suite 2200 Chicago, IL 60611 Tel: 877.354.9887 Email-Simple-2.216/t/test-mails/josey-nobody-blank000644 000767 000024 00000001370 13306001053 022055 0ustar00rjbsstaff000000 000000 Received: (qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000 Resent-Date: 13 Nov 2002 10:10:49 -0000 Date: Wed, 13 Nov 2002 10:06:51 GMT From: Andrew Josey Message-Id: <1021113100650.ZM12997@skye.rdg.opengroup.org> In-Reply-To: Joanna Farley's message as of Nov 13, 9:56am. X-Mailer: Z-Mail (5.0.0 30July97) To: austin-group-l@opengroup.org Subject: Re: Defect in XBD lround MIME-Version: 1.0 Resent-Message-ID: Resent-To: austin-group-l@opengroup.org Resent-From: austin-group-l@opengroup.org X-Mailing-List: austin-group-l:archive/latest/4823 X-Loop: austin-group-l@opengroup.org Precedence: list Resent-Sender: austin-group-l-request@opengroup.org Content-Type: text/plain; charset=us-ascii Email-Simple-2.216/t/test-mails/junk-in-header000644 000767 000024 00000000133 13306001053 021144 0ustar00rjbsstaff000000 000000 linden boulevard represent, represent Header-One: steve biko Header-Two: stir it up ATCQ! Email-Simple-2.216/t/test-mails/badly-folded000644 000767 000024 00000003446 13306001053 020703 0ustar00rjbsstaff000000 000000 Return-Path: Received: from murder ([unix socket]) (authenticated user=adam bits=0) by mail1.foo.com (Cyrus v2.2.12-OS X 10.4.0) with LMTPA; Tue, 25 Oct 2005 07:26:59 -0400 X-Sieve: CMU Sieve 2.2 X-Original-To: adam@mail1.internal.foo.com Delivered-To: adam@mail1.internal.foo.com Received: from localhost (localhost [127.0.0.1]) by mail1.foo.com (Postfix) with ESMTP id C24ABADEA15 for ; Tue, 25 Oct 2005 07:26:58 -0400 (EDT) Received: from mail1.foo.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20330-05 for ; Tue, 25 Oct 2005 07:26:55 -0400 (EDT) Received: from mta.internal.foo.com (mta.internal.foo.com [0.0.0.0]) by mail1.foo.com (Postfix) with ESMTP id 1D919ADE9FE for ; Tue, 25 Oct 2005 07:26:55 -0400 (EDT) Received: from [0.0.0.0] ([0.0.0.0]) (authenticated bits=0) by mta.internal.foo.com (8.12.8/8.12.8) with ESMTP id j9PBQoCT026374 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 25 Oct 2005 07:26:53 -0400 Message-ID: Date: Tue, 25 Oct 2005 07:30:17 -0400 From: x Reply-To: x@foo.com User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Worrall Subject: My subject X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/mixed; boundary="------------040701020305070002070307" X-PMX-Version: 4.6.1.107272 X-Virus-Scanned: by amavisd-new at foo.com This is a multi-part message in MIME format. --------------040701020305070002070307 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Blah blah --------------040701020305070002070307-- Email-Simple-2.216/t/test-mails/many-repeats000644 000767 000024 00000000445 13306001053 020756 0ustar00rjbsstaff000000 000000 Baz: 0 Foo: 1 Bar: 2 Foo: 3 Bar: 4 Foo: 5 Bar: 6 Foo: 7 Bar: 8 Foo: 9 Bar: A Foo: B Bar: C Foo: D Bar: E Foo: F Bar: G Foo: H Bar: I Foo: J Bar: K Foo: L Bar: M Foo: N Bar: O Foo: P Bar: Q Foo: R Bar: S Foo: T Bar: U Foo: V Bar: W Foo: X Foo: Y Bar: Z Baz: 0 This is a really stupid message. Email-Simple-2.216/t/test-mails/badly-folded-noindent000644 000767 000024 00000000224 13306001053 022506 0ustar00rjbsstaff000000 000000 Bar: Bar Badly-Folded: This header is badly folded because even though it goes onto the second line, it has no indent. Foo: Foo This is the body! Email-Simple-2.216/t/test-mails/josey-nobody000644 000767 000024 00000001367 13306001053 020776 0ustar00rjbsstaff000000 000000 Received: (qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000 Resent-Date: 13 Nov 2002 10:10:49 -0000 Date: Wed, 13 Nov 2002 10:06:51 GMT From: Andrew Josey Message-Id: <1021113100650.ZM12997@skye.rdg.opengroup.org> In-Reply-To: Joanna Farley's message as of Nov 13, 9:56am. X-Mailer: Z-Mail (5.0.0 30July97) To: austin-group-l@opengroup.org Subject: Re: Defect in XBD lround MIME-Version: 1.0 Resent-Message-ID: Resent-To: austin-group-l@opengroup.org Resent-From: austin-group-l@opengroup.org X-Mailing-List: austin-group-l:archive/latest/4823 X-Loop: austin-group-l@opengroup.org Precedence: list Resent-Sender: austin-group-l-request@opengroup.org Content-Type: text/plain; charset=us-ascii Email-Simple-2.216/t/test-mails/josey-fold000644 000767 000024 00000010620 13306001053 020420 0ustar00rjbsstaff000000 000000 From mail-miner-10529@localhost Wed Dec 18 12:07:55 2002 Received: from mailman.opengroup.org ([192.153.166.9]) by deep-dark-truthful-mirror.pad with smtp (Exim 3.36 #1 (Debian)) id 18Buh5-0006Zr-00 for ; Wed, 13 Nov 2002 10:24:23 +0000 Received: (qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000 Resent-Date: 13 Nov 2002 10:10:49 -0000 Date: Wed, 13 Nov 2002 10:06:51 GMT From: Andrew Josey Message-Id: <1021113100650.ZM12997@skye.rdg.opengroup.org> In-Reply-To: Joanna Farley's message as of Nov 13, 9:56am. References: <200211120937.JAA28130@xoneweb.opengroup.org> <1021112125524.ZM7503@skye.rdg.opengroup.org> <3DD221BB.13116D47@sun.com> X-Mailer: Z-Mail (5.0.0 30July97) To: austin-group-l@opengroup.org Subject: Re: Defect in XBD lround MIME-Version: 1.0 Resent-Message-ID: Resent-To: austin-group-l@opengroup.org Resent-From: austin-group-l@opengroup.org X-Mailing-List: austin-group-l:archive/latest/4823 X-Loop: austin-group-l@opengroup.org Precedence: list Resent-Sender: austin-group-l-request@opengroup.org Content-Type: text/plain; charset=us-ascii Joanna, All Thanks. I got the following response from Fred Tydeman. C99 Defect Report (DR) 240 covers this. The main body of C99 (7.12.9.7) says range error, while Annex F (F.9.6.7 and F.9.6.5) says "invalid" (domain error). The result was to change 7.12.9.7 to allow for either range or domain error. The preferred error is domain error (so as match Annex F). So, no need to change XBD. regards Andrew On Nov 13, 9:56am in "Re: Defect in XBD lr", Joanna Farley wrote: > Sun's expert in this area after some discussions with a colleague > outside of Sun concluded that for lround, to align with both C99 and SUS > changes of the following form were necessary: > > + If x is +/-Inf/NaN, a domain error occurs, and > + errno is set to EDOM in MATH_ERRNO mode; > + the invalid exception is raised in MATH_ERREXCEPT mode. > [to align with C99 Annex F.4] > > + If x is too large to be represented as a long, a *range* error > may occur, and > + errno *may be* set to ERANGE in MATH_ERRNO mode; > [to align with C99 7.12.9.7] > + the invalid exception *is* raised in MATH_ERREXCEPT mode. > [to align with C99 Annex F.4] > > They believe it is a bit awkward to have errno set to ERANGE in > MATH_ERRNO mode yet the invalid exception raised in MAH_ERREXCEPT mode, > but that just reflects an imperfect mapping of the C notion of errno to > the IEEE 754 notion of data conversion. > > I'll work with our expert to draft text refecting the above to suggest > replacement text for lines 23678-23684 on lround page 721 of XSH6. > > Thanks > > Joanna > > > Andrew Josey wrote: > > > > The text referred to is MX shaded and part of the ISO 60559 floating > > point option. I do not think changing the Domain Error to a Range Error > > is the fix or at least not the fix for the NaN and +-Inf cases. ISO C > > 99 describes the range error case if the magnitude of x is too large as a > > may fail. I'll ask Fred T for his thoughts on this one... > > regards > > Andrew > > > > On Nov 12, 9:37am in "Defect in XBD lround", Erwin.Unruh@fujitsu-siemens.com wrote: > > > Defect report from : Erwin Unruh , Fujitsu Siemens Computers > > > > > > (Please direct followup comments direct to austin-group-l@opengroup.org) > > > > > > @ page 0 line 0 section lround objection {0} > > > > > > Problem: > > > > > > Defect code : 1. Error > > > > > > The function lround is described in http://www.opengroup.org/onlinepubs/007904975/functions/lround.html > > > On Error it is specified that errno has to be set to EDOM. However, the C99 standard ISO/IEC 9899:1999 (E) specifies this as a range error, which would result in a value of ERANGE. So an implementation could not be conformant to both these standards. > > > > > > Action: > > > > > > Change the value of errno to ERANGE, if the result is not represantable. More specific: In the description of the function, replace all occurences of "domain error" with "range error" and replace "EDOM" with "ERANGE" > > >-- End of excerpt from Erwin.Unruh@fujitsu-siemens.com > > ----- Andrew Josey The Open Group Austin Group Chair Apex Plaza,Forbury Road, Email: a.josey@opengroup.org Reading,Berks.RG1 1AX,England Tel: +44 118 9508311 ext 2250 Fax: +44 118 9500110