[svn:parrot] r47338 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Thu Jun 3 15:39:30 UTC 2010
Author: fperrad
Date: Thu Jun 3 15:39:29 2010
New Revision: 47338
URL: https://trac.parrot.org/parrot/changeset/47338
Log:
[distutils] add a 'Hello World' example
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Thu Jun 3 12:07:35 2010 (r47337)
+++ trunk/runtime/parrot/library/distutils.pir Thu Jun 3 15:39:29 2010 (r47338)
@@ -132,6 +132,31 @@
=head2 EXAMPLES
+ $ cat hello.pir
+ .sub 'main' :main
+ say 'hello world!'
+ .end
+
+ $ cat setup.pir
+ .sub 'main' :main
+ .param pmc args
+ $S0 = shift args
+ load_bytecode 'distutils.pbc'
+
+ $P0 = new 'Hash'
+ $P1 = new 'Hash'
+ $P1['hello.pbc'] = 'hello.pir'
+ $P0['pbc_pir'] = $P1
+ $P2 = new 'Hash'
+ $P2['parrot-hello'] = 'hello.pbc'
+ $P0['installable_pbc'] = $P2
+ .tailcall setup(args :flat, $P0 :flat :named)
+ .end
+
+ $ parrot setup.pir
+ $ parrot setup.pir install
+ $ parrot setup clean
+
L<http://github.com/fperrad/parrot-MT19937/blob/master/setup.pir>
L<http://github.com/fperrad/markdown/blob/master/setup.pir>
More information about the parrot-commits
mailing list