FAQ
I've been struggling to get off the ground with
Catalyst/DBIC/Authentication. I'm new to Catalyst so I want to do
everything as standard as possible, (ie please don't tell me there is
more than one way to do it or I might have to cry.. :) and I would
like to use DBIC.

I won't go into the details[1] but I seem to be in a pattern where I
find good some good examples, get things close to working and then
discover at a certain point that I'm using deprecated stuff that
should only be used for legacy apps. And that stuff I can borrow from
example A just doesn't work with stuff from example B. So it's been
quite a frustrating exercise...

Anyway, thanks for listening and I was just wondering if someone has a
gzipped downloadable MyApp with DBIC and auth setup or maybe a blog
post somewhere that describes how to set things up the right way (and
that's new enough so there's no deprecated classes used...)

[1] Well perhaps some details in brief note form...
- The Authentication section of the Tutorial in CPAN uses some
deprecated stuff (I find out eventually)
- I got Auth working with DBIC as per the docs (with users, roles,
user_roles tables) but without a realm. So I can use (the deprecated)
$c->login but $c->authenticate doesn't work...
- After decided I would give up and just keep using the $c->login I
tried adding another table to my DBIC Schema. This caused Auth to stop
working...

Regards,
Simon.
--
simon.baird@gmail.com

Search Discussions

  • Kieren Diment at May 28, 2009 at 6:25 am

    On 28/05/2009, at 2:21 PM, Simon Baird wrote:

    I've been struggling to get off the ground with
    Catalyst/DBIC/Authentication. I'm new to Catalyst so I want to do
    everything as standard as possible, (ie please don't tell me there is
    more than one way to do it or I might have to cry.. :) and I would
    like to use DBIC.
    Install Catalyst::Helper::AuthDBIC from CPAN and read the docs and the
    source it generates for you.
  • Tomas Doran at May 28, 2009 at 1:08 pm

    Simon Baird wrote:
    [1] Well perhaps some details in brief note form...
    - The Authentication section of the Tutorial in CPAN uses some
    deprecated stuff (I find out eventually)
    - I got Auth working with DBIC as per the docs (with users, roles,
    user_roles tables) but without a realm. So I can use (the deprecated)
    $c->login but $c->authenticate doesn't work...
    - After decided I would give up and just keep using the $c->login I
    tried adding another table to my DBIC Schema. This caused Auth to stop
    working...
    Hi.

    The tutorial on CPAN hasn't used anything deprecated for a _long time_
    as far as I can see.

    It was recently (09th May) switched to use the newer
    Catalyst::Authentication::Realm::SimpleDB, as this is easier to setup
    for beginners, but previous to that it still used the 'new'
    authentication setup.

    Going back to Catalyst-Manual-5.701004 (released 09th April 2008 i.e.
    over a year ago), the Authentication section of the tutorial is using
    the 'new' authentication method.

    Could you possibly review the latest version of the authentication
    section in the tutorial, and send us some feedback about where it should
    go into more detail, and what you think is confusing or missing? (Or, if
    you think I'm full of lies, and it recommends deprecated things, please
    point out where so I can LART myself).

    I appreciate that you seem to be quite frustrated with your experience,
    but I'd really like to (a) get you happy so that your app works as
    expected with the recommended authentication stuff, (b) get this sorted
    out so that nobody else goes down this path in future.

    Thanks in advance.
    t0m
  • Simon Baird at May 28, 2009 at 11:18 pm

    On Thu, May 28, 2009 at 11:08 PM, Tomas Doran wrote:
    Simon Baird wrote:
    [1] Well perhaps some details in brief note form...
    - The Authentication section of the Tutorial in CPAN uses some
    deprecated stuff (I find out eventually)
    - I got Auth working with DBIC as per the docs (with users, roles,
    user_roles tables) but without a realm. So I can use (the deprecated)
    $c->login but $c->authenticate doesn't work...
    - After decided I would give up and just keep using the $c->login I
    tried adding another table to my DBIC Schema. This caused Auth to stop
    working...
    Hi.

    The tutorial on CPAN hasn't used anything deprecated for a _long time_ as
    far as I can see.

    It was recently (09th May) switched to use the newer
    Catalyst::Authentication::Realm::SimpleDB, as this is easier to setup for
    beginners, but previous to that it still used the 'new' authentication
    setup.

    Going back to Catalyst-Manual-5.701004 (released 09th April 2008 i.e. over a
    year ago), the Authentication section of the tutorial is using the 'new'
    authentication method.

    Could you possibly review the latest version of the authentication section
    in the tutorial, and send us some feedback about where it should go into
    more detail, and what you think is confusing or missing? (Or, if you think
    I'm full of lies, and it recommends deprecated things, please point out
    where so I can LART myself).

    I appreciate that you seem to be quite frustrated with your experience, but
    I'd really like to (a) get you happy so that your app works as expected with
    the recommended authentication stuff, (b) get this sorted out so that nobody
    else goes down this path in future.

    Thanks in advance.
    t0m
    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.

    Simon.

    --
    simon.baird@gmail.com
  • Simon Baird at May 29, 2009 at 12:36 am

    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.
    Ok, so just now I have:

    * Googled and ended up here:
    http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manual/Tutorial/Authentication.pod

    * Did the svn checkout as described:
    svn co http://dev.catalyst.perl.org/repos/Catalyst/tags/examples/Tutorial/MyApp/5.7/Authentication
    MyApp

    * Fired it up and I have this in my apache log:
    [warn] Authentication::Store::DBIC is deprecated!

    * And so when you google that you find:
    "This store has been deprecated in favour of
    Catalyst::Authentication::Store::DBIx::Class. Please do not use this
    plugin for new development."

    This is pretty close to what happened on the first part of my
    adventures except quicker and with with less swearing... :)


    Ps, ...I may have figured it out... is it because I should be using
    this tutorial?
    http://search.cpan.org/~rjbs/Catalyst-Manual-5.7014/lib/Catalyst/Manual/Tutorial/Authentication.pod




    --
    simon.baird@gmail.com
  • Andrew Rodland at May 29, 2009 at 12:48 am

    On Thursday 28 May 2009 07:36:29 pm Simon Baird wrote:
    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.
    Ok, so just now I have:

    * Googled and ended up here:
    http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manua
    l/Tutorial/Authentication.pod
    Google is not to be trusted: that's 3 years old. Its advice was reasonably
    good three years ago, but not so much today.

    The current version is at http://search.cpan.org/~hkclark/Catalyst-
    Manual-5.8000/lib/Catalyst/Manual/Tutorial/05_Authentication.pod .

    Andrew
  • Kennedy Clark at May 29, 2009 at 12:49 am
    Hi Simon,

    It looks like Google has taken you to some really old versions of the
    tutorial. Try this:

    http://search.cpan.org/dist/Catalyst-Manual/

    You can get back to this point if you go to http://search.cpan.org and
    put in "Catalyst Tutorial" or "Catalyst Manual".

    Unfortunately, the search in search.cpan.org tends to show some out of
    date stuff, especially during times like this where we just repackaged
    the name of the tutorial files. And, even more unfortunate is that
    Google seems to routinely send people to truly ancient stuff. Anyway,
    try the link above and let us know if you run into issues.

    I'll probably send out another note on this, but if anyone has
    suggestion on how to improve the "search situation" for the Catalyst
    Manual (both on search.cpan.org and Google), please let me know. It
    may be one of those things we can do nothing about, but I would think
    there are probably things that can be done to help on both fronts.
    For example, a search for "Catalyst Tutorial" on search.cpan.org shows
    a bunch of the 5.7014 stuff near the top... and that's over 7 months
    (and 9 releases) old. Is there a way to "kill off" older releases
    like that (or at least push them down in the search results)?

    Thanks,
    Kennedy
    On Thu, May 28, 2009 at 8:36 PM, Simon Baird wrote:

    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.
    Ok, so just now I have:

    * Googled and ended up here:
    http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manual/Tutorial/Authentication.pod

    * Did the svn checkout as described:
    svn co http://dev.catalyst.perl.org/repos/Catalyst/tags/examples/Tutorial/MyApp/5.7/Authentication
    MyApp

    * Fired it up and I have this in my apache log:
    [warn] Authentication::Store::DBIC is deprecated!

    * And so when you google that you find:
    "This store has been deprecated in favour of
    Catalyst::Authentication::Store::DBIx::Class. Please do not use this
    plugin for new development."

    This is pretty close to what happened on the first part of my
    adventures except quicker and with with less swearing... :)


    Ps, ...I may have figured it out... is it because I should be using
    this tutorial?
    http://search.cpan.org/~rjbs/Catalyst-Manual-5.7014/lib/Catalyst/Manual/Tutorial/Authentication.pod




    --
    simon.baird@gmail.com

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Tomas Doran at May 29, 2009 at 1:15 am

    On 29 May 2009, at 01:49, hkclark@gmail.com wrote:
    For example, a search for "Catalyst Tutorial" on search.cpan.org shows
    a bunch of the 5.7014 stuff near the top... and that's over 7 months
    (and 9 releases) old. Is there a way to "kill off" older releases
    like that (or at least push them down in the search results)?
    The only way to do this is to delete the dist in question.

    I asked rjbs to do so, and it's now scheduled for deletion. It'll be
    deleted in 48 hours, and search.cpan should catch up at whatever it's
    usual pace is, later ;)

    Cheers
    t0m
  • Kennedy Clark at May 29, 2009 at 2:41 pm

    On Thu, May 28, 2009 at 9:15 PM, Tomas Doran wrote:
    On 29 May 2009, at 01:49, hkclark@gmail.com wrote:

    For example, a search for "Catalyst Tutorial" on search.cpan.org shows
    a bunch of the 5.7014 stuff near the top... and that's over 7 months
    (and 9 releases) old. ?Is there a way to "kill off" older releases
    like that (or at least push them down in the search results)?
    The only way to do this is to delete the dist in question.

    I asked rjbs to do so, and it's now scheduled for deletion. It'll be deleted
    in 48 hours, and search.cpan should catch up at whatever it's usual pace is,
    later ;)

    Cheers
    t0m
    Great. Thank you very much. That should at least remove some
    possible confusion for folks new to Catalyst who wonder why they are
    seeing "multiple copies of almost the same thing" in the
    search.cpan.org results.

    Does anyone know how the CPAN search algorithm works in terms of what
    it ranks first (or how we might be able to find out)?

    I look at it this way: if search.cpan.org and Google send people off
    in the wrong direction and/or frustrate them, then we have probably
    lost our only chance to "make a good first impression." It's a pain
    that we have to do extra work to make those external things "show
    Catalyst in the right way"... but at the end of the day, if it "makes
    us look bad" then it's just that... we look bad. I totally agree with
    MST's point that we should do things to promote "modern Perl",
    Catalyst, DBIC, Moose, etc. through things like blogging. Making it
    ease for people to get their hands on good information when they are
    new is just another way to accomplish that goal... IMHO. :-)

    Regards,
    Kennedy
  • Jay Shirley at May 29, 2009 at 3:09 pm

    On Fri, May 29, 2009 at 7:41 AM, wrote:
    On Thu, May 28, 2009 at 9:15 PM, Tomas Doran wrote:
    On 29 May 2009, at 01:49, hkclark@gmail.com wrote:

    For example, a search for "Catalyst Tutorial" on search.cpan.org shows
    a bunch of the 5.7014 stuff near the top... and that's over 7 months
    (and 9 releases) old. Is there a way to "kill off" older releases
    like that (or at least push them down in the search results)?
    The only way to do this is to delete the dist in question.

    I asked rjbs to do so, and it's now scheduled for deletion. It'll be deleted
    in 48 hours, and search.cpan should catch up at whatever it's usual pace is,
    later ;)

    Cheers
    t0m
    Great. Thank you very much. That should at least remove some
    possible confusion for folks new to Catalyst who wonder why they are
    seeing "multiple copies of almost the same thing" in the
    search.cpan.org results.

    Does anyone know how the CPAN search algorithm works in terms of what
    it ranks first (or how we might be able to find out)?

    I look at it this way: if search.cpan.org and Google send people off
    in the wrong direction and/or frustrate them, then we have probably
    lost our only chance to "make a good first impression." It's a pain
    that we have to do extra work to make those external things "show
    Catalyst in the right way"... but at the end of the day, if it "makes
    us look bad" then it's just that... we look bad. I totally agree with
    MST's point that we should do things to promote "modern Perl",
    Catalyst, DBIC, Moose, etc. through things like blogging. Making it
    ease for people to get their hands on good information when they are
    new is just another way to accomplish that goal... IMHO. :-)
    Just as a quick aside, if you go to catalystframework.org and follow the
    Documentation link, it continues to
    http://search.cpan.org/dist/Catalyst-Manual/ which defaults to the latest
    version.

    If the search results defaulted to the latest, there was a canonical tag
    that pointed to the /dist/ path, as well as the "Latest version" link always
    doing the right thing, the problem would likely be reduced.

    The Latest version link could be made more prominent as well.

    -J
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090529/e49c1e5d/attachment.htm
  • Roderick A. Anderson at May 29, 2009 at 3:28 pm

    hkclark@gmail.com wrote:
    On Thu, May 28, 2009 at 9:15 PM, Tomas Doran wrote:
    On 29 May 2009, at 01:49, hkclark@gmail.com wrote:
    For example, a search for "Catalyst Tutorial" on search.cpan.org shows
    a bunch of the 5.7014 stuff near the top... and that's over 7 months
    (and 9 releases) old. Is there a way to "kill off" older releases
    like that (or at least push them down in the search results)?
    The only way to do this is to delete the dist in question.

    I asked rjbs to do so, and it's now scheduled for deletion. It'll be deleted
    in 48 hours, and search.cpan should catch up at whatever it's usual pace is,
    later ;)

    Cheers
    t0m
    <snip />
    Does anyone know how the CPAN search algorithm works in terms of what
    it ranks first (or how we might be able to find out)?
    In the olden days most _good_ search engines looked for the keywords
    meta tag, checked if the words were in the document, checked for when
    the document as last modified, and kept some statistics on how often a
    site was accessed.

    Now days, it seems, the search engines are (trying to) indexing the
    whole document/site. Google appears to be looking at last accesses and
    possibly stay times for its ranking. (Any Google engineers hanging out
    around here?)

    The cheap trick would be to have everyone search for the specific sites
    /documents using Google then camp out at them for a bit. The low
    hanging fruit method would to be insure there are <meta name="keywords"
    ... /> tags that match up with the words in first (few) paragraph(s).

    There is also the "CISCO Catalyst" verses the "Catalyst Framework"
    issue. When I search using Google this isn't a problem. Google hinted
    all the right things but then I've done a bit of browsing for Catalyst
    Framework related links.


    \\||/
    Rod
    --
    I look at it this way: if search.cpan.org and Google send people off
    in the wrong direction and/or frustrate them, then we have probably
    lost our only chance to "make a good first impression." It's a pain
    that we have to do extra work to make those external things "show
    Catalyst in the right way"... but at the end of the day, if it "makes
    us look bad" then it's just that... we look bad. I totally agree with
    MST's point that we should do things to promote "modern Perl",
    Catalyst, DBIC, Moose, etc. through things like blogging. Making it
    ease for people to get their hands on good information when they are
    new is just another way to accomplish that goal... IMHO. :-)

    Regards,
    Kennedy

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Kieren Diment at May 29, 2009 at 12:50 am

    On 29/05/2009, at 10:36 AM, Simon Baird wrote:


    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.
    Ok, so just now I have:

    * Googled and ended up here:
    http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manual/Tutorial/Authentication.pod

    Try http://search.cpan.org/perldoc?Catalyst::Manual::Tutorial.

    Is there a link that we can get the cpan admins to put into search
    results so that google will preferentially return the permalink urls
    rather than for specific versions?
    * Did the svn checkout as described:
    svn co http://dev.catalyst.perl.org/repos/Catalyst/tags/examples/Tutorial/MyApp/5.7/Authentication
    MyApp

    * Fired it up and I have this in my apache log:
    [warn] Authentication::Store::DBIC is deprecated!

    * And so when you google that you find:
    "This store has been deprecated in favour of
    Catalyst::Authentication::Store::DBIx::Class. Please do not use this
    plugin for new development."

    This is pretty close to what happened on the first part of my
    adventures except quicker and with with less swearing... :)


    Ps, ...I may have figured it out... is it because I should be using
    this tutorial?
    http://search.cpan.org/~rjbs/Catalyst-Manual-5.7014/lib/Catalyst/Manual/Tutorial/Authentication.pod




    --
    simon.baird@gmail.com

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Kennedy Clark at May 29, 2009 at 2:32 pm

    On Thu, May 28, 2009 at 8:50 PM, Kieren Diment wrote:
    Is there a link that we can get the cpan admins to put into search results
    so that google will preferentially return the permalink urls rather than for
    specific versions?
    It sure would be nice to figure out a way to pull that off. Seems
    like there *has* to be something we could do that would "attract"
    Google to the permalinks. Anybody out there good at "search engine
    optimization" and have any thoughts on things we could try?

    Thanks,
    Kennedy
  • Jay Shirley at May 29, 2009 at 1:00 am

    On Thu, May 28, 2009 at 5:36 PM, Simon Baird wrote:


    Thanks for the advice. I might start fresh and see if I can pinpoint
    where things went wrong.
    Ok, so just now I have:

    * Googled and ended up here:

    http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manual/Tutorial/Authentication.pod<http://search.cpan.org/%7Emramberg/Catalyst-Runtime-5.7000/lib/Catalyst/Manual/Tutorial/Authentication.pod>

    * Did the svn checkout as described:
    svn co
    http://dev.catalyst.perl.org/repos/Catalyst/tags/examples/Tutorial/MyApp/5.7/Authentication
    MyApp

    * Fired it up and I have this in my apache log:
    [warn] Authentication::Store::DBIC is deprecated!

    * And so when you google that you find:
    "This store has been deprecated in favour of
    Catalyst::Authentication::Store::DBIx::Class. Please do not use this
    plugin for new development."

    This is pretty close to what happened on the first part of my
    adventures except quicker and with with less swearing... :)


    Ps, ...I may have figured it out... is it because I should be using
    this tutorial?

    http://search.cpan.org/~rjbs/Catalyst-Manual-5.7014/lib/Catalyst/Manual/Tutorial/Authentication.pod<http://search.cpan.org/%7Erjbs/Catalyst-Manual-5.7014/lib/Catalyst/Manual/Tutorial/Authentication.pod>




    --
    simon.baird@gmail.com

    Trusting Google to give you the latest version is probably a pretty bad idea
    :)

    To derail this conversation a little bit, perhaps the canonical meta tag
    pointing to the most recent release would do well on older versions still
    sitting on CPAN? I'm not sure how else to coerce Google into always linking
    to the most recent version of whatever it finds.

    That, and the "Latest Release" on CPAN is busted. It points to 5.7003 which
    then goes to a Not Found page. Ick.

    And for more on-topic goodness, Catalyst::Manual for 5.8 is also out:
    http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Tutorial/05_Authentication.pod

    If you go to http://search.cpan.org/ you can find the most recent there... I
    tend to ignore Google when I'm searching for technical documentation as it
    often comes up short. Having said that, sorry for your experience here.
    It's a pretty bad and frustrating user experience to follow a guide that is
    outdated purely because Google told you :) Since it seems the example app
    is also out of date, perhaps someone should update that (I may be able to...
    if nobody else beats me to it)

    -J
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090528/f2e3d320/attachment.htm
  • Octavian Rasnita at May 29, 2009 at 5:07 am
    From: J. Shirley
    Trusting Google to give you the latest version is probably a pretty bad idea :)
    To derail this conversation a little bit, perhaps the canonical meta tag pointing to the most recent release would do well on older versions still sitting on > CPAN? I'm not sure how else to coerce Google into always linking to the most recent version of whatever it finds.
    That, and the "Latest Release" on CPAN is busted. It points to 5.7003 which then goes to a Not Found page. Ick.
    There could be a permalink to the latest version on CPAN, and a program that handles the 404 Not Found errors which could get the module name (without version) and redirect to that permalink.

    This way, if the older versions are removed from CPAN, the Google always would return the latest version of the found module.

    Octavian
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090529/fa3723be/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMay 28, '09 at 4:21a
activeMay 29, '09 at 3:28p
posts15
users8
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase