Doorman::Scope
Doorman::Scope objects are responsible to generate URLs and PATHs that are handled by Doorman middlewares.
Attributes can be given in the constructor new as a hash:
new
my $scope = Doorman::Scope->new( name => "members", root_url => "http://example.com" );
Or set afterwards by using their accessor methods:
my $scope = Doorman::Scope->new; $scope->name("members"); $scope->root_url("http://example.com");
Default "users". The scope name used to generate PATHs. The "users" scope name generates PATHs prefixed "/users". Specifically they are:
"users"
/users /users/sign_in /users/sign_out
Depending on different app requirements, you might sometimes need to avoid the use of "/users" PATH. You can change the scope to , say, "members" to generate these URLs:
"members"
/members /members/sign_in /members/sign_out
Default "http://localhost". This is the App root url. Many modern web apps take just a domain without path part, like http://hiveminder.com or http://gmail.com. Usually you do not need to tweak this value, the middleware can guess it from the request environment. However, if your app lives unders some given PATH, you may set this to something like "http://mydomain.com/myapp".
http://hiveminder.com
http://gmail.com
"http://mydomain.com/myapp
Returns a string of the sign-in path.
Returns a string of the sign-out path.
Returns a string of the full URL to sign in.
Returns a string of the full URL to sign out.
To install Doorman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Doorman
CPAN shell
perl -MCPAN -e shell install Doorman
For more information on module installation, please visit the detailed CPAN module installation guide.