Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of Stevan (6065)

Saturday August 06, 2005
01:04 AM

10,000 ft View of Perl 6 MetaModel

[ #26135 ]

Earlier today on #perl6, kolibrie asked me about documentation for the metamodel. Sadly, none actually existed, and with all the bootstapping code in the Perl 5 version, just "reading the source" can be confusing. So while I was waiting for some large data files for $work to upload, I sketched out a quick 10,000 ft view of the metamodel.

    i(Foo)     - instance of Foo
    Foo        - the user-level Foo class
    class(Foo) - the instance of Perl6::Class named "Foo"
    meta(Foo)  - the instance of Perl6::MetaClass which describes Foo

                +---------------+
                | i(Foo)        |
                +---------------+
                | class         |------+
                | instance_data |      |
                +---------------+      |
                                       |
                                       |   NOTE:
                      ___              |   At the Foo level is where
                     (   )             |   the interpreter will likely
      +-------------( Foo )------------+   perform some 'magic' to
      |              (___)                 connect the user and meta
      |                                    levels.
      |           <user level>
  ....|.........................................................
      |           <meta level>
      |
      |         +---------------+
      +-------->| class(Foo)    |
                +---------------+
      +---------| meta          |
      |         | name          |
      |         +---------------+
      |
      |         +---------------+
      +-------->| meta(Foo)     |
                +---------------+
                | name          |
                | version       |
                | authority     |
                | %methods      |
                | %attributes   |
                +---------------+

Any comments, questions, suggestions or even disparaging remarks are welcome. A more complete document is in the pugs tree here.

- Stevan

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.