Don't make it an attribute:
sub cmd_logfile { my $self = shift; my $inner = $self->dl_inner_dir; defined $inner or die "Error: DL_ +INNER_DIR not set."; my $b4_ext = "$inner/transfer"; my $ext = "log"; my $filename = "$b4_ext.$ext"; my $i = 2; while (-s $filename) { $filename = "$b4_ext-$i.$ext"; $i++; } return $filename; }
In reply to Re: Moose: I want builder method to run every time I call an attribute
by chromatic
in thread Moose: I want builder method to run every time I call an attribute
by italdesign
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |