```{index} single: get (Template::Stash::XS) ``` ```{index} single: Template::Stash::XS::get ``` # get The value of a template variable: `$ident` is a name, a dotted name such as `'user.name'` (arguments in parentheses are dropped), or a list `[ name => \@args, name => \@args, ... ]`; `\@args` as a third argument is passed to a plain name that is a code ref or method. ## Synopsis ```perl $stash->get('title'); $stash->get('user.name'); $stash->get([ 'user', 0, 'greet', [ 'Hello' ] ]); ``` ## Edge cases - A variable that is not defined is passed to `$stash->undefined`, whose value is returned (Template::Stash's returns an empty string, or dies under `STRICT`). - A reference other than a list ref as `$ident` dies "Template::Stash::XS: get (arg 2) must be a scalar or listref". - A true `_DEBUG` in the stash makes a missing variable die "NAME is undefined".