In case anyone is still using the older version of GM like me (I'm using Version: 2.0.2) - here's a fix for the problem mentioned in this thread.
Code:
Here's a replacement split_line() from GT/Mail/Parts.pm:
sub split_line {
# --------------------------------------------------------------------------
# Class->split_line('\s*,\s*', $line);
# -----------------------------
# Splits a line given a delimitor regex and the line. Returns an array
# of the pieces
#
# We will be testing undef strings
my $class = shift;
local $^W;
my ($delimiter, $line) = @_;
$delimiter =~ s/(\s)/\\$1/g;
my ($quote, $quoted, $unquoted, $delim, $word, @pieces);
@pieces = $line =~ m{
\G
(
(?:
" (?:\\.|[^\\"]+) * "
|
' (?:\\.|[^\\']+) * '
|
\\.
|
.
)+? # May segfault on very long lines (around 8000+ iterations of this group)
)
(?: $ | (?:$delimiter)+ )
}gsx;
return @pieces;
}
It's 'somewhat' fixed because of the regex - but it can handle a much higher length than the older one can.
Cheers
Regan.