
A simple scalar argument sets the body to that value, exactly as though
you'd opened for the body for writing, written the value,
and closed the body again:

    $body = new MIME::Body::InCore "Line 1\nLine 2\nLine 3";

A single array reference sets the body to the concatenation of all
scalars that it holds:

    $body = new MIME::Body::InCore ["Line 1\n",
                                    "Line 2\n",
                                    "Line 3"];

=cut

use vars qw(@ISA);
use strict;

use Carp;

@ISA = qw(MIME::Body::Scalar);


#------------------------------
# init DATA
#------------------------------
sub init {
    my ($self, $data) = @_;
    if (!defined($data)) {  ### nothing
	$self->{MBS_Data} = '';
    }
    elsif (!ref($data)) {   ### simple scalar
	$self->{MBS_Data} = $data;
    }
    elsif (ref($data) eq 'SCALAR') {
	$self->{MBS_Data} = $$data;
    }
    elsif (ref($data) eq 'ARRAY') {
	$self->{MBS_Data} = join('', @$data);
    }
    else {
	croak "I can't handle DATA which is a ".ref($data)."\n";
    }
    $self;
}

1;
__END__

