Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

"has" statement

by tritt (Novice)
on Jul 26, 2012 at 18:32 UTC ( #983902=perlquestion: print w/replies, xml ) Server Error (Error ID 6663810a48705)

An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

Need Help??
tritt has asked for the wisdom of the Perl Monks concerning the following question:

Hello seekers of wisdom like myself.

I've just started learing Mojolicious and came up to this statement:

has schema => sub { return Schema->connect('dbi:SQLite:test.db'); };

Which adds a subrutine to $self I suppouse :)

I tried to search in Google, here(perlmonks), and perldoc with no success about this "has" construction.

Anyone knows exactly what it does?


Replies are listed 'Best First'.
Re: "has" statement
by jdporter (Canon) on Jul 26, 2012 at 18:38 UTC
      Ugh!, thanks. I was looking in the wrong place :)
Re: "has" statement
by moritz (Cardinal) on Jul 26, 2012 at 19:11 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://983902]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-08-29 20:42 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (409 votes). Check out past polls.