Skip to content

Instantly share code, notes, and snippets.

@jantore
Last active December 6, 2015 14:10
Show Gist options
  • Save jantore/5fad010453fcaf70c3f4 to your computer and use it in GitHub Desktop.
Save jantore/5fad010453fcaf70c3f4 to your computer and use it in GitHub Desktop.
Render Mojolicious Embedded Perl templates from the command line
#!/usr/bin/env perl
use warnings;
use strict;
use Mojo::Template;
my $out = Mojo::Template->new->render_file(shift // '/dev/stdin', @ARGV);
if(ref $out) {
print STDERR $out;
exit(1);
}
print $out;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment