2 # A module to allow a user to create and (eventually) edit arrays of
5 # This is used for creating mail messages and user script files
7 # It may be sub-classed
9 # Copyright (c) 2001 Dirk Koopman G1TLH
18 use vars qw($VERSION $BRANCH);
19 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
20 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
21 $main::build += $VERSION;
22 $main::branch += $BRANCH;
31 my $class = ref $pkg || $pkg;
39 return $self->new(%$self);
48 if (my @ans = BadWord::check($line)) {
49 return ($dxchan->msg('e17', @ans));
51 push @{$self->{lines}}, $line;
62 if (my @ans = BadWord::check($line)) {
63 return ($dxchan->msg('e17', @ans));
65 ${$self->{lines}}[$no] = $line;
72 return exists $self->{lines} ? (@{$self->{lines}}) : ();
78 return exists $self->{lines} ? scalar @{$self->{lines}} : 0;