Re: [Mojolicious] Re: Nginx reverse proxy to Hypnotoad

2018-11-05 Thread Jan Eskilsson
Hi Jason



Thank you very much, I tested your script using your upload page and it
worked  !!!

So I tested my upload script, which uses LWP::UserAgent and
HTTP::Request::Common, against your api and I got the same problem with
corrupt files as I had using my api. This pointed me in the correct
direction, i messed around a bit in the upload script and i found
that $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1; changed
to $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 0; solved the problem. I
don't 100% understand why but it wont be a problem since the jpg files are
all small.

Thank you again for pointing me in the correct direction and for giving me
a bit of an eyeopener for Mojolicious::Lite.


Best Regards
Jan



Den mån 5 nov. 2018 kl 15:09 skrev Jason Cooper :

> Hi Jan,
>   I just put together the following simple Mojolicious script to try and
> recreate your issue, but it seems to work fine with JPEGs when I try it
> behind an NGINX proxy terminiating SSL.
>
>
> #!/usr/bin/env perl
>
> use Mojolicious::Lite;
>
> # Upload form in DATA section
> get '/api/form' => 'form';
>
> # Multipart upload handler
> post '/api/upload' => sub {
> my $c = shift;
>
> # Check file size
> return $c->render(text => 'File is too big.', status => 200)
> if $c->req->is_limit_exceeded;
>
> # Process uploaded file
> return $c->redirect_to('form') unless my $example =
> $c->param('example');
> my $size = $example->size;
> my $name = $example->filename;
>
> $example->move_to("/tmp/$name");
>
> $c->render(text => "Thanks for uploading $size byte file $name.");
> };
>
> app->config(hypnotoad => {listen => ['http://*:3000']});
>
> app->start;
> __DATA__
>
> @@ form.html.ep
> 
> 
>   Upload
>   
> %= form_for apiupload => (enctype => 'multipart/form-data') => begin
>   %= file_field 'example'
>   %= submit_button 'Upload'
> % end
>   
> 
>
>
>   If you have a safe environment to test then it might be worth creating a
> simple script like the one above to test with (feel free to use the one
> above, just make sure that it doesn't overwrite anything you require in
> your `/tmp` directory).
>
>   Do you get any errors in your logs that might indicate what's going on?
>
> Regards,
>   Jason.
>
> On Monday, 5 November 2018 10:55:36 UTC, Jan Eskilsson wrote:
>>
>> Hi Jason
>>
>> Thank ypou for your response !
>>
>> Its with the uploading, I have permission to read the file as soon as its
>> uploaded and its created with the correct size but the file is corrupt i.e.
>> its not a .jpg. If i understand correctly this setting in the nginx.conf
>> proxy_pass http://matorit; should make sure that its only http that's
>> redirected to the server with hypnotoad running.
>>
>> If i change to http,  listen  80;  in the nginx.conf the files are
>> created correctly i.e. they are readable .jpg's
>>
>> Hypnotoad is running with proxy => 1.
>>
>>
>> Best Regards
>> Jan
>>
>>
>> Den mån 5 nov. 2018 kl 11:21 skrev Jason Cooper :
>>
>>> Hi Jan,
>>>   I'm having a bit of trouble understanding the problem you've
>>> described.  Is uploading of files that you've got a problem or downloading
>>> them?
>>>
>>>   If the problem is with uploading then does it create the file but you
>>> don't have permissions to read it; does it create the file but it's empty
>>> or does it not create the file at all?
>>>
>>>   If the problem is with downloading and it's happening on a webpage
>>> that was http but is now https, then it could be your browser not liking
>>> the some absolute URLs in your page - check your browser's console for
>>> mixed content errors.
>>>
>>> Regards,
>>>   Jason.
>>>
>>>
>>> On Sunday, 4 November 2018 17:55:37 UTC, Jan Eskilsson wrote:
>>>>
>>>> Hi All
>>>>
>>>> We have a strange problem that i wonder if someone else also have
>>>> encountered. We have started to do some tests on the live servers and found
>>>> that everything works perfect with one exception. We get a lot of .jpg
>>>> files and after we set up https they are not readable on disk anymore. If
>>>> we downgrade to http it all works again so i wonder if someone else has
>>>> seen and solved this problem ?
>>>>
>>>> I understand this is not really a Hypnotoad problem but probably some
>>>

Re: [Mojolicious] Re: Nginx reverse proxy to Hypnotoad

2018-11-05 Thread Jan Eskilsson
Hi Jason

Thank ypou for your response !

Its with the uploading, I have permission to read the file as soon as its
uploaded and its created with the correct size but the file is corrupt i.e.
its not a .jpg. If i understand correctly this setting in the nginx.conf
proxy_pass http://matorit; should make sure that its only http that's
redirected to the server with hypnotoad running.

If i change to http,  listen  80;  in the nginx.conf the files are created
correctly i.e. they are readable .jpg's

Hypnotoad is running with proxy => 1.


Best Regards
Jan


Den mån 5 nov. 2018 kl 11:21 skrev Jason Cooper :

> Hi Jan,
>   I'm having a bit of trouble understanding the problem you've described.
> Is uploading of files that you've got a problem or downloading them?
>
>   If the problem is with uploading then does it create the file but you
> don't have permissions to read it; does it create the file but it's empty
> or does it not create the file at all?
>
>   If the problem is with downloading and it's happening on a webpage that
> was http but is now https, then it could be your browser not liking the
> some absolute URLs in your page - check your browser's console for mixed
> content errors.
>
> Regards,
>   Jason.
>
>
> On Sunday, 4 November 2018 17:55:37 UTC, Jan Eskilsson wrote:
>>
>> Hi All
>>
>> We have a strange problem that i wonder if someone else also have
>> encountered. We have started to do some tests on the live servers and found
>> that everything works perfect with one exception. We get a lot of .jpg
>> files and after we set up https they are not readable on disk anymore. If
>> we downgrade to http it all works again so i wonder if someone else has
>> seen and solved this problem ?
>>
>> I understand this is not really a Hypnotoad problem but probably some
>> setting in Nginx, but I can't figure out what it might be that is wrong,
>> Nginx conf is below and I have messed with every setting soon i think
>> except the correct one obviously :-)
>>
>> Both servers are Centos 7
>>
>> server {
>> listen   443 ssl http2 ;
>> server_name  matorit.laga.se;
>> root /media/sf_root/matorit/html;
>> ssl on;
>> ssl_certificate "/etc/pki/nginx/laga_se.pem";
>> ssl_certificate_key "/etc/pki/nginx/private/laga_se.key";
>> ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
>> ssl_session_cache shared:SSL:1m;
>> ssl_session_timeout  10m;
>> ssl_ciphers HIGH:!aNULL:!MD5;
>> ssl_prefer_server_ciphers on;
>>
>> # Load configuration files for the default server block.
>> include /etc/nginx/default.d/*.conf;
>>
>> location /api {
>> proxy_connect_timeout   600;
>> proxy_send_timeout  600;
>> proxy_read_timeout  600;
>> send_timeout600;
>> proxy_buffering on;
>> proxy_buffer_size   128k;
>> proxy_buffers   4 256k;
>> proxy_busy_buffers_size   256k;
>> proxy_temp_file_write_size 1000m;
>> client_max_body_size 1000m;
>>
>> proxy_pass http://matorit;
>> proxy_http_version 1.1;
>> proxy_set_header Upgrade $http_upgrade;
>> proxy_set_header Connection "upgrade";
>> proxy_set_header Host $host;
>> proxy_set_header X-Real-IP $remote_addr;
>> proxy_set_header X-Forwarded-For
>> $proxy_add_x_forwarded_for;
>> proxy_set_header X-Forwarded-Proto $scheme;
>> proxy_set_header X-Nginx-Proxy true;
>> proxy_set_header X-Forwarded-Ssl off;
>>
>>
>> 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.
>>
>> 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 messa

[Mojolicious] Nginx reverse proxy to Hypnotoad

2018-11-04 Thread Jan Eskilsson
Hi All

We have a strange problem that i wonder if someone else also have
encountered. We have started to do some tests on the live servers and found
that everything works perfect with one exception. We get a lot of .jpg
files and after we set up https they are not readable on disk anymore. If
we downgrade to http it all works again so i wonder if someone else has
seen and solved this problem ?

I understand this is not really a Hypnotoad problem but probably some
setting in Nginx, but I can't figure out what it might be that is wrong,
Nginx conf is below and I have messed with every setting soon i think
except the correct one obviously :-)

Both servers are Centos 7

server {
listen   443 ssl http2 ;
server_name  matorit.laga.se;
root /media/sf_root/matorit/html;
ssl on;
ssl_certificate "/etc/pki/nginx/laga_se.pem";
ssl_certificate_key "/etc/pki/nginx/private/laga_se.key";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout  10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location /api {
proxy_connect_timeout   600;
proxy_send_timeout  600;
proxy_read_timeout  600;
send_timeout600;
proxy_buffering on;
proxy_buffer_size   128k;
proxy_buffers   4 256k;
proxy_busy_buffers_size   256k;
proxy_temp_file_write_size 1000m;
client_max_body_size 1000m;

proxy_pass http://matorit;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Nginx-Proxy true;
proxy_set_header X-Forwarded-Ssl off;


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.

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] Mojolicious-8.04

2018-10-29 Thread Jan Eskilsson
Hi Dan

Thank you very much, that was the problem !


Best Regards
Jan

Den sön 28 okt. 2018 kl 21:35 skrev Dan Book :

> This error comes from passing extra options to a 'has' attribute
> declaration. Previously it took two arguments and ignored the rest. Now it
> uses the rest as options and only the 'weak' option is allowed.
>
> -Dan
>
> On Sun, Oct 28, 2018 at 3:45 PM Jan Eskilsson 
> wrote:
>
>> Hi All
>>
>> Today we upgraded our test system from Mojolicious-8 to Mojolicious-8.04
>> and we got a bit of a problem.
>>
>> When we try to start Morbo we get this error
>> Odd number of elements in hash assignment at
>> /opt/ActivePerl-5.24/site/lib/Mojo/Base.pm line 27.
>> Can't load application from file
>> "/home/jan/Project/mateorit_microservice/script/mateorit_microservice":
>> Unsupported attribute option at
>> /home/jan/Project/mateorit_microservice/script/../lib/MateoritMicroservice.pm
>> line 6.
>> Compilation failed in require at
>> /home/jan/Project/mateorit_microservice/script/../lib/MateoritMicroservice.pm
>> line 6.
>>
>> ./lib/MateoritMicroservice.pm line 6.  looks like this,
>>  use MateoritMicroservice::Model::Messages;
>>
>> and in MateoritMicroservice::Model::Messages,
>>
>> package MateoritMicroservice::Model::Messages;
>> use Mojo::Base -base;
>>
>> and the error seems to originate from this line in Mojo::Base::attr
>>   Carp::croak 'Unsupported attribute option' if grep { $_ ne 'weak' }
>> keys %kv;
>>
>> What are we doing wrong here ? adding use Mojo::Base -base, -weak;  does
>> not seem to change anything.
>>
>> everything worked fine using Mojolicious-8 before the upgrade so i guess
>> we are missing something here.
>>
>>
>> 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.
>>
>> 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.
>>
> --
> 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.

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.


[Mojolicious] Mojolicious-8.04

2018-10-28 Thread Jan Eskilsson
Hi All

Today we upgraded our test system from Mojolicious-8 to Mojolicious-8.04
and we got a bit of a problem.

When we try to start Morbo we get this error
Odd number of elements in hash assignment at
/opt/ActivePerl-5.24/site/lib/Mojo/Base.pm line 27.
Can't load application from file
"/home/jan/Project/mateorit_microservice/script/mateorit_microservice":
Unsupported attribute option at
/home/jan/Project/mateorit_microservice/script/../lib/MateoritMicroservice.pm
line 6.
Compilation failed in require at
/home/jan/Project/mateorit_microservice/script/../lib/MateoritMicroservice.pm
line 6.

./lib/MateoritMicroservice.pm line 6.  looks like this,
 use MateoritMicroservice::Model::Messages;

and in MateoritMicroservice::Model::Messages,

package MateoritMicroservice::Model::Messages;
use Mojo::Base -base;

and the error seems to originate from this line in Mojo::Base::attr
  Carp::croak 'Unsupported attribute option' if grep { $_ ne 'weak' } keys
%kv;

What are we doing wrong here ? adding use Mojo::Base -base, -weak;  does
not seem to change anything.

everything worked fine using Mojolicious-8 before the upgrade so i guess we
are missing something here.


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.

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.


[Mojolicious] Last try

2018-04-12 Thread Jan Eskilsson
Hi All

The piece of code below always render "Test" indicating to me that the
$mytest variable is never touched in the anonymous sub in the then or the
catch. I cant understand what i do wrong ?

sub search {
my $self = shift;

my $mytest = 'Test';
$self->stockitems->search_p('*')->then(sub {
  my $results = shift;

  $mytest = 'Test Test Test';
})->catch (sub {
  my $err = shift;

  $mytest = 'ERROR';
})->wait;;

$self->render(template => 'stockitems/search',  mytest => $mytest);
}

Any feedback or ideas are much apreciated

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.

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] Re: Newbie question

2018-04-09 Thread Jan Eskilsson
Hi Tekki


search 1works but not search 2 so i guess I'm doing something wrong there.
The debug helper works though and the render tries to render the correct
template but it throws the error that $mytest needs to be declared.
sub search1 {
my $self = shift;

   $self->render(template =>,'stockitems/search',  mytest => 'my test');
}

sub search2 {
my $self = shift;

 $self->stockitems->search_p('*')->then(sub {
  my $results = shift;
  $self->debug('we have searched successfully');
  $self->render(template =>,'stockitems/search',  mytest => 'my test');
})->catch (sub {
  my $err = shift;

  $self->debug($err);
  $self->debug('we have some error');
  $self->render(template =>,'stockitems/search',  mytest => 'Errors');
})->wait;;

}


Thanks for any input to what I'm doing wrong.


Best Regards
Jan

2018-04-09 14:31 GMT+02:00 Tekki <te...@tekki.ch>:

> As long as you get an error message, nothing is broken. ;)
> Mojolicious tries to render the correct template, so the error must be
> somewhere on the way to it.
>
> Am Montag, 9. April 2018 12:40:13 UTC+2 schrieb Jan Eskilsson:
>>
>> I start to believe that my installation is somehow broken, I also have
>> other strange behaviour. I will reinstall to see if it helps
>>
>> --
> 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.

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] Re: Perl Version

2018-04-09 Thread Jan Eskilsson
Hi Sebastian


Thank you very much !

Best Regards
Jan

2018-04-09 13:21 GMT+02:00 sri <kra...@gmail.com>:

> http://mojolicious.org/perldoc/Mojolicious/Guides/
> FAQ#Which-versions-of-Perl-are-supported-by-Mojolicious
>
> --
> 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.

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.


[Mojolicious] Perl Version

2018-04-09 Thread Jan Eskilsson
Hi All


I will reinstall my perl environment from scratch and I wonder a bit which
is the recomended version of perl for latest version of Mojolicious, 5.24
or 5.26 ?


Best Rgerads
Jan

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

Please consider the environment before you print this email.

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] Re: Newbie question

2018-04-09 Thread Jan Eskilsson
Hi Tekki


Thank you for your response.

I start to believe that my installation is somehow broken, I also have
other strange behaviour. I will reinstall to see if it helps


Best Regards
Jan

2018-04-09 9:56 GMT+02:00 Tekki <te...@tekki.ch>:

> This $self->render you have edited is probably not the place where you
> actually render the template.
>
> Regards
> Tekki
>
> Am Sonntag, 8. April 2018 17:54:18 UTC+2 schrieb Jan Eskilsson:
>>
>> In my controller i do
>>   $self->render(mytest => 'my test');
>>
>> --
> 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.

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.


[Mojolicious] Newbie question

2018-04-08 Thread Jan Eskilsson
Hi All

I'm not using Mojolicious::Lite but the full version and i have some
trouble to understand what i do wrong.

In my controller i do
  $self->render(mytest => 'my test');

In my template i do
  <%= $mytest %>

And the response i get
   Global symbol "$mytest" requires explicit package name (did you forget
to declare "my $mytest"?) at template stockitems/search.html.ep line 5.

for what i can see there is no real diffrence between this and the welcome
process :-(

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.

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 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 <kra...@gmail.com>:

> (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.


[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.