Peter Scott wrote:
>
> > > Tony Olekshy wrote:
> > >
> > > > try { fragile(); }
> > > > catch { my $caught = 1; }
> > > > finally { $caught and ... }
> > >
>
> It should work as though each pair of } ... { in between try { and
> the end of the last finally or catch block isn't th
At 06:48 PM 8/20/00 -0600, Tony Olekshy wrote:
>Dave Rolsky wrote:
> >
> > Tony Olekshy wrote:
> >
> > > try { fragile(); }
> > > catch { my $caught = 1; }
> > > finally { $caught and ... }
> >
> > If all those pieces were in the same scope I think it would still
> > work like th
Dave Rolsky wrote:
>
> Tony Olekshy wrote:
>
> > try { fragile(); }
> > catch { my $caught = 1; }
> > finally { $caught and ... }
>
> If all those pieces were in the same scope I think it would still
> work like this (in Perl5-ish code):
>
> {
> try { fragile(); # It must be
On Sun, 20 Aug 2000, Tony Olekshy wrote:
> That would be nice. But does this mean that in the following
> case:
>
> try { fragile(); }
> catch { my $caught = 1; }
> finally { $caught and ... }
>
> storage for $caught is allocated and initialized to undef at the
> beginning of
Dave Rolsky wrote:
>
> On Sun, 20 Aug 2000, Tony Olekshy wrote:
>
> > try { my $p = P->new; my $q = Q->new; ... }
> > finally { $p and $p->Done; }
> > finally { $q and $q->Done; }
> >
> > If P->new throws, then the second finally is going to test
> > $q, but it's not "in scope" yet (
On Sun, 20 Aug 2000, Tony Olekshy wrote:
> Shared:
>
> try { my $p = P->new; my $q = Q->new; ... }
> finally { $p and $p->Done; }
> finally { $q and $q->Done; }
>
> If P->new throws, then the second finally is going to test
> $q, but it's not "in scope" yet (its my hasn't been seen)
This version will be published after Peter Scott gets a
chance to review the last days' changes (he's co-author
now), and I make any adjustments necessitated by your
reviews, dear reader ;-)
Formatted: http://www.avrasoft.com/perl/rfc/rfc88v2d5.htm
POD as text: http://www.avrasoft.com/perl/rfc/
Tony Olekshy wrote:
> Non-shared:
>
> my ($p, $q);
> try { $p = P->new; $q = Q->new; ... }
> finally { $p and $p->Done; }
> finally { $q and $q->Done; }
>
> Shared:
>
> try { my $p = P->new; my $q = Q->new; ... }
> finally { $p and $p->Done; }
> finally { $q and $q->Do
Non-shared:
my ($p, $q);
try { $p = P->new; $q = Q->new; ... }
finally { $p and $p->Done; }
finally { $q and $q->Done; }
Shared:
try { my $p = P->new; my $q = Q->new; ... }
finally { $p and $p->Done; }
finally { $q and $q->Done; }
If P->new throws, then the second f
Peter Scott wrote:
>
> Tony Olekshy wrote:
> >
> > Graham Barr wrote:
> > >
> > > I am of the opinion that only a class name should follow catch.
> > > If someone wants to catch based on an expression they should use
> > >
> > > catch {
> > > if () {
> > > }
> > > else {
> > >
At 10:14 AM 8/20/00 -0600, Tony Olekshy wrote:
>Graham Barr wrote:
> >
> > I am of the opinion that only a class name should follow catch.
> > If someone wants to catch based on an expression they should use
> >
> > catch {
> > if () {
> > }
> > else {
> > # rethrow the error
>
Graham Barr wrote:
>
> I am of the opinion that only a class name should follow catch.
> If someone wants to catch based on an expression they should use
>
> catch {
> if () {
> }
> else {
> # rethrow the error
> }
> }
Then you will be glad to know that RFC 88, in the n
On Fri, Aug 18, 2000 at 11:04:03PM -0600, Tony Olekshy wrote:
> As currently promulgated, catch "Foo" {} will always catch,
> because "Foo" is true. Will this cause confusion for developers
> who meant to say catch Foo {}? And what happens when someone
> says catch "Foo", "Bar" {}?
>
> We can't
13 matches
Mail list logo