{"id":7375,"date":"2022-12-20T19:37:52","date_gmt":"2022-12-20T22:37:52","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/speciodeclaredat-man3\/"},"modified":"2022-12-20T19:37:52","modified_gmt":"2022-12-20T22:37:52","slug":"speciodeclaredat-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/speciodeclaredat-man3\/","title":{"rendered":"Specio::DeclaredAt (man3)"},"content":{"rendered":"<h1 align=\"center\">Specio::DeclaredAt<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#VERSION\">VERSION<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#API\">API<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#SOURCE\">SOURCE<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT AND LICENSE\">COPYRIGHT AND LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Specio::DeclaredAt \u2212 A class to represent where a type or coercion was declared<\/p>\n<h2>VERSION <a name=\"VERSION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">version 0.46<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">my $declared = Specio::DeclaredAt\u2212>new_from_caller(1); <br \/> print $declared\u2212>description;<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This class provides a thin wrapper around some of the return values from Perl\u2019s &#8220;caller&#8221; built-in. It\u2019s used internally to identify where types and coercions are being declared, which is useful when generating error messages.<\/p>\n<h2>API <a name=\"API\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This class provides the following methods.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Specio::DeclaredAt\u2212>new_from_caller($depth)<\/b> <br \/> Given a call stack depth, this method returns a new &#8220;Specio::DeclaredAt&#8221; object.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$declared_at\u2212>package, $declared_at\u2212>filename, $declared_at\u2212>line<\/b> <br \/> Returns the call stack information recorded when the object was created. These values are always populated.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$declared_at\u2212>subroutine<\/b> <br \/> Returns the subroutine from the call stack. This may be an &#8220;udnef&#8221;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$declared_at\u2212>has_subroutine<\/b> <br \/> Returns true if there is a subroutine name associated with this object.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$declared_at\u2212>description<\/b> <br \/> Puts all the information together into a single string like &#8220;declared in package Foo::Bar (&#8230;\/Foo\/Bar.pm) at line 42 in sub named blah&#8221;.<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Bugs may be submitted at <https:\/\/github.com\/houseabsolute\/Specio\/issues>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">I am also usually active on <small>IRC<\/small> as \u2019autarch\u2019 on &#8220;irc:\/\/irc.perl.org&#8221;.<\/p>\n<h2>SOURCE <a name=\"SOURCE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The source code repository for Specio can be found at <https:\/\/github.com\/houseabsolute\/Specio>.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Dave Rolsky <autarch@urth.org><\/p>\n<h2>COPYRIGHT AND LICENSE <a name=\"COPYRIGHT AND LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This software is Copyright (c) 2012 \u2212 2020 by Dave Rolsky.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This is free software, licensed under:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The Artistic License 2.0 (GPL Compatible)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The full text of the license can be found in the <i><small>LICENSE<\/small><\/i> file included with this distribution.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Specio::DeclaredAt \u2212 A class to represent where a type or coercion was declared <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3689],"class_list":["post-7375","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-speciodeclaredat"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7375"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7375\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}