NAME

Inline::Parrot - Inline Parrot code in Perl5

SYNOPSIS

use Inline Parrot;   
print "Start Perl\n";
my $s = _hello( "world" );
print "$s\n";
print "End Perl\n";

__END__
__Parrot__

.pcc_sub _hello   
  .param string x

  print "Hello "
  print x
  print "\n"

  .local string s
  s = "Goodbye "
  s = s . x
  .pcc_begin_return
  .return s
  .pcc_end_return
.end

output:

Start Perl
Hello world
Goodbye world
End Perl

DESCRIPTION

The Inline::Parrot module allows you to insert Parrot source code directly "inline" in a Perl script or module.

Perl parameters are passed as specified in the Parrot Calling Conventions: http://www.parrotcode.org/docs/pdd/pdd03_calling_conventions.html

Global variables

$Inline::Parrot::parrot - A Parrot interpreter object. See Inline::Parrot::parrot for the available methods.

Release notes

The current version does not work with arrays, hashes, references. All parameters passed between Perl and Parrot are stringified scalars, or undef / null pmc.

If you modify an included file, this change may not be noticed by Inline::Parrot. That's because .include statements are evaluated only when the main Parrot code changes.

The Parrot code should not try to read from STDIN. The STDIN handle is currently used internally by the Parrot interpreter.

Returned parameters are ordered by type (int, string, pmc, float), instead of declaration order.

SEE ALSO

Inline - the Inline module

http://www.parrotcode.org - Parrot docs

Inline::Parrot::parrot - a Parrot process class

http://www.perlmonks.org/?node_id=396890 - initial module idea

A. Randal, D. Sugalsky, L. Tötsch. Perl6 and Parrot Essentials. 2nd Edition. O'Reilly, 2004. ISBN 0-596-00747-X.

AUTHOR

Flavio S. Glock, <fglock@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Flavio S. Glock

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 390:

Non-ASCII character seen before =encoding in 'Tötsch.'. Assuming CP1252