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

« back to all changes in this revision

Viewing changes to src/cheats/parrot/attriter.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
=head1
 
2
 
 
3
Return an iterator that iterates over a Class' attributes.
 
4
If the Class object has a @!attribute_list property, use
 
5
that as the order of attributes, otherwise introspect the
 
6
class and use its list.  (As of Parrot 1.4.0 we can't
 
7
always introspect the class directly, as the order of
 
8
attributes in the class isn't guaranteed.)
 
9
 
 
10
=cut
 
11
 
 
12
.HLL 'parrot'
 
13
 
 
14
.namespace ['Class']
 
15
.sub 'attriter' :method
 
16
    $P0 = getprop '@!attribute_list', self
 
17
    unless null $P0 goto have_list
 
18
    $P0 = inspect self, 'attributes'
 
19
  have_list:
 
20
    $P1 = iter $P0
 
21
    .return ($P1)
 
22
.end
 
23
 
 
24