Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Tom Browder
On Fri, Mar 20, 2015 at 2:02 PM, Tom Browder wrote: > On Mar 20, 2015 1:51 PM, "Tobias Leich" wrote: >> if $obj.^can($method_name) {... That doesn't seem to work with private methods. Any trick to accomplish that? -Tom

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Henk van Oers
On Sun, 22 Mar 2015, Tom Browder wrote: On Fri, Mar 20, 2015 at 2:02 PM, Tom Browder wrote: On Mar 20, 2015 1:51 PM, "Tobias Leich" wrote: if $obj.^can($method_name) {... That doesn't seem to work with private methods. Any trick to accomplish that? What part of 'private' did you mis? I

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Tom Browder
On Sun, Mar 22, 2015 at 6:22 PM, Henk van Oers wrote: > On Sun, 22 Mar 2015, Tom Browder wrote: >> On Fri, Mar 20, 2015 at 2:02 PM, Tom Browder >> wrote: >>> On Mar 20, 2015 1:51 PM, "Tobias Leich" wrote: if $obj.^can($method_name) {... >> That doesn't seem to work with private methods. An

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Henk van Oers
On Sun, 22 Mar 2015, Tom Browder wrote: On Sun, Mar 22, 2015 at 6:22 PM, Henk van Oers wrote: On Sun, 22 Mar 2015, Tom Browder wrote: On Fri, Mar 20, 2015 at 2:02 PM, Tom Browder wrote: On Mar 20, 2015 1:51 PM, "Tobias Leich" wrote: if $obj.^can($method_name) {... That doesn't seem to wo

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Tom Browder
On Sun, Mar 22, 2015 at 7:13 PM, Henk van Oers wrote: > On Sun, 22 Mar 2015, Tom Browder wrote: >> I'm trying to write a test. > To test what? Your own typo's? The tests are for a public Perl 6 module translated from an existing Perl 5 module. Do Perl 6 modules not need tests? If so, which ones

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Henk van Oers
On Sun, 22 Mar 2015, Tom Browder wrote: On Sun, Mar 22, 2015 at 7:13 PM, Henk van Oers wrote: On Sun, 22 Mar 2015, Tom Browder wrote: I'm trying to write a test. To test what? Your own typo's? The tests are for a public Perl 6 module translated from an existing Perl 5 module. Do Perl 6 mo

Re: Object Introspection for Existence of Methods: How?

2015-03-22 Thread Tom Browder
On Sun, Mar 22, 2015 at 7:48 PM, Henk van Oers wrote: > On Sun, 22 Mar 2015, Tom Browder wrote: >> Do Perl 6 modules not need tests? > Yes they need tests. >> If so, which ones do they need? > The public interface. >> and which can be left off? > The private stuff. > You can not test for 'random_