Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Looking for a working example using DBIC and Authentication

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


simon.baird at gmail

May 27, 2009, 9:21 PM

Post #1 of 13 (894 views)
Permalink
Looking for a working example using DBIC and Authentication

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[at]gmail.com

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


diment at gmail

May 27, 2009, 11:25 PM

Post #2 of 13 (846 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

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.




_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


simon.baird at gmail

May 28, 2009, 5:36 PM

Post #3 of 13 (834 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

>
> 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[at]gmail.com

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


arodland at comcast

May 28, 2009, 5:48 PM

Post #4 of 13 (837 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

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



_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hkclark at gmail

May 28, 2009, 5:49 PM

Post #5 of 13 (831 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

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 <simon.baird[at]gmail.com> 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[at]gmail.com
>
> _______________________________________________
> List: Catalyst[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


diment at gmail

May 28, 2009, 5:50 PM

Post #6 of 13 (834 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

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[at]gmail.com
>
> _______________________________________________
> List: Catalyst[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/



_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


jshirley at gmail

May 28, 2009, 6:00 PM

Post #7 of 13 (834 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

On Thu, May 28, 2009 at 5:36 PM, Simon Baird <simon.baird[at]gmail.com> 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[at]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


bobtfish at bobtfish

May 28, 2009, 6:15 PM

Post #8 of 13 (833 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

On 29 May 2009, at 01:49, hkclark[at]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


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

May 28, 2009, 10:07 PM

Post #9 of 13 (832 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

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


hkclark at gmail

May 29, 2009, 7:32 AM

Post #10 of 13 (818 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

On Thu, May 28, 2009 at 8:50 PM, Kieren Diment <diment[at]gmail.com> 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

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hkclark at gmail

May 29, 2009, 7:41 AM

Post #11 of 13 (817 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

On Thu, May 28, 2009 at 9:15 PM, Tomas Doran <bobtfish[at]bobtfish.net> wrote:
>
> On 29 May 2009, at 01:49, hkclark[at]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

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


jshirley at gmail

May 29, 2009, 8:09 AM

Post #12 of 13 (820 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

On Fri, May 29, 2009 at 7:41 AM, <hkclark[at]gmail.com> wrote:

> On Thu, May 28, 2009 at 9:15 PM, Tomas Doran <bobtfish[at]bobtfish.net>
> wrote:
> >
> > On 29 May 2009, at 01:49, hkclark[at]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


raanders at cyber-office

May 29, 2009, 8:28 AM

Post #13 of 13 (813 views)
Permalink
Re: Looking for a working example using DBIC and Authentication [In reply to]

hkclark[at]gmail.com wrote:
> On Thu, May 28, 2009 at 9:15 PM, Tomas Doran <bobtfish[at]bobtfish.net> wrote:
>> On 29 May 2009, at 01:49, hkclark[at]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[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.