- or download this
$VAR1 = bless({'options' =>
{'filehandle' =>
bless( \*Symbol::GEN2, 'FileHandle' ),
'filename' => 'a.log'},}, 'Log' );
- or download this
$self->do_task()
- or download this
Process::spawn(\&do_task, $self);
- or download this
$new_log = new Log(filename => 'new.log');
$cur_log = $self->{log};
$self->{log} = $new_log;
Process::spawn(\&do_task, $self); # This runs in background.
$self->{log} = $cur_log; # Restore.
- or download this
$self->{system}->{log},
$self->{filecache}->{system}->{log}
- or download this
@ref = Devel::ObjSearch($self,
sub { return UNIVERSAL::isa($_[0], 'Log'); });
foreach (@ref) { $_->filename('new.log'); $_->filehandle($new_log); }
.. spawn() ..