hello,
i'm trying to ease the production of xml streams in a perl6 script so i
wrote
sub _attrs_str ( %attrs) {
%attrs.pairs.map: { qq/{.key}="{.value}"/ }
}
multi sub tag ( Str $tag, Parcel $attrs=()) {
"<{ $tag, _attrs_str $attrs.hash }/>";
}
multi sub
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: a3cb57b9ed2fdc71a30f571b9cd9f81a2944b99e
https://github.com/perl6/specs/commit/a3cb57b9ed2fdc71a30f571b9cd9f81a2944b99e
Author: Nick Patch
Date: 2014-12-08 (Mon, 08 Dec 2014)
Changed paths:
M S32-set
How about an interpreter interprets input directly into action (even if there
is some optimization going on), while a compiler converts instructions from
one set to another set to be interpreted later.
Which would make perl both at the perl source level, and an interpreter at the
bytecode level.