~ubuntu-branches/ubuntu/precise/rakudo/precise

« back to all changes in this revision

Viewing changes to src/builtins/ConcreteRole.pir

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghedini
  • Date: 2011-05-17 11:31:09 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517113109-rmfir654u1axbpt4
Tags: 0.1~2011.04-1
* New upstream release (Closes: #601862, #585762, #577502)
* New maintainer
* Switch to 3.0 (quilt) format
* Update dependencies (Closes: #584498)
* Update debian/copyright to lastest DEP5 revision
* Do not generate/install perl6 manpage (now done by the build system)
* Enable tests
* Bump Standards-Version to 3.9.2 (no changes needed)
* Do not install extra LICENSE files and duplicated docs
* Remove debian/clean (no more needed)
* Add Vcs-* fields in debian/control
* Rewrite (short) description
* Update upstream copyright years
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## $Id$
 
2
 
 
3
=head1 NAME
 
4
 
 
5
src/classes/ConcreteRole.pir - methods for the ConcreteRole class
 
6
 
 
7
=head1 Description
 
8
 
 
9
A concrete role is a role that has been selected from an abstract role by
 
10
providing a (possibly empty) set of role parameters. This class for now
 
11
is primarily just designed to know how to match one of them in a multiple
 
12
dispatch.
 
13
 
 
14
=head1 Methods
 
15
 
 
16
=over 4
 
17
 
 
18
=cut
 
19
 
 
20
.namespace ['ConcreteRole']
 
21
 
 
22
.sub 'onload' :anon :init :load
 
23
    .local pmc p6meta, proto
 
24
    p6meta = get_hll_global ['Mu'], '$!P6META'
 
25
    proto = p6meta.'new_class'('ConcreteRole', 'parent'=>'Cool')
 
26
.end
 
27
 
 
28
.sub 'PROTOOVERRIDES' :method
 
29
    .return ('new', 'ACCEPTS')
 
30
.end
 
31
 
 
32
.sub 'ACCEPTS' :method
 
33
    .param pmc topic
 
34
    $I0 = isa topic, 'P6role'
 
35
    .return ($I0)
 
36
.end
 
37
 
 
38
=back
 
39
 
 
40
=cut