The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!/usr/bin/perl

use strict;
use FindBin;
use lib ( "../lib", $FindBin::Bin, "$FindBin::Bin/../lib" );

use Ravenel;
use Ravenel::Document;

my $obj = new Ravenel( { 
	'docroot' => $FindBin::Bin,
	'dynamic' => 0,
} );

# XXX if depth on the first "ret" is supplied, this works fine.. I suspect somethign with the depth system is borked in build_document
my Ravenel::Document $doc = $obj->add_document( {
	'data'         => qq(Before <r:Moo:test_format format>{a}, {b}</r:Moo:test_format> After), 
	'prefix'       => 'r:',
	'content_type' => 'html',
	'name'         => 'test',
} );

my $res = $doc->parse();

print $res . "\n" if ( $ARGV[0] );

eval $res;
print $@ if ( $@ );
print test->get_html_content() . "\n";