Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #40171] [TODO] - Can't use an Iterator with a DynLexPad PMC

6 views
Skip to first unread message

Matt Diephouse

unread,
Aug 17, 2006, 2:14:04 AM8/17/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #40171]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40171 >


I don't know how to write a test for this off the top of my head, but
Iterator and DynLexPad don't play well together atm. When I tried, I
got this error:

elements() not implemented in class 'DynLexPad'

Is there an easy way to make an arbitrary hash-like PMC (DynLexPad,
NameSpace, etc.) play well with iterator?

Tcl needs to be able to iterate over the keys to return a list of all
the variables in the current procedure/lexpad. (See [info vars])

--
Matt Diephouse

Matt Diephouse

unread,
Aug 17, 2006, 2:10:16 AM8/17/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #40158]

# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40158 >

Matt Diephouse

unread,
Aug 17, 2006, 2:09:16 AM8/17/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #40156]

# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40156 >

Will Coleda via RT

unread,
Feb 5, 2008, 9:50:35 AM2/5/08
to perl6-i...@perl.org
On Wed Aug 16 23:09:16 2006, mdiep wrote:
> I don't know how to write a test for this off the top of my head, but
> Iterator and DynLexPad don't play well together atm. When I tried, I
> got this error:
>
> elements() not implemented in class 'DynLexPad'
>
> Is there an easy way to make an arbitrary hash-like PMC (DynLexPad,
> NameSpace, etc.) play well with iterator?
>
> Tcl needs to be able to iterate over the keys to return a list of all
> the variables in the current procedure/lexpad. (See [info vars])
>
> --
> Matt Diephouse
>

A nice cage task would be to write a test demonstrating the use of an
iterator in this case.

Christoph Otto via RT

unread,
Sep 6, 2008, 9:26:05 PM9/6/08
to perl6-i...@perl.org

As of r30844 there's a TODO'd test for this, but some work will need to
be done to make DynLexPads (and LexPads, incidentally) iterable. Since
DynLexPads are based on Hashes, I imagine most of the work will be in
adapting get_iter and get_*_keyed.

0 new messages