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

« back to all changes in this revision

Viewing changes to src/classes/Multi.pir

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-10-04 14:31:57 UTC
  • Revision ID: james.westby@ubuntu.com-20091004143157-ubq3wu0grk0f1e6a
Tags: upstream-0.1~2009.09
ImportĀ upstreamĀ versionĀ 0.1~2009.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## $Id$
 
2
 
 
3
=head1 TITLE
 
4
 
 
5
Multi - Perl 6 multi-dispatch routine
 
6
 
 
7
=head1 SUBROUTINES
 
8
 
 
9
=over 4
 
10
 
 
11
=item onload()
 
12
 
 
13
=cut
 
14
 
 
15
.namespace [ 'Multi' ]
 
16
 
 
17
.sub 'onload' :anon :init :load
 
18
    .local pmc p6meta, proto
 
19
    p6meta = get_hll_global ['Perl6Object'], '$!P6META'
 
20
    proto = p6meta.'new_class'('Multi', 'parent'=>'parrot;Perl6MultiSub Code Any')
 
21
    p6meta.'register'('Perl6MultiSub', 'parent'=>proto, 'protoobject'=>proto)
 
22
    p6meta.'register'('MultiSub', 'parent'=>proto, 'protoobject'=>proto)
 
23
.end
 
24
 
 
25
=item multi
 
26
 
 
27
=cut
 
28
 
 
29
.sub 'multi' :method
 
30
    $P0 = get_hll_global ['Bool'], 'True'
 
31
    .return ($P0)
 
32
.end
 
33
 
 
34
.sub 'Scalar' :method
 
35
    .return (self)
 
36
.end
 
37
 
 
38
 
 
39
=back
 
40
 
 
41
=cut
 
42
 
 
43
# Local Variables:
 
44
#   mode: pir
 
45
#   fill-column: 100
 
46
# End:
 
47
# vim: expandtab shiftwidth=4 ft=pir: