Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Class::DBI and DB design

by tunaboy (Curate)
on Jun 06, 2003 at 22:15 UTC ( #263874=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package My::User;
    
    ...
    __PACKAGE__->has_a( 'user' => 'My::User' );
    __PACKAGE__->has_a( 'capability' => 'My::Capability' );
    
  2. or download this
    foreach ( $user->capabilities() ) {
        print $_->capability->name(), "\n";
    }
    
  3. or download this
    foreach ( $capability->users() ) {
        print $_->user->name(), "\n";
    }
    
  4. or download this
    sub get_capabilities {
        my ( $self ) = @_;
    ...
    
        return map { $_->capability->name() } @capabilities;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-11-26 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (174 votes), past polls