in reply to Pragma-like package

use Package LIST;
is equivalent to
BEGIN { require Package; Package->import LIST; }
so, you can use Reporting::import for that sort of thing:
package Reporting; my @sendtasks; sub import { my $class = shift; for my $task (@_) { .. do the things you want to do .. } }

Replies are listed 'Best First'.
Re^2: Pragma-like package
by dbw (Beadle) on Aug 20, 2007 at 18:54 UTC
    Superb, thanks ++akho! I'm hopeless with objects and classes, so you monks were my only hope. :)

    /usr/bin/perl '-nemap$.%$_||redo,2..$.++;print$.--'