sub fromText { my $class = shift; my $text = shift; my $fullParse = shift; my $removeInternalComments = shift; my $lineObject; unless ($text) { confess "fromText called with an empty text reference."; }; my $self = new $class; $self->{_text} = \$text; #handle internal comments and indentation if ($removeInternalComments) { my $indentation = SWISS::TextFunc::unindentLines (\$text); my $internalComments = SWISS::TextFunc::removeInternalComments(\$text); $self->{_indentation} = $indentation; $self->{_internalComments} = $internalComments; }