Last active
December 6, 2015 14:10
-
-
Save jantore/5fad010453fcaf70c3f4 to your computer and use it in GitHub Desktop.
Render Mojolicious Embedded Perl templates from the command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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