Will "req->uploads(), detour()" work in future releases?

25 views
Skip to first unread message

Ivan Babiychuk

unread,
Jun 13, 2017, 2:23:16 PM6/13/17
to Mojolicious
Hello.

Problem:
My colleagues say me not to use these functions:
$self->req->uploads('file');
$r
->detour();

Question:
Will these two functions work in future releases? Will any of these functions be excluded?
I will be grateful for the concise answer (yes / no).

Thank you.

Dan Book

unread,
Jun 13, 2017, 2:25:44 PM6/13/17
to mojol...@googlegroups.com
They are not deprecated at this time, but we can't see the future.

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

Dan Book

unread,
Jun 13, 2017, 2:26:47 PM6/13/17
to mojol...@googlegroups.com
However, the ->uploads method does not take an argument, and the ->detour method does.

Ivan Babiychuk

unread,
Jun 14, 2017, 6:41:46 AM6/14/17
to Mojolicious
Hello.

The last two clarifying questions.
Example:
my $file = $self->req->upload('file');
print $file->slurp;
Is this a stable solution? 
What do you advise to use in this case?
Here is my colleague's thesis:
I believe you that it works, but Mojolicious is still breaks it's interface from time to time and we already have had an accident dedicated for.
If this method(upload) isn't listed in official documentation, it's a sign that it could be deprecated.  
Thank you.

вторник, 13 июня 2017 г., 21:23:16 UTC+3 пользователь Ivan Babiychuk написал:

sri

unread,
Jun 14, 2017, 6:53:46 AM6/14/17
to Mojolicious
The last two clarifying questions.
Example:
my $file = $self->req->upload('file');
print $file->slurp;
Is this a stable solution? 
What do you advise to use in this case?
Here is my colleague's thesis:
I believe you that it works, but Mojolicious is still breaks it's interface from time to time and we already have had an accident dedicated for.
If this method(upload) isn't listed in official documentation, it's a sign that it could be deprecated. 

Your colleague is wrong on this i'm afraid, if something is not documented we do not support it at all. There
would be no deprecation period, it would just disappear without warning. But of course the "upload" method
is documented and therefore a stable solution.


There is also documentation about how to deal with uploads right in the tutorial.


And regarding deprecations, everything can be deprecated. It is highly unlikely, but can happen.

--
sebastian

sri

unread,
Jun 14, 2017, 6:57:06 AM6/14/17
to Mojolicious
And regarding deprecations, everything can be deprecated. It is highly unlikely, but can happen.

Actually, this is not entirely correct, there is one exception. Should a Mojolicious book get written
then the API would get frozen for two years.


But that has not happened yet.

--
sebastian
Reply all
Reply to author
Forward
0 new messages