Perl does not have public or private access to / subs methods. Therefore, I need to mark some subsystems as safe web calls as simple logic, therefore, in a simple check, if this sub / function is marked as public, then a direct web browser call to this action with the same name as the function is processed otherwise case refused.
Example:
sub Register : public {
...... This should be web browser call allowed
}
sub check_login {
... this by default should be private and not allowed to browser.
}
I read a few about various modules like attributes () and moose or moo.
What is the best way to achieve this. All I need to do is to check if some subscribers are marked as public or not, will be closed by default.
source
share