Discussion:
[Mojolicious] Mojolicious-8.04
Jan Eskilsson
2018-10-28 19:44:49 UTC
Permalink
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Dan Book
2018-10-28 20:35:28 UTC
Permalink
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
Post by 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
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
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.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Jan Eskilsson
2018-10-29 08:30:47 UTC
Permalink
Hi Dan

Thank you very much, that was the problem !


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