Skip to content

Object::Pad or Class feature? #2253

Closed Answered by ajmetz
ajmetz asked this question in Q&A
Discussion options

You must be logged in to vote

Er...spoke too soon!? I appear to now have it working...


use v5.40;
use Object::Pad v0.820;

class   Management::Controller::Root :repr(HASH) {

    inherit Mojolicious::Controller;

    method hello_world {

        $self->render(
            text => "Hello World!",
        );        

    }

}

HTTP::Server::PSGI: Accepting connections at http://0:52000/
[2025-05-21 15:00:06.86950] [2914171] [trace] [Im7w6fmJ0PEY] GET "/hello"
[2025-05-21 15:00:06.87070] [2914171] [trace] [Im7w6fmJ0PEY] Routing to controller "Management::Controller::Root" and action "hello_world"
[2025-05-21 15:00:06.87640] [2914171] [trace] [Im7w6fmJ0PEY] 200 OK (0.00688s, 145.349/s)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ajmetz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant