Created
March 13, 2014 15:40
-
-
Save fgabolde/9530826 to your computer and use it in GitHub Desktop.
Trying and failing to trip Email::Simple::Header's folding and unfolding routines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Carp; | |
use Data::Dumper; | |
use Email::Simple::Header; | |
my $string = 'To: [email protected] [email protected]'."\012\015"; | |
my $header = Email::Simple::Header->new(\$string); | |
print $header->_fold($string, | |
{ at => 60 }); | |
print Dumper($header->{headers}); | |
$header->header($header->_fold($string, | |
{ at => 60 })); | |
say $header->as_string; | |
print Dumper($header->{headers}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment