Skip to content

Instantly share code, notes, and snippets.

@Xliff
Last active December 12, 2016 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xliff/517baac50d57629616b37f3a9af11c9f to your computer and use it in GitHub Desktop.
Save Xliff/517baac50d57629616b37f3a9af11c9f to your computer and use it in GitHub Desktop.

This piece of code is acting like it is not in a heredoc... [ SOLVED! see, below ]

say qq:to/HERE/;
		sub $f<functionName>($argsList) {
			die 'Function requires XML::LibXML'
				unless \$XSLT_xml_support;

			sub _$f<functionName>($fullArgsList) 
				is native(XSLT)
				is symbol('$f<functionName>')
				$returns
			\{ \* \};

			_$f<functionName>($argsList);
		}
	HERE

This is supposed to output code, but is getting parsed as code instead of text!

[ UPDATE ] This was definitely a Problem Between Chair and Keyboard. Here is the corrected version:

```perl
say qq:to/HERE/;
		sub $f<functionName>($argsList) \{
			die 'Function requires XML::LibXML'
				unless \$XSLT_xml_support;

			sub _$f<functionName>($fullArgsList) 
				is native(XSLT)
				is symbol('$f<functionName>')
				$returns
			\{ \* \};

			_$f<functionName>($argsList);
		}
	HERE

Remember that { and } are reserved characters in Perl6!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment