| 1 | package Text::Nunjucks::Runtime::KwArgs; | ||
| 2 | # ABSTRACT: Marker class for keyword arguments, the __keywords hash (ADR 0009) | ||
| 3 | |||
| 4 | 23 | our $VERSION = '0.001'; | |
| 5 | |||
| 6 | 23 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 23 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | # A port addition to runtime.js, at its ADR-designated home beside | ||
| 10 | # Text::Nunjucks::Runtime (whose ->KwArgs names this class). | ||
| 11 | # | ||
| 12 | # Marker class only. makeKeywordArgs blesses a caller hashref into this, | ||
| 13 | # mirroring JS `obj.__keywords = true` -- but the hash keys stay purely the | ||
| 14 | # keyword name=>value pairs (no __keywords key polluting them). Not a Moo | ||
| 15 | # class: its hash IS the data. isKeywordArgs is a blessed/isa check. | ||
| 16 | |||
| 17 | 23 | 1; | |
| 18 | |||
| 19 | __END__ | ||