hmm... in principle i tend to Tanktalus' point of view. it's always advisable designing classes in a way by which every class fulfills only its own purposes. but unless you are dealing with, let's say, millions of users and dozens of log files on a cluster of several computers - you'll be possibly better off with a mixed approach.
in the applications i wrote so far i made quite good experiences with a session class, and a user class. every session object contains as one of its members an instance of user - which is either assigned to a valid user, or to an anonymous one (if she's not logged in).
the implementation of that anonymous user helps a lot in writing your scripts:
return FORBIDDEN if $session->user->anonymous;


language is a virus from outer space.

In reply to Re: The division of (class) labor in OOP by thcsoft
in thread The division of (class) labor in OOP by jeyroz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.