Re: how typish are roles
HaloO, Jonathan Lang wrote: 2) We have A&B and the A B juxtaposition to mean $_ ~~ A && $_ ~~ B which is an intersection (sub)type of A and B. Not according to my reading of S06: if you want to force a parameter to match both of two different roles, you must use a where clause. In section "Polymorphic types" S06 reads: "Since the terms in a parameter could be viewed as a set of constraints that are implicitly "anded" together (the variable itself supplies type constraints, and where clauses or tree matching just add more constraints), we relax this to allow juxtaposition of types to act like an "and" junction:" The following example also makes it clear that a joined interface is meant. So I think a where clause it not needed. Regards, TSa. --
[perl #40523] [TODO] adjust string_append function and usage
Hi, This is now done (r15025). Jonathan
[perl #40598] [PATCH] Make perlcritic.t barf more nicely when Test::Perl::Critic not installed
# New Ticket Created by "Paul Cochrane" # Please include the string: [perl #40598] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40598 > Hi, this patch ensures that when t/codingstd/perlcritic.t can't find Test::Perl::Critic, that instead of exiting with a "Can't locate Test/Perl/Critic.pm in @INC" compile-time error, it reports that it is skipping the test with the message defined in perlcritic.t. One can't use C in this case as the C call needs to pass an argument to the package if Test::Perl::Critic is found. Comments welcome, Paul files affected: t/codingstd/perlcritic.t perlcritic_t.patch Description: Binary data
[perl #40599] [NEW] Coding standards test of return statements
# New Ticket Created by "Paul Cochrane" # Please include the string: [perl #40599] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40599 > Hi, This file is actually a hack of the C sub in C and checks that return statements look like C rather than C. This isn't a firm standard like many of the other coding standards tests as it will return a false positive on statements like: return (void *) malloc( size ); however, it will pick up the instances it is intended to fix. Comments welcome, Paul files affected: MANIFEST t/codingstd/returns.t returns_t.patch Description: Binary data
Re: [perl #40443] Separate vtable functions from methods (using :vtable)
On Wed, Oct 25, 2006 at 11:02:59PM -0700, Allison Randal wrote: > [EMAIL PROTECTED] via RT wrote: > >On Sun Oct 01 16:22:10 2006, mdiep wrote: > >>At the OSCON 2006 Hackathon, it was decided that we should separate > >>vtables from methods and add a new :vtable label for PIR subs to mark > >>them as vtable functions. > > > >Just to check, that this is still meant to happen? Anyone feel it should > >be put off until the objects/namespaces stuff is sorted out, or shall I > >just dive right in? > > This is the main thing Chip and I talked about in our last face-to-face > meeting. We came up with 3 basic parameters: whether a method is a > vtable method, whether it has a vtable name distinct from the method > name, and whether it has a method name at all (or is anonymous, i.e. > only a vtable method). The interface I scrawled out over coffee is: > > # method name is the same as vtable name > .sub get_string :method :vtable > > # accessible as either $obj.stringify() or vtable > .sub stringify :method :vtable('get_string') > > # accessible only as vtable > .sub get_string :method :anon :vtable > .sub stringify :method :anon :vtable('get_string') > ... +1 Pm
Re: [perl #40598] [PATCH] Make perlcritic.t barf more nicely when Test::Perl::Critic not installed
On Oct 26, 2006, at 5:21 AM, Paul Cochrane (via RT) wrote: this patch ensures that when t/codingstd/perlcritic.t can't find Test::Perl::Critic, that instead of exiting with a "Can't locate Test/Perl/Critic.pm in @INC" compile-time error, it reports that it is skipping the test with the message defined in perlcritic.t. One can't use C in this case as the C call needs to pass an argument to the package if Test::Perl::Critic is found. Comments welcome, Paul, A better implementation of that patch would be: BEGIN { eval { require Test::Perl::Critic; }; if ($@) { plan skip_all => 'Test::Perl::Critic not installed'; } Test::Perl::Critic->import(-verbose => 7); Chris
Re: [perl #40598] [PATCH] Make perlcritic.t barf more nicely when Test::Perl::Critic not installed
A better implementation of that patch would be: BEGIN { eval { require Test::Perl::Critic; }; if ($@) { plan skip_all => 'Test::Perl::Critic not installed'; } Test::Perl::Critic->import(-verbose => 7); Thanks Chris! I didn't know how to maintain the verbose flag any other way, but now I know. With every patch my perl foo improves... See attached patch for latest version. BTW: did you get the perl shebang line patches for Perl::Critic? Paul perlcritic_t.patch Description: Binary data
Re: how typish are roles
HaloO, I wrote: 2) We have A&B and the A B juxtaposition to mean $_ ~~ A && $_ ~~ B which is an intersection (sub)type of A and B. Is the A&B form a legal alternative for the juxtaposition? --
mmd-draft.txt
HaloO, I figure that http://svn.openfoundry.org/pugs/docs/notes/multi_method_dispatch/mmd-draft.txt hasn't made it into S06 yet. So what is the current state of affairs? Could someone explain me the voting mechanism mentioned in the document? I get that it works from left to right and compares the narrowness of types of the competing targets at that position. But what information is recorded on the score cards and how is that finally used in selecting the dispatch target? Regards, TSa. --
[perl #40443] Separate vtable functions from methods (using :vtable)
Hi, Thanks Allison for clarifications and @other for agreement; I've taken this ticket and will get cracking on implementing this. Jonathan