{"id":18981389,"url":"https://github.com/awncorp/data-object-space","last_synced_at":"2026-06-20T03:32:13.906Z","repository":{"id":77256500,"uuid":"300957173","full_name":"awncorp/data-object-space","owner":"awncorp","description":"Namespace Class for Perl 5","archived":false,"fork":false,"pushed_at":"2020-10-03T20:35:27.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-11T03:24:30.285Z","etag":null,"topics":["object-oriented","perl","perl5"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awncorp.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-03T19:05:57.000Z","updated_at":"2022-07-24T20:58:21.000Z","dependencies_parsed_at":"2023-02-23T17:15:33.038Z","dependency_job_id":null,"html_url":"https://github.com/awncorp/data-object-space","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/awncorp/data-object-space","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-space","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-space/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-space/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-space/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awncorp","download_url":"https://codeload.github.com/awncorp/data-object-space/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-space/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34556494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["object-oriented","perl","perl5"],"created_at":"2024-11-08T16:09:43.080Z","updated_at":"2026-06-20T03:32:13.888Z","avatar_url":"https://github.com/awncorp.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n\n    Data::Object::Space - Namespace Class\n\nABSTRACT\n\n    Namespace Class for Perl 5\n\nSYNOPSIS\n\n      package main;\n    \n      use Data::Object::Space;\n    \n      my $space = Data::Object::Space-\u003enew('foo/bar');\n\nDESCRIPTION\n\n    This package provides methods for parsing and manipulating package\n    namespaces.\n\nINHERITS\n\n    This package inherits behaviors from:\n\n    Data::Object::Name\n\nLIBRARIES\n\n    This package uses type constraints from:\n\n    Types::Standard\n\nMETHODS\n\n    This package implements the following methods:\n\n all\n\n      all(Str $name, Any @args) : ArrayRef[Tuple[Str, Any]]\n\n    The all method executes any available method on the instance and all\n    instances representing packages inherited by the package represented by\n    the invocant.\n\n    all example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('data/object/space');\n      \n        $space-\u003eall('id');\n      \n        # [\n        #   ['Data::Object::Space', 'Data_Object_Space'],\n        #   ['Data::Object::Name', 'Data_Object_Name'],\n        # ]\n\n append\n\n      append(Str @args) : Object\n\n    The append method modifies the object by appending to the package\n    namespace parts.\n\n    append example #1\n\n        # given: synopsis\n      \n        $space-\u003eappend('baz');\n      \n        # 'Foo/Bar/Baz'\n\n    append example #2\n\n        # given: synopsis\n      \n        $space-\u003eappend('baz', 'bax');\n      \n        # $space-\u003epackage;\n      \n        # 'Foo/Bar/Baz/Bax'\n\n array\n\n      array(Str $arg1) : ArrayRef\n\n    The array method returns the value for the given package array variable\n    name.\n\n    array example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our @handler = 'start';\n      \n        package main;\n      \n        $space-\u003earray('handler')\n      \n        # ['start']\n\n arrays\n\n      arrays() : ArrayRef\n\n    The arrays method searches the package namespace for arrays and returns\n    their names.\n\n    arrays example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our @handler = 'start';\n        our @initial = ('next', 'prev');\n      \n        package main;\n      \n        $space-\u003earrays\n      \n        # ['handler', 'initial']\n\n authority\n\n      authority() : Maybe[Str]\n\n    The authority method returns the AUTHORITY declared on the target\n    package, if any.\n\n    authority example #1\n\n        package Foo::Boo;\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/boo');\n      \n        $space-\u003eauthority\n      \n        # undef\n\n    authority example #2\n\n        package Foo::Boo;\n      \n        our $AUTHORITY = 'cpan:AWNCORP';\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/boo');\n      \n        $space-\u003eauthority\n      \n        # 'cpan:AWNCORP'\n\n base\n\n      base() : Str\n\n    The base method returns the last segment of the package namespace\n    parts.\n\n    base example #1\n\n        # given: synopsis\n      \n        $space-\u003ebase\n      \n        # Bar\n\n bless\n\n      bless(Any $arg1 = {}) : Object\n\n    The bless method blesses the given value into the package namespace and\n    returns an object. If no value is given, an empty hashref is used.\n\n    bless example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        sub import;\n      \n        package main;\n      \n        $space-\u003ebless\n      \n        # bless({}, 'Foo::Bar')\n\n    bless example #2\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        sub import;\n      \n        package main;\n      \n        $space-\u003ebless({okay =\u003e 1})\n      \n        # bless({okay =\u003e 1}, 'Foo::Bar')\n\n build\n\n      build(Any @args) : Object\n\n    The build method attempts to call new on the package namespace and if\n    successful returns the resulting object.\n\n    build example #1\n\n        package Foo::Bar::Baz;\n      \n        sub new {\n          bless {}, $_[0]\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/bar/baz');\n      \n        $space-\u003ebuild\n      \n        # bless({}, 'Foo::Bar::Baz')\n\n    build example #2\n\n        package Foo::Bar::Bax;\n      \n        sub new {\n          bless $_[1], $_[0]\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/bar/bax');\n      \n        $space-\u003ebuild({okay =\u003e 1})\n      \n        # bless({okay =\u003e 1}, 'Foo::Bar::Bax')\n\n call\n\n      call(Any @args) : Any\n\n    The call method attempts to call the given subroutine on the package\n    namespace and if successful returns the resulting value.\n\n    call example #1\n\n        # given: synopsis\n      \n        package Foo;\n      \n        sub import;\n      \n        sub start {\n          'started'\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        $space = Data::Object::Space-\u003enew('foo');\n      \n        $space-\u003ecall('start')\n      \n        # started\n\n    call example #2\n\n        # given: synopsis\n      \n        package Zoo;\n      \n        sub import;\n      \n        sub AUTOLOAD {\n          bless {};\n        }\n      \n        sub DESTROY {\n          ; # noop\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        $space = Data::Object::Space-\u003enew('zoo');\n      \n        $space-\u003ecall('start')\n      \n        # bless({}, 'Zoo')\n\n chain\n\n      chain(Str | Tuple[Str, Any] @steps) : Any\n\n    The chain method chains one or more method calls and returns the\n    result.\n\n    chain example #1\n\n        package Chu::Chu0;\n      \n        sub import;\n      \n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('Chu::Chu0');\n      \n        $space-\u003echain('bless');\n\n    chain example #2\n\n        package Chu::Chu1;\n      \n        sub import;\n      \n        sub new {\n          bless pop;\n        }\n      \n        sub frame {\n          [@_]\n        }\n      \n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('Chu::Chu1');\n      \n        $space-\u003echain(['bless', {1..4}], 'frame');\n      \n        # [ bless( { '1' =\u003e 2, '3' =\u003e 4 }, 'Chu::Chu1' ) ]\n\n    chain example #3\n\n        package Chu::Chu2;\n      \n        sub import;\n      \n        sub new {\n          bless pop;\n        }\n      \n        sub frame {\n          [@_]\n        }\n      \n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('Chu::Chu2');\n      \n        $space-\u003echain('bless', ['frame', {1..4}]);\n      \n        # [ bless( {}, 'Chu::Chu2' ), { '1' =\u003e 2, '3' =\u003e 4 } ]\n\n child\n\n      child(Str $arg1) : Object\n\n    The child method returns a new Data::Object::Space object for the child\n    package namespace.\n\n    child example #1\n\n        # given: synopsis\n      \n        $space-\u003echild('baz');\n      \n        # $space-\u003epackage;\n      \n        # Foo::Bar::Baz\n\n children\n\n      children() : ArrayRef[Object]\n\n    The children method searches %INC and @INC and retuns a list of\n    Data::Object::Space objects for each child namespace found (one level\n    deep).\n\n    children example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('c_p_a_n');\n      \n        $space-\u003echildren\n      \n        # [\n        #   'CPAN/Author',\n        #   'CPAN/Bundle',\n        #   'CPAN/CacheMgr',\n        #   ...\n        # ]\n\n cop\n\n      cop(Any @args) : CodeRef\n\n    The cop method attempts to curry the given subroutine on the package\n    namespace and if successful returns a closure.\n\n    cop example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        sub import;\n      \n        sub handler {\n          [@_]\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        $space = Data::Object::Space-\u003enew('foo/bar');\n      \n        $space-\u003ecop('handler', $space-\u003ebless)\n      \n        # sub { Foo::Bar::handler(..., @_) }\n\n data\n\n      data() : Str\n\n    The data method attempts to read and return any content stored in the\n    DATA section of the package namespace.\n\n    data example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo');\n      \n        $space-\u003edata; # ''\n\n destroy\n\n      destroy() : Object\n\n    The destroy method attempts to wipe out a namespace and also remove it\n    and its children from %INC. NOTE: This can cause catastrophic failures\n    if used incorrectly.\n\n    destroy example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('data/dumper');\n      \n        $space-\u003eload; # Data/Dumper\n      \n        $space-\u003edestroy;\n\n eval\n\n      eval(Str @args) : Any\n\n    The eval method takes a list of strings and evaluates them under the\n    namespace represented by the instance.\n\n    eval example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo');\n      \n        $space-\u003eeval('our $VERSION = 0.01');\n\n functions\n\n      functions() : ArrayRef\n\n    The functions method searches the package namespace for functions and\n    returns their names.\n\n    functions example #1\n\n        package Foo::Functions;\n      \n        use routines;\n      \n        fun start() {\n          1\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/functions');\n      \n        $space-\u003efunctions\n      \n        # ['start']\n\n hash\n\n      hash(Str $arg1) : HashRef\n\n    The hash method returns the value for the given package hash variable\n    name.\n\n    hash example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our %settings = (\n          active =\u003e 1\n        );\n      \n        package main;\n      \n        $space-\u003ehash('settings')\n      \n        # {active =\u003e 1}\n\n hashes\n\n      hashes() : ArrayRef\n\n    The hashes method searches the package namespace for hashes and returns\n    their names.\n\n    hashes example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our %defaults = (\n          active =\u003e 0\n        );\n      \n        our %settings = (\n          active =\u003e 1\n        );\n      \n        package main;\n      \n        $space-\u003ehashes\n      \n        # ['defaults', 'settings']\n\n id\n\n      id() : Str\n\n    The id method returns the fully-qualified package name as a label.\n\n    id example #1\n\n        # given: synopsis\n      \n        $space-\u003eid\n      \n        # Foo_Bar\n\n included\n\n      included() : Str\n\n    The included method returns the path of the namespace if it exists in\n    %INC.\n\n    included example #1\n\n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('Data/Object/Space');\n      \n        $space-\u003eincluded;\n      \n        # lib/Data/Object/Space.pm\n\n inherits\n\n      inherits() : ArrayRef\n\n    The inherits method returns the list of superclasses the target package\n    is derived from.\n\n    inherits example #1\n\n        package Bar;\n      \n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('bar');\n      \n        $space-\u003einherits\n      \n        # []\n\n    inherits example #2\n\n        package Foo;\n      \n        package Bar;\n      \n        use base 'Foo';\n      \n        package main;\n      \n        my $space = Data::Object::Space-\u003enew('bar');\n      \n        $space-\u003einherits\n      \n        # ['Foo']\n\n init\n\n      init() : Str\n\n    The init method ensures that the package namespace is loaded and,\n    whether created in-memory or on-disk, is flagged as being loaded and\n    loadable.\n\n    init example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('kit');\n      \n        $space-\u003einit\n      \n        # Kit\n\n inject\n\n      inject(Str $name, Maybe[CodeRef] $coderef) : Any\n\n    The inject method monkey-patches the package namespace, installing a\n    named subroutine into the package which can then be called normally,\n    returning the fully-qualified subroutine name.\n\n    inject example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('kit');\n      \n        $space-\u003einject('build', sub { 'finished' });\n      \n        # *Kit::build\n\n load\n\n      load() : Str\n\n    The load method checks whether the package namespace is already loaded\n    and if not attempts to load the package. If the package is not loaded\n    and is not loadable, this method will throw an exception using confess.\n    If the package is loadable, this method returns truthy with the package\n    name. As a workaround for packages that only exist in-memory, if the\n    package contains a new, with, meta, or import routine it will be\n    recognized as having been loaded.\n\n    load example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('c_p_a_n');\n      \n        $space-\u003eload\n      \n        # CPAN\n\n loaded\n\n      loaded() : Int\n\n    The loaded method checks whether the package namespace is already\n    loaded returns truthy or falsy.\n\n    loaded example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('data/dumper');\n      \n        $space-\u003eloaded;\n      \n        # 0\n\n    loaded example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('data/dumper');\n      \n        $space-\u003eload;\n      \n        $space-\u003eloaded;\n      \n        # 1\n\n locate\n\n      locate() : Str\n\n    The locate method checks whether the package namespace is available in\n    @INC, i.e. on disk. This method returns the file if found or an empty\n    string.\n\n    locate example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('brianne_spinka');\n      \n        $space-\u003elocate;\n      \n        # ''\n\n    locate example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('data/dumper');\n      \n        $space-\u003elocate;\n      \n        # /path/to/Data/Dumper.pm\n\n methods\n\n      methods() : ArrayRef\n\n    The methods method searches the package namespace for methods and\n    returns their names.\n\n    methods example #1\n\n        package Foo::Methods;\n      \n        use routines;\n      \n        method start() {\n          1\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/methods');\n      \n        $space-\u003emethods\n      \n        # ['start']\n\n name\n\n      name() : Str\n\n    The name method returns the fully-qualified package name.\n\n    name example #1\n\n        # given: synopsis\n      \n        $space-\u003ename\n      \n        # Foo::Bar\n\n parent\n\n      parent() : Object\n\n    The parent method returns a new Data::Object::Space object for the\n    parent package namespace.\n\n    parent example #1\n\n        # given: synopsis\n      \n        $space-\u003eparent;\n      \n        # $space-\u003epackage;\n      \n        # Foo\n\n parse\n\n      parse() : ArrayRef\n\n    The parse method parses the string argument and returns an arrayref of\n    package namespace segments (parts).\n\n    parse example #1\n\n        my $space = Data::Object::Space-\u003enew('Foo::Bar');\n      \n        $space-\u003eparse;\n      \n        # ['Foo', 'Bar']\n\n    parse example #2\n\n        my $space = Data::Object::Space-\u003enew('Foo/Bar');\n      \n        $space-\u003eparse;\n      \n        # ['Foo', 'Bar']\n\n    parse example #3\n\n        my $space = Data::Object::Space-\u003enew('Foo\\Bar');\n      \n        $space-\u003eparse;\n      \n        # ['Foo', 'Bar']\n\n    parse example #4\n\n        my $space = Data::Object::Space-\u003enew('foo-bar');\n      \n        $space-\u003eparse;\n      \n        # ['FooBar']\n\n    parse example #5\n\n        my $space = Data::Object::Space-\u003enew('foo_bar');\n      \n        $space-\u003eparse;\n      \n        # ['FooBar']\n\n parts\n\n      parts() : ArrayRef\n\n    The parts method returns an arrayref of package namespace segments\n    (parts).\n\n    parts example #1\n\n        my $space = Data::Object::Space-\u003enew('foo');\n      \n        $space-\u003eparts;\n      \n        # ['Foo']\n\n    parts example #2\n\n        my $space = Data::Object::Space-\u003enew('foo/bar');\n      \n        $space-\u003eparts;\n      \n        # ['Foo', 'Bar']\n\n    parts example #3\n\n        my $space = Data::Object::Space-\u003enew('foo_bar');\n      \n        $space-\u003eparts;\n      \n        # ['FooBar']\n\n prepend\n\n      prepend(Str @args) : Object\n\n    The prepend method modifies the object by prepending to the package\n    namespace parts.\n\n    prepend example #1\n\n        # given: synopsis\n      \n        $space-\u003eprepend('etc');\n      \n        # 'Etc/Foo/Bar'\n\n    prepend example #2\n\n        # given: synopsis\n      \n        $space-\u003eprepend('etc', 'tmp');\n      \n        # 'Etc/Tmp/Foo/Bar'\n\n rebase\n\n      rebase(Str @args) : Object\n\n    The rebase method returns an object by prepending the package namespace\n    specified to the base of the current object's namespace.\n\n    rebase example #1\n\n        # given: synopsis\n      \n        $space-\u003erebase('zoo');\n      \n        # Zoo/Bar\n\n reload\n\n      reload() : Str\n\n    The reload method attempts to delete and reload the package namespace\n    using the \"load\" method. Note: Reloading is additive and will overwrite\n    existing symbols but does not remove symbols.\n\n    reload example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        # Foo::Gen is generate with $VERSION as 0.01\n      \n        my $space = Data::Object::Space-\u003enew('foo/gen');\n      \n        $space-\u003ereload;\n      \n        # Foo::Gen\n        # Foo::Gen-\u003eVERSION is 0.01\n\n    reload example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        # Foo::Gen is regenerated with $VERSION as 0.02\n      \n        my $space = Data::Object::Space-\u003enew('foo/gen');\n      \n        $space-\u003ereload;\n      \n        # Foo::Gen\n        # Foo::Gen-\u003eVERSION is 0.02\n\n require\n\n      require(Str $target) : Any\n\n    The require method executes a require statement within the package\n    namespace specified.\n\n    require example #1\n\n        # given: synopsis\n      \n        $space-\u003erequire('Moo');\n      \n        # 1\n\n root\n\n      root() : Str\n\n    The root method returns the root package namespace segments (parts).\n    Sometimes separating the root from the parts helps identify how\n    subsequent child objects were derived.\n\n    root example #1\n\n        # given: synopsis\n      \n        $space-\u003eroot;\n      \n        # Foo\n\n routine\n\n      routine(Str $arg1) : CodeRef\n\n    The routine method returns the subroutine reference for the given\n    subroutine name.\n\n    routine example #1\n\n        package Foo;\n      \n        sub cont {\n          [@_]\n        }\n      \n        sub abort {\n          [@_]\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo');\n      \n        $space-\u003eroutine('cont')\n      \n        # sub { ... }\n\n routines\n\n      routines() : ArrayRef\n\n    The routines method searches the package namespace for routines and\n    returns their names.\n\n    routines example #1\n\n        package Foo::Routines;\n      \n        sub start {\n          1\n        }\n      \n        sub abort {\n          1\n        }\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/routines');\n      \n        $space-\u003eroutines\n      \n        # ['start', 'abort']\n\n scalar\n\n      scalar(Str $arg1) : Any\n\n    The scalar method returns the value for the given package scalar\n    variable name.\n\n    scalar example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our $root = '/path/to/file';\n      \n        package main;\n      \n        $space-\u003escalar('root')\n      \n        # /path/to/file\n\n scalars\n\n      scalars() : ArrayRef\n\n    The scalars method searches the package namespace for scalars and\n    returns their names.\n\n    scalars example #1\n\n        # given: synopsis\n      \n        package Foo::Bar;\n      \n        our $root = 'root';\n        our $base = 'path/to';\n        our $file = 'file';\n      \n        package main;\n      \n        $space-\u003escalars\n      \n        # ['root', 'base', 'file']\n\n sibling\n\n      sibling(Str $arg1) : Object\n\n    The sibling method returns a new Data::Object::Space object for the\n    sibling package namespace.\n\n    sibling example #1\n\n        # given: synopsis\n      \n        $space-\u003esibling('baz')\n      \n        # Foo::Baz\n\n siblings\n\n      siblings() : ArrayRef[Object]\n\n    The siblings method searches %INC and @INC and retuns a list of\n    Data::Object::Space objects for each sibling namespace found (one level\n    deep).\n\n    siblings example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('encode/m_i_m_e');\n      \n        $space-\u003esiblings\n      \n        # [\n        #   'Encode/Alias',\n        #   'Encode/Config'\n        #   ...\n        # ]\n\n tryload\n\n      tryload() : Bool\n\n    The tryload method attempt to load the represented package using the\n    \"load\" method and returns truthy/falsy based on whether the package was\n    loaded.\n\n    tryload example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('c_p_a_n');\n      \n        $space-\u003etryload\n      \n        # 1\n\n    tryload example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('brianne_spinka');\n      \n        $space-\u003etryload\n      \n        # 0\n\n use\n\n      use(Str | Tuple[Str, Str] $target, Any @params) : Object\n\n    The use method executes a use statement within the package namespace\n    specified.\n\n    use example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/goo');\n      \n        $space-\u003euse('Moo');\n      \n        # $self\n\n    use example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/hoo');\n      \n        $space-\u003euse('Moo', 'has');\n      \n        # $self\n\n    use example #3\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/ioo');\n      \n        $space-\u003euse(['Moo', 9.99], 'has');\n      \n        # $self\n\n used\n\n      used() : Str\n\n    The used method searches %INC for the package namespace and if found\n    returns the filepath and complete filepath for the loaded package,\n    otherwise returns falsy with an empty string.\n\n    used example #1\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/xyz');\n      \n        $space-\u003eused\n      \n        # ''\n\n    used example #2\n\n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('c_p_a_n');\n      \n        $space-\u003eload;\n        $space-\u003eused\n      \n        # 'CPAN'\n\n    used example #3\n\n        package Foo::Bar;\n      \n        sub import;\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/bar');\n      \n        $space-\u003eused\n      \n        # 'Foo/Bar'\n\n variables\n\n      variables() : ArrayRef[Tuple[Str, ArrayRef]]\n\n    The variables method searches the package namespace for variables and\n    returns their names.\n\n    variables example #1\n\n        package Etc;\n      \n        our $init = 0;\n        our $func = 1;\n      \n        our @does = (1..4);\n        our %sets = (1..4);\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('etc');\n      \n        $space-\u003evariables\n      \n        # [\n        #   ['arrays', ['does']],\n        #   ['hashes', ['sets']],\n        #   ['scalars', ['func', 'init']],\n        # ]\n\n version\n\n      version() : Maybe[Str]\n\n    The version method returns the VERSION declared on the target package,\n    if any.\n\n    version example #1\n\n        package Foo::Boo;\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/boo');\n      \n        $space-\u003eversion\n      \n        # undef\n\n    version example #2\n\n        package Foo::Boo;\n      \n        our $VERSION = 0.01;\n      \n        package main;\n      \n        use Data::Object::Space;\n      \n        my $space = Data::Object::Space-\u003enew('foo/boo');\n      \n        $space-\u003eversion\n      \n        # '0.01'\n\nAUTHOR\n\n    Al Newkirk, awncorp@cpan.org\n\nLICENSE\n\n    Copyright (C) 2011-2019, Al Newkirk, et al.\n\n    This is free software; you can redistribute it and/or modify it under\n    the terms of the The Apache License, Version 2.0, as elucidated in the\n    \"license file\"\n    \u003chttps://github.com/iamalnewkirk/data-object-space/blob/master/LICENSE\u003e.\n\nPROJECT\n\n    Wiki \u003chttps://github.com/iamalnewkirk/data-object-space/wiki\u003e\n\n    Project \u003chttps://github.com/iamalnewkirk/data-object-space\u003e\n\n    Initiatives\n    \u003chttps://github.com/iamalnewkirk/data-object-space/projects\u003e\n\n    Milestones\n    \u003chttps://github.com/iamalnewkirk/data-object-space/milestones\u003e\n\n    Contributing\n    \u003chttps://github.com/iamalnewkirk/data-object-space/blob/master/CONTRIBUTE.md\u003e\n\n    Issues \u003chttps://github.com/iamalnewkirk/data-object-space/issues\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fdata-object-space","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawncorp%2Fdata-object-space","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fdata-object-space/lists"}