On Monday 02 December 2002 11:20, Tim Sweetman wrote:
> > Mark Fowler wrote:
> >> Doesn't December come round quickly?
> >>
> >> http://www.perladvent.org/2002/
>
> Rght...
>
> so you use IO::AtomicFile, and ... at risk of being picky ...
> 1. Its temporary filen
On Mon, Dec 02, 2002 at 11:53:16AM +, Mark Fowler wrote:
[SNIP]
> my $fh = IO::AtomicFile->new("foo",">")
> or die "Can't open 'foo': $!";
>
> eval
> {
>print {$fh} $self->bar();
>print {$fh} $self->baz();
>print {$fh} $self->buzz();
>close $fh;
> };
>
> if ($@)
>
Mark,
Mark Fowler wrote:
eval
{
print {$fh} $self->bar();
print {$fh} $self->baz();
print {$fh} $self->buzz();
$fh->commit;
close $fh;
};
if ($@)
{
... other error handling code ...
}
I can see how that would work. If I was the author I'd probably either
put it as an option in the
other error handling code ...
}
I can see how that would work. If I was the author I'd probably either
put it as an option in the constructor, or write a subclass
IO::AtomicFile::Explict that only moved when you called commit.
Maybe you should email the author ([EMA
Mark Fowler wrote:
Doesn't December come round quickly?
http://www.perladvent.org/2002/
Rght...
so you use IO::AtomicFile, and ... at risk of being picky ...
1. Its temporary filename doesn't incorporate anything random, or the
process ID. So should you h
Mark Fowler wrote:
Doesn't December come round quickly?
http://www.perladvent.org/2002/
Hey, that's cool :)
--
Jonathan Peterson
Technical Manager, Unified Ltd, +44 (0)20 7383 6092
[EMAIL PROTECTED]
e each day having it's own
mini-tutorial attached, and much better html. Other features may be
phased in during the Advent period.
Hope everyone enjoys it.
--
Mark Fowler
http://www.twoshortplanks.com/ The 2002 Perl Advent Calendar
[EMAIL PROTECTED]