Ignore:
Timestamp:
2005-07-06T15:27:45+12:00 (19 years ago)
Author:
kjdon
Message:

Jeffrey's new parsing modifications, committed approx 6 July, 15.16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/EMAILPlug.pm

    r9971 r10218  
    113113
    114114sub new {
    115     my ($class) = @_;
    116     my $self = new BasPlug ($class, @_);
    117     $self->{'plugin_type'} = "EMAILPlug";
    118     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    119     my $option_list = $self->{'option_list'};
    120     push( @{$option_list}, $options );
    121 
    122     if (!parsargv::parse(\@_,
    123              q^split_exp/.*/^, \$self->{'split_exp'},
    124              q^no_attachments^, \$self->{'ignore_attachments'},
    125              q^headers^, \$self->{'header_metadata'},
    126              "allow_extra_options")) {
    127     print STDERR "\nIncorrect options passed to $class.";
    128     print STDERR "\nCheck your collect.cfg configuration file\n";
    129     $self->print_txt_usage("");  # Use default resource bundle
    130     die "\n";
    131     }
     115    my ($class) = shift (@_);
     116    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     117    push(@$pluginlist, $class);
     118
     119    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     120    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     121
     122    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
     123
    132124    $self->{'assoc_filenames'} = {}; # to save attach names so we don't clobber
    133125
     
    431423
    432424   
    433     if ($self->{'header_metadata'} && $self->{'header_metadata'} == 1) {
     425    if ($self->{'headers'} && $self->{'headers'} == 1) {
    434426    # Add "All headers" metadata
    435427    $Headers = &text_into_html($Headers);
     
    791783   
    792784    # save attachment by default
    793     if (!$self->{'ignore_attachments'}
     785    if (!$self->{'no_attachments'}
    794786        && $filename ne "") { # this part has a file...
    795787        my $encoding="8bit";
Note: See TracChangeset for help on using the changeset viewer.