{
    "mode": "perldoc",
    "parameter": "Specio::Exporter",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Specio%3A%3AExporter/json",
    "generated": "2026-06-12T12:30:49Z",
    "synopsis": "package MyApp::Type::Library;\nuse parent 'Specio::Exporter';\nuse Specio::Declare;\ndeclare( ... );\n# more types here\npackage MyApp::Foo;\nuse MyApp::Type::Library",
    "sections": {
        "NAME": {
            "content": "Specio::Exporter - Base class for type libraries\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.47\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package MyApp::Type::Library;\n\nuse parent 'Specio::Exporter';\n\nuse Specio::Declare;\n\ndeclare( ... );\n\n# more types here\n\npackage MyApp::Foo;\n\nuse MyApp::Type::Library\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Inheriting from this package makes your package a type exporter. By default, types defined in a\npackage are never visible outside of the package. When you inherit from this package, all the\ntypes you define internally become available via exports.\n\nThe exported types are available through the importing package's \"t\" subroutine.\n\nBy default, types your package imports are not re-exported:\n\npackage MyApp::Type::Library;\n\nuse parent 'Specio::Exporter';\n\nuse Specio::Declare;\nuse Specio::Library::Builtins;\n\nIn this case, the types provided by Specio::Library::Builtins are not exported to packages which\n\"use MyApp::Type::Library\".\n\nYou can explicitly ask for types to be re-exported:\n\npackage MyApp::Type::Library;\n\nuse parent 'Specio::Exporter';\n\nuse Specio::Declare;\nuse Specio::Library::Builtins -reexport;\n\nIn this case, packages which \"use MyApp::Type::Library\" will get all the types from\nSpecio::Library::Builtins as well as any types defined in \"MyApp::Type::Library\".\n",
            "subsections": []
        },
        "ADDITIONAL EXPORTS": {
            "content": "If you want to export some additional subroutines from a package which has \"Specio::Exporter\" as\nits parent, define a sub named \"alsoexport\". This sub should return a *list* of subroutines\ndefined in your package that should also be exported. These subs will be exported\nunconditionally to any package that uses your package.\n\nCOMBINING LIBRARIES WITH Specio::Subs\nYou can combine loading libraries with subroutine generation using Specio::Subs by using\n\"alsoexport\" and \"Specio::Subs::subsinstalledinto\":\n\npackage My::Library;\n\nuse My::Library::Internal -reexport;\nuse Specio::Library::Builtins -reexport;\nuse Specio::Subs qw( My::Library::Internal Specio::Library::Builtins );\n\nsub alsoexport {\nreturn Specio::Subs::subsinstalledinto(PACKAGE);\n}\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs may be submitted at <https://github.com/houseabsolute/Specio/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
            "subsections": []
        },
        "SOURCE": {
            "content": "The source code repository for Specio can be found at <https://github.com/houseabsolute/Specio>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Rolsky <autarch@urth.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2012 - 2021 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
            "subsections": []
        }
    },
    "summary": "Specio::Exporter - Base class for type libraries",
    "flags": [],
    "examples": [],
    "see_also": []
}