use Mojolicious::Lite use DBIx::Custom; app->attr( dbi => sub { my $dbi = DBIx::Custom->connect(dsn => "..."); return $dbi; } ); get '/foo' => sub { my $self = shift; $self->dbi->select(...); $self->render; }; app->start;
Thanks, i have read this, but thought that there was a difference between them that wasn't mentioned.
Regards
--
You received this message because you are subscribed to a topic in the Google Groups "Mojolicious" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mojolicious/ud4mSc0kJ4s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mojolicious+unsubscribe@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
On Oct 5, 2016 7:57 AM, "khalil zakaria Zemmoura" <zemmour...@gmail.com> wrote:
>
> Thanks, i have read this, but thought that there was a difference between them that wasn't mentioned.
You will soon come to realize the precision of the Mojo docs. There is nothing that isn't said that should be; nothing that shouldn't be said that is.
The Mojolicious docs are as perfect as Mojolicious itself.
Give or take a 1% margin of error, but I say this with all sincerity.
I agree with you, it's very well documented but as a new user, i am not very familiar with the structure of the doc.
Some thoughts about the documentation:
It will be great I think if we had some how-to's that shows how easy is to build a real small app that interact with database and stuff like that (crud app) like Django does cause mojolicious is powerful and pleasant to use.
Showing that will attract more new devs as well as experimented devs that are looking for a neat API.
Of course they are examples in the wiki but looking to them require some knowledge of mojolicious
Regards
--
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscribe@googlegroups.com.
The https://metacpan.org/pod/Mojo::SQLite and https://metacpan.org/pod/Mojo::Pg frameworks are built on DBI and are the usual way to connect to these databases from Mojolicious. Those distributions also come with a blog example in https://metacpan.org/source/DBOOK/Mojo-SQLite-1.000/examples/blog and https://metacpan.org/source/SRI/Mojo-Pg-2.30/examples/blog . Mojolicious does not have any built in database connectivity so any database examples would be in the separate distributions.
On Wed, Oct 5, 2016 at 3:12 PM, khalil zakaria Zemmoura <zemmour...@gmail.com> wrote:
I agree with you, it's very well documented but as a new user, i am not very familiar with the structure of the doc.
Some thoughts about the documentation:
It will be great I think if we had some how-to's that shows how easy is to build a real small app that interact with database and stuff like that (crud app) like Django does cause mojolicious is powerful and pleasant to use.
Showing that will attract more new devs as well as experimented devs that are looking for a neat API.
Of course they are examples in the wiki but looking to them require some knowledge of mojolicious
Regards
Le 5 oct. 2016 15:05, "Stefan Adams" <s103...@gmail.com> a écrit :
On Oct 5, 2016 7:57 AM, "khalil zakaria Zemmoura" <zemmour...@gmail.com> wrote:
>
> Thanks, i have read this, but thought that there was a difference between them that wasn't mentioned.You will soon come to realize the precision of the Mojo docs. There is nothing that isn't said that should be; nothing that shouldn't be said that is.
The Mojolicious docs are as perfect as Mojolicious itself.
Give or take a 1% margin of error, but I say this with all sincerity.
--
You received this message because you are subscribed to a topic in the Google Groups "Mojolicious" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mojolicious/ud4mSc0kJ4s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.