MASON(1p)

πŸ“¦
version 2.24 Β· 2 versions
  • 2.24 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.24 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… MASON(1p) β€” the mason.pl era

okay so bestie, welcome to MASON(1p), which is the manual page for mason.pl β€” yes, that lowercase little icon. this is the tool that takes a Mason template, runs it, and hands you the output. that's it, that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

mason.pl β€” evaluate a mason template and output the result πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

three whole ways to do the thing, bestie. pick your fighter:

# Evaluate template from STDIN
mason.pl [mason options] [--args json-string]

# Evaluate template in string
mason.pl [mason options] [--args json-string] -e "string"

# Evaluate template in file
mason.pl [mason options] [--args json-string] template-file

like. the range. πŸ’…


🌸 DESCRIPTION 🌸

so here's the tea: it reads a Mason template (aka a component) from STDIN, from a string, or from a file. then it runs the template and outputs the result to STDOUT. that's the whole pipeline. no cap. ✨


πŸ’– MASON OPTIONS πŸ’–

these are the Mason options you can drop on the command line, and yes they're the real ones:

--data-dir /path/to/data_dir
--plugins MyPlugin,MyOtherPlugin

and now the lil details that matter, so listen up 🫢 β€” the comp_root gets set to the directory of the template file, or to a temporary directory if you're using STDIN. and if you don't specify data_dir, it gets set to a temporary directory too. auto-magic. obsessed. πŸ’…


πŸŽ€ ADDITIONAL OPTIONS πŸŽ€

--args json-string

a hash of arguments to pass to the page component, in JSON form. literally just hand it some JSON and it goes. e.g.

--args '{"count":5,"names":["Alice","Bob"]}'

see? count is 5, and names is ["Alice","Bob"]. iconic. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

  • Mason β€” the main character, iykyk πŸ’œ

🧚 AUTHOR 🧚

Jonathan Swartz <swartz@pobox.com> 🫢


this software is copyright (c) 2011 by Jonathan Swartz.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. πŸ’–


🧚 AUTHOR 🧚

Jonathan Swartz <swartz@pobox.com> 🫢


this software is copyright (c) 2012 by Jonathan Swartz.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. πŸ’…


and that's the whole page, bestie πŸ’– this lil masterpiece shipped as part of perl v5.34.0 and it's dated 2022-05-27 β€” go forth and render some templates, you've got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from