an alternate to ^methods

I pushed out the perl6 code I've been working on to github and CPAN.
I sub-divided it into four parts with a dependency tree like so:

                       Symbol::Scan
                         |
  Object::Examine      Augment::Util
    |                    |
    |--------------------/
    |
  method-menu

The goal here was to be able to go into the repl with:

  perl6 -Mmethod-menu

.... and have an "m" method everywhere that dumps a verbose but
human-readable list of all available methods.  (I like ^methods a
lot, but the output is often very peculiar and you have to know
about the ":all" argument to really see all your options.)

This set-up confines the evil step to a very small module, where
all the functionality is available in other ways if you don't
want to indulge in "augment".  You could just use Object::Examine
and get a role that provides a similar method (named "menu"
instead of "m").

The Augment::Util and Symbol::Scan branch there is the workaround
for the current problems with getting augment to propagate down
an inheritance chain.

I had a number of hassles with getting ready to ship, so there's evidently
some bugs in my META6.json I need to fix (neither Ddt or Test::Meta6 were
working for me, and I find I've got problems with secure github
uploads *again*...).
0
doomvox
11/4/2018 8:16:49 PM
perl.perl6.users 1103 articles. 0 followers. Follow

1 Replies
10 Views

Similar Articles

[PageSpeed] 1

> I sub-divided it into four parts with a dependency tree like so:

Let's try that again for those of us not living in a fixed-width world...


Object::Examine  -- "menu", a verbose but readable "^methods"
 |
 v
method-menu      -- "m", an alias to "menu" (does an augment on Any)
 ^
 |
Augment::Util    -- "recompose_core": propagate changes from an augment
 ^
 |
Symbol::Scan     -- "list_core_type_objects": find everything in core


On 11/4/18, Joseph Brenner <doomvox@gmail.com> wrote:
> I pushed out the perl6 code I've been working on to github and CPAN.
> I sub-divided it into four parts with a dependency tree like so:
>
>                        Symbol::Scan
>                          |
>   Object::Examine      Augment::Util
>     |                    |
>     |--------------------/
>     |
>   method-menu
>
> The goal here was to be able to go into the repl with:
>
>   perl6 -Mmethod-menu
>
> ... and have an "m" method everywhere that dumps a verbose but
> human-readable list of all available methods.  (I like ^methods a
> lot, but the output is often very peculiar and you have to know
> about the ":all" argument to really see all your options.)
>
> This set-up confines the evil step to a very small module, where
> all the functionality is available in other ways if you don't
> want to indulge in "augment".  You could just use Object::Examine
> and get a role that provides a similar method (named "menu"
> instead of "m").
>
> The Augment::Util and Symbol::Scan branch there is the workaround
> for the current problems with getting augment to propagate down
> an inheritance chain.
>
> I had a number of hassles with getting ready to ship, so there's evidently
> some bugs in my META6.json I need to fix (neither Ddt or Test::Meta6 were
> working for me, and I find I've got problems with secure github
> uploads *again*...).
>
0
doomvox
11/4/2018 8:40:27 PM
Reply: