App-Codit

 view release on metacpan or  search on metacpan

lib/App/Codit/Macro.pm  view on Meta::CPAN

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
                LINE => 1,
                MDI => $mdi,
                NAME => $name,
                REMAIN => 0,
                WIDG => $mdi->docGet($doc),
        };
        bless $self, $class;
        return $self
}
 
=item B<busy>
 
Returns true when the macro is running.
 
=cut
 
sub busy {
        my $self = shift;
        return $self->dem->jobExists($self->jobname)
}
 
sub call {      return $_[0]->{CALL} }
 
sub countref {
        my $self = shift;
        $self->{COUNTREF} = shift if @_;
        return $self->{COUNTREF}

lib/App/Codit/Macro.pm  view on Meta::CPAN

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
sub name {      return $_[0]->{NAME} }
 
=item B<start>
 
Starts the macro.
 
=cut
 
sub start {
        my $self = shift;
        return if $self->busy;
        $self->dem->jobAdd($self->jobname, $self->interval, 'cycle', $self);
 
        my $mdi = $self->mdi;
 
        my $count = 0;
        $self->countref(\$count);
 
        my $last = $self->last;
        unless (defined $last) {
                my $w = $mdi->docGet($self->doc);

lib/App/Codit/Macro.pm  view on Meta::CPAN

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
=item B<stop>
 
Stops the macro. It is called after the last line is processed. However, you
may call it to interrupt the macro.
 
=cut
 
sub stop {
        my $self = shift;
        return unless $self->busy;
        $self->dem->jobRemove($self->jobname);
        my $mdi = $self->mdi;
        $mdi->macroRemove($self->doc, $self->name) unless $self->remain;
        $mdi->progressRemove($self->jobname);
}
 
=item B<remain>I<(?$flag?)>
 
Default value false. If you set it the macro will not be removed
from memory after it finishes.



( run in 0.245 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )