package PM_1133400_Shared; use strict; use warnings; use autodie; use constant FIFO => 'pm_1133400_fifo'; use Exporter qw{import}; our @EXPORT_OK = qw{FIFO get_steps get_total_steps remove_fifo}; our %EXPORT_TAGS = ( SQL => [qw{FIFO get_steps remove_fifo}], WEB => [qw{FIFO get_total_steps}], ); { my @steps = ( sub { print "Step 0\n" }, sub { print "Step 1\n" }, sub { print "Step 2\n" }, sub { print "Step 3\n" }, sub { print "Step 4\n" }, sub { print "Step 5\n" }, sub { print "Step 6\n" }, sub { print "Step 7\n" }, sub { print "Step 8\n" }, sub { print "Step 9\n"; remove_fifo(); print "Done!\n"; exit; }, ); sub get_steps { [@steps] } sub get_total_steps { scalar @steps } } sub remove_fifo { unlink FIFO if -e FIFO } 1;