Compile mustache templates in pure perl using JE.
$ hulk.pl *.mustache > templates.js
| function anon140593375716472(view,partials) { | |
| partials = partials || {}; | |
| var stack = [view]; // context stack | |
| try { | |
| return fn(view, partials, stack, lookup, escapeHTML, renderSection, render); | |
| } catch (e) { | |
| throw debug(e.error, template, e.line, options.file); | |
| } |
| (function() { | |
| var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; | |
| templates['test'] = template(function (Handlebars,depth0,helpers,partials,data) { | |
| helpers = helpers || Handlebars.helpers; | |
| var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression; | |
| foundHelper = helpers.hello; | |
| stack1 = foundHelper || depth0.hello; | |
| if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); } |
| {{hello}} World! |
Compile mustache templates in pure perl using JE.
$ hulk.pl *.mustache > templates.js
| #!/usr/bin/env perl | |
| use v5.10; | |
| package Hello; | |
| use Any::Moose; | |
| sub hello { "Hello," }; | |
| sub world { "World!" }; | |
| no moose; | |
| # End of Hello Object |
| MANIFEST | |
| bin/app.pl | |
| config.yml | |
| environments/development.yml | |
| environments/production.yml | |
| views/index.tt | |
| views/layouts/main.tt | |
| MANIFEST.SKIP | |
| lib/Unicode/Test.pm | |
| public/css/style.css |
| #!/usr/bin/env perl | |
| # parks - spark clone in perl (https://github.com/holman/spark) | |
| # Alternatives: https://github.com/holman/spark/wiki/Alternative-Implementations | |
| # Wicked Cool Examples: https://github.com/holman/spark/wiki/Wicked-Cool-Usage | |
| use List::Util qw( min max ); local $/; | |
| my ($t, @n) = ( [qw(▁ ▂ ▃ ▄ ▅ ▆ ▇ █)], -t STDIN ? @ARGV : split ' ', <STDIN> ); | |
| print map($t->[ int( ( $_ - min(@n) ) / max(@n) * $#$t ) ], @n), "\n"; |
| PERL_LWP_SSL_VERIFY_HOSTNAME=0 ./lwp-script |
dbicdump.sh./gen_migration.pl 1db.sql./gen_migration.pl 2sql/PostgreSQL/upgrade/1-2/001-auto.sql
test_pkey CONSTRAINT properly (need this for now: https://github.com/dbsrgits/sql-translator/pull/20/files)test table before adding the FOREIGN KEY to test2 table