package My::Handler; use strict; use warnings 'all'; use Apache2::RequestRec; sub handler : method { my ($class, $r) = @_; $r->status( 401 ); return 401; } 1;# return true: