Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: CGI::Session "cache" issue

by Anonymous Monk
on May 23, 2011 at 23:29 UTC ( #906381=note: print w/ replies, xml ) Need Help??


in reply to Re^4: CGI::Session "cache" issue
in thread CGI::Session "cache" issue

This has though confused me entirely. How was it possible that I was even able to login, if I hadn't set the cookie on redirect. And why...

Your confusion is understandable.

Your code is very repetitive; there is zero abstraction.

This makes maintenance (finding bugs ) very difficult, if not impossible.

The code is in need of refactoring. What do I mean? See String Calculator TDD Kata done in Perl, its a ~14 minute video of an exercise in refactoring, live, as the programmer types it in.

Then see a 7minut Introduction to Catalyst , for an easier approach to writing complex CGIs using http://www.catalystframework.org/


Comment on Re^5: CGI::Session "cache" issue
Re^6: CGI::Session "cache" issue
by Zhris (Initiate) on May 24, 2011 at 18:30 UTC

    Thank you for those links.

    I found the live coding video very interesting. It was kind of fun to predict what the guy was going to code next, and how it could be improved before he improved it. Although, I believe he could have improved it a little more.

    I have heard of Catalyst before, but have never looked into it. It looks like a really useful framework for my needs.

    I am going to refactor my login code, as I know theres more code than neccessary in its current state.

    You've been more than helpful. In the past, I have posted CGI::Session questions on other forums, and had no replies, and eventually figured it out in my "own" way. I'm greatly appreciative of your speedy help and advice.

    Chris

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-04-19 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls