{"id":18981419,"url":"https://github.com/awncorp/mojo-component","last_synced_at":"2026-06-19T08:32:01.576Z","repository":{"id":54940254,"uuid":"327174096","full_name":"awncorp/mojo-component","owner":"awncorp","description":"Module-based Component Renderer","archived":false,"fork":false,"pushed_at":"2021-01-20T09:34:40.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-11T08:03:08.215Z","etag":null,"topics":["component","mojo","mojolicious","perl","perl5","templating"],"latest_commit_sha":null,"homepage":"https://metacpan.org/release/Mojolicious-Plugin-Component","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}},"created_at":"2021-01-06T02:12:38.000Z","updated_at":"2022-07-24T20:58:54.000Z","dependencies_parsed_at":"2022-08-14T07:10:18.869Z","dependency_job_id":null,"html_url":"https://github.com/awncorp/mojo-component","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/awncorp/mojo-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmojo-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmojo-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmojo-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmojo-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awncorp","download_url":"https://codeload.github.com/awncorp/mojo-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fmojo-component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34523982,"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-19T02:00:06.005Z","response_time":61,"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":["component","mojo","mojolicious","perl","perl5","templating"],"created_at":"2024-11-08T16:09:48.000Z","updated_at":"2026-06-19T08:32:01.559Z","avatar_url":"https://github.com/awncorp.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n\n    Mojolicious::Plugin::Component - Module-based Component Rendering\n\nABSTRACT\n\n    Module-based Component Rendering Plugin\n\nSYNOPSIS\n\n      package App;\n    \n      use Mojo::Base 'Mojolicious';\n    \n      package App::Component::Image;\n    \n      use Mojo::Base 'Mojolicious::Component';\n    \n      has alt =\u003e 'random';\n      has height =\u003e 126;\n      has width =\u003e 145;\n      has src =\u003e '/random.gif';\n    \n      1;\n    \n      # __DATA__\n      #\n      # @@ component\n      #\n      # \u003cimg\n      #   alt=\"\u003c%= $component-\u003ealt %\u003e\"\n      #   height=\"\u003c%= $component-\u003eheight %\u003e\"\n      #   src=\"\u003c%= $component-\u003esrc %\u003e\"\n      #   width=\"\u003c%= $component-\u003ewidth %\u003e\"\n      # /\u003e\n    \n      package main;\n    \n      my $app = App-\u003enew;\n    \n      my $component = $app-\u003eplugin('component');\n    \n      my $image = $app-\u003ecomponent-\u003euse('image');\n    \n      my $rendered = $image-\u003erender;\n\nDESCRIPTION\n\n    This package provides Mojolicious module-based component rendering\n    plugin.\n\nINHERITS\n\n    This package inherits behaviors from:\n\n    Mojolicious::Plugin\n\nMETHODS\n\n    This package implements the following methods:\n\n register\n\n      register(InstanceOf[\"Mojolicious\"] $app, Maybe[HashRef] $config) : Object\n\n    The register method registers one or more component builders in the\n    Mojolicious application. The configuration information can be provided\n    when registering the plugin by calling plugin during setup, or by\n    specifying the data in the application configuration under the key\n    component. By default, if no configuration information is provided the\n    plugin will register a builder labeled use which will load components\n    under the application's Component namespace.\n\n    register example #1\n\n        package main;\n      \n        use Mojolicious::Plugin::Component;\n      \n        my $app = Mojolicious-\u003enew;\n      \n        my $component = Mojolicious::Plugin::Component-\u003enew;\n      \n        $component = $component-\u003eregister($app);\n\n    register example #2\n\n        package main;\n      \n        use Mojolicious::Plugin::Component;\n      \n        my $app = Mojolicious-\u003enew;\n      \n        my $component = Mojolicious::Plugin::Component-\u003enew;\n      \n        $component = $component-\u003eregister($app, {\n          v1 =\u003e 'App::V1::Component',\n          v2 =\u003e 'App::V2::Component',\n        });\n      \n        # my $v1 = $app-\u003ecomponent-\u003ev1('image');\n        # my $v2 = $app-\u003ecomponent-\u003ev2('image');\n\n    register example #3\n\n        package main;\n      \n        use Mojolicious::Plugin::Component;\n      \n        my $app = Mojolicious-\u003enew;\n      \n        my $component = Mojolicious::Plugin::Component-\u003enew;\n      \n        $component = $component-\u003eregister($app, {\n          v1 =\u003e 'App::V1::Component',\n          v2 =\u003e 'App::V2::Component',\n        });\n      \n        # my $v1 = $app-\u003ecomponent-\u003ev1('image' =\u003e (\n        #   src =\u003e '/random-v1.gif',\n        # ));\n      \n        # my $v2 = $app-\u003ecomponent-\u003ev2('image' =\u003e (\n        #   src =\u003e '/random-v2.gif',\n        # ));\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/cpanery/mojolicious-plugin-component/blob/master/LICENSE\u003e.\n\nPROJECT\n\n    Wiki \u003chttps://github.com/cpanery/mojolicious-plugin-component/wiki\u003e\n\n    Project \u003chttps://github.com/cpanery/mojolicious-plugin-component\u003e\n\n    Initiatives\n    \u003chttps://github.com/cpanery/mojolicious-plugin-component/projects\u003e\n\n    Milestones\n    \u003chttps://github.com/cpanery/mojolicious-plugin-component/milestones\u003e\n\n    Contributing\n    \u003chttps://github.com/cpanery/mojolicious-plugin-component/blob/master/CONTRIBUTE.md\u003e\n\n    Issues \u003chttps://github.com/cpanery/mojolicious-plugin-component/issues\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fmojo-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawncorp%2Fmojo-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fmojo-component/lists"}