package Blah::Blah::BlackSheep; use strict; use warnings; # etc, etc...etc... my $loggedin = cookie_get("loggedin"); # does exactly what you think it does... my $page = get_param(get_constant($db, "QUERY_PAGE")); # the page the user wants to visit # cookie_get, get_param, get_constant are all subs I created to ease my coding a little, despite it being a tad...convoluted. it works. that's what matters if (not allowed($page, $loggedin)) { print cookie_set("error", "Access Denied!"); print "location: /\n\n"; exit 1; } sub something { return "blah"; } sub something2 { return "bleet"; } # etc, etc, etc... 1;