~ubuntu-branches/ubuntu/saucy/padre/saucy-proposed

« back to all changes in this revision

Viewing changes to lib/Padre/Role/Task.pm

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont, gregor herrmann, Dominique Dumont
  • Date: 2012-01-04 12:04:20 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120104120420-i5oybqwf91m1d3il
Tags: 0.92.ds1-1
[ gregor herrmann ]
* Remove debian/source/local-options; abort-on-upstream-changes
  and unapply-patches are default in dpkg-source since 1.16.1.
* Swap order of alternative (build) dependencies after the perl
  5.14 transition.

[ Dominique Dumont ]
* Imported Upstream version 0.92.ds1
* removed fix-spelling patch (applied upstream)
* lintian-override: use wildcard to avoid listing a gazillion files
* updated size of some 'not-real-man-page' entries
* rules: remove dekstop cruft (replaced by a file provided in debian
  directory)
* control: removed Breaks statement. Add /me to uploaders. Updated
  dependencies
* rules: make sure that non-DFSG file (i.e. the cute butterfly, sigh)
  is not distributed

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
use Padre::Current ();
100
100
use Padre::Logger;
101
101
 
102
 
our $VERSION    = '0.90';
103
 
our $COMPATIBLE = '0.69';
 
102
our $VERSION    = '0.92';
 
103
our $COMPATIBLE = '0.91';
104
104
 
105
105
# Use a shared sequence for object revisioning greatly
106
106
# simplifies the indexing process.
131
131
=cut
132
132
 
133
133
sub task_owner {
134
 
        TRACE( $_[0] ) if DEBUG;
135
 
        $INDEX{ $_[1] };
 
134
        $INDEX{ $_[1] || 0 };
136
135
}
137
136
 
138
137
=pod
260
259
 
261
260
        # Create and start the task with ourself as the owner
262
261
        TRACE("Creating and scheduling task $driver") if DEBUG;
263
 
        $driver->new( owner => $self, %param )->schedule;
 
262
        my $task = $driver->new(
 
263
                owner => $self->task_revision,
 
264
                %param,
 
265
        );
 
266
 
 
267
        # Check the run event handler
 
268
        my $on_run = $task->on_run;
 
269
        if ( $on_run and not $self->can($on_run) ) {
 
270
                die "The on_run handler '$on_run' is not implemented";
 
271
        }
 
272
 
 
273
        # Check the status event handler
 
274
        my $on_status = $task->on_status;
 
275
        if ( $on_status and not $self->can($on_status) ) {
 
276
                die "The on_status handler '$on_status' is not implemented";
 
277
        }
 
278
 
 
279
        # Check the message event handler
 
280
        my $on_message = $task->on_message;
 
281
        if ( $on_message and not $self->can($on_message) ) {
 
282
                die "The on_message handler '$on_message' is not implemented";
 
283
        }
 
284
 
 
285
        # Check the finish event handler
 
286
        my $on_finish = $task->on_message;
 
287
        if ( $on_finish and not $self->can($on_finish) ) {
 
288
                die "The on_message handler '$on_finish' is not implemented";
 
289
        }
 
290
 
 
291
        # Send the task for execution
 
292
        $task->schedule;
264
293
}
265
294
 
266
295
=pod