foreach my $p (@page_locs) {
foreach my $registering_page (keys %pagestate) {
if (exists $pagestate{$registering_page}{edittemplate}) {
foreach my $pagespec (sort keys %{$pagestate{$registering_page}{edittemplate}}) {
if (pagespec_match($p, $pagespec, location => $registering_page)) {
foreach my $p (@page_locs) {
foreach my $registering_page (keys %pagestate) {
if (exists $pagestate{$registering_page}{edittemplate}) {
foreach my $pagespec (sort keys %{$pagestate{$registering_page}{edittemplate}}) {
if (pagespec_match($p, $pagespec, location => $registering_page)) {