Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread Jan Eskilsson
Hi Sebastian


I did a couple of projects for a us based company some time ago and they
demanded this text in all emails, I have kept it more or less as a joke :-)

Thank you very much for the tip with the promise, i will dig into that and
se how far i get before i need your help again.


Best Regards
Jan

2018-04-02 22:05 GMT+02:00 sri :

> (1) The contents of this transmission are privileged and confidential and
>> intended solely for the use of the addressee. Any disclosure, distribution
>> or copying of the contents, other than by the addressee, is strictly
>> prohibited. If you receive this transmission in error, please notify us
>> immediately and destroy the material received.
>>
>
> What?
>
> --
> sebastian
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Titles mean nothing.  The one with a servant's heart is the leader.

Please consider the environment before you print this email.

(1) The contents of this transmission are privileged and confidential and
intended solely for the use of the addressee. Any disclosure, distribution
or copying of the contents, other than by the addressee, is strictly
prohibited. If you receive this transmission in error, please notify us
immediately and destroy the material received.
(2) All incoming and outgoing emails and any attachments are subjected to a
virus scanner and are believed to be free of any virus, or any other defect
which might affect any computer or IT system into which they are received
and opened. Therefore, it is the responsibility of the recipient to ensure
that they are virus free and no responsibility is accepted by Jan Eskilsson
 for any loss or damage arising in any way from receipt or use thereof.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread Alberto Mijares
On Mon, Apr 2, 2018 at 4:05 PM, sri  wrote:
>> (1) The contents of this transmission are privileged and confidential and
>> intended solely for the use of the addressee. Any disclosure, distribution
>> or copying of the contents, other than by the addressee, is strictly
>> prohibited. If you receive this transmission in error, please notify us
>> immediately and destroy the material received.
>
>
> What?
>


I find this as hilarious as annoying, given the fact that it comes
from a personal email and goes to a distribution list.

Sorry for the unnecessary post.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread sri
Make a method that returns a promise.

package MyApp::Controller::SomeThingy;

sub whatever {
  my $self = shift;
  $self->some_model->search_something_p(...)->then(sub {
my $results = shift;
$self->render('some_template', results => $results);
  });
}

P.S.: I like to use the *_p naming convention to indicate a promise 
returning method.

--
sebastian

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread sri

>
> (1) The contents of this transmission are privileged and confidential and 
> intended solely for the use of the addressee. Any disclosure, distribution 
> or copying of the contents, other than by the addressee, is strictly 
> prohibited. If you receive this transmission in error, please notify us 
> immediately and destroy the material received.
>

What?

--
sebastian 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Mojo:;Pg

2018-04-02 Thread Jan Eskilsson
Hi everyone


Im new to Mojolicious and I'm still learning perl. I have a project to do a
proptotype for a specialized webshop that will contain stockitem that are
individuals and needs to be stored with unique information and pictures for
each item. To start with it will be around 5.6 miƤllion unique items to
search through.

So i was thinking to use something like this, for the queries in the
models, from the help;

$db->select(some_table => ['foo'] => {bar => 'yada'} => sub {
  my ($db, $err, $results) = @_;
  ...});Mojo::IOLoop->start unless Mojo::IOLoop->is_running;


So i wonder a bit what is the best design pattern to get the massaged
content of the $results to my controller ?

Thank you in advance !

Best Regards
Jan

-- 
Titles mean nothing.  The one with a servant's heart is the leader.

Please consider the environment before you print this email.

(1) The contents of this transmission are privileged and confidential and
intended solely for the use of the addressee. Any disclosure, distribution
or copying of the contents, other than by the addressee, is strictly
prohibited. If you receive this transmission in error, please notify us
immediately and destroy the material received.
(2) All incoming and outgoing emails and any attachments are subjected to a
virus scanner and are believed to be free of any virus, or any other defect
which might affect any computer or IT system into which they are received
and opened. Therefore, it is the responsibility of the recipient to ensure
that they are virus free and no responsibility is accepted by Jan Eskilsson
 for any loss or damage arising in any way from receipt or use thereof.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.