On Wed, 25 Feb 2009, Larry Wall wrote:

On Thu, Feb 26, 2009 at 02:05:28PM +1100, Timothy S. Nelson wrote:
        Does this mean that $! is a container of some sort?

It's an object, which (in the abstract) can contain anything it jolly
well pleases.  The main question beyond that is how it responds if
used like one of the standard containers.  I don't see any great
motivation for that offhand, but we'll have to examine the use cases
as things progress.

        Hmm.  S04 says:

: That implicit topic is the current exception object, also known as C<$!>

        and also:

: Because the contextual variable C<$!> contains all exceptions collected in : the current lexical scope...

...that implies to my mind that $! is an exception object, but that an exception object can contain more than one exception. Is that correct?

        But the spec also says:

: Exceptions are not resumable in Perl 6unless the exception object does the : C<Resumable> role.

...so Resumable is attached to a group of exceptions, not a single exception. Now I'm really confused :).

My suggested solution would be to change $! to an exception container object. But then we have to use it in the implicit given in the CATCH block. If we used an any() Junction, would that do what we want?


| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |

Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-

Reply via email to