Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Catalyst Models Definitive Guide

by mkchris (Sexton)
on Jan 20, 2022 at 11:27 UTC ( #11140637=note: print w/replies, xml ) Need Help??


in reply to Catalyst Models Definitive Guide

Hello - I appreciate this is now a very old post - I'm trying to download the sample code, as I have got as far as modelone and modeltwo on my own, but I think modelthree could be useful to me - it looks like the SVN repository is no longer up, which again is probably not surprising given the age of the post - is there anywhere else that it's available please, so I can have a look and try and understand?

Many thanks in advance.

Replies are listed 'Best First'.
Re^2: Catalyst Models Definitive Guide
by Your Mother (Archbishop) on Jan 20, 2022 at 12:46 UTC

    Looks like you can just cut and paste the code if you follow the accompanying instructions to set things up. You might get a reply from the author though for an alternative repository.

    Feel free to take a stab at it and come back with questions if it’s not working.

    Sidenote: I would recommend against–

    use base 'DBIx::Class::ResultSet'; sub listall { my $self = shift; my @people = $self->all(); return \@people; }

    Well-behaved resultsets should only return the same because they are expected to be chainable and ->all is kind of weirdly redundant so might lead to misunderstandings or over-elaboration of what could be more simple code.

      Thank you, yes I have generally avoided doing ->all in a resultset method for the same reason; also because I may want to return a resultset rather than an array, so if I want an array I can either call it in array context: @people = $c->model("DB::People")->listall or chain $c->model("DB::People")->listall->all.
Re^2: Catalyst Models Definitive Guide
by syphilis (Archbishop) on Jan 20, 2022 at 12:49 UTC
    is there anywhere else that it's available please

    If all else fails, I suggest sending a message to ait via the Chatterbox.
    I see that he signed in 6 days ago, so it would seem that he is still keeping an eye on events at the monastery.
    (It's quite likely that he won't even see the post you've just made - but there's a reasonable chance he'll notice an /msg sent directly and specifically to him.)

    Cheers,
    Rob
      Ah thank you for that, I will ask directly!
Re^2: Catalyst Models Definitive Guide
by yewtc (Novice) on Jan 20, 2022 at 15:36 UTC
      Oh thank you very much, I'll take a look!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2022-07-06 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?