Skip to main content.
home | support | download

Back to List Archive

test_url query string and path

From: Jes Constantine <JConstantine(at)not-real.humaniststudies.org>
Date: Wed Jun 07 2006 - 20:42:02 GMT
Hi,

my current test_url subroutine is:

test_url => sub { $_[0]->path !~ 
/(cms|staff|techstaff|groupnotes|search|webstat|usage|print=yes)$/ }

after reading http://swish-e.org/archive/2004-12/8647.html and 
http://swish-e.com/archive/2005-08/9883.html
I learned that my pages made for print (with print=yes in a query 
string) weren't being ignored because I was looking for print=yes in the 
path and not the query.

So will putting $_[0]->query =~ /print=yes/ in my test_url subroutine  
return  0 for something like: 
http://humaniststudies.org/enews/index.php?id=142&showAll=true&print=yes

If so, can someone help me with the syntax for adding to the subroutine? 
(I'm a swish-e & perl beginner)

If not, can someone help me figure out how to accomplish this?

Thanks!

-- 
Jessica Constantine
Systems Analyst
----------------------------------
(tel): 518.432.7820 x202
(fax): 518.432.7821
----------------------------------
The Institute for Humanist Studies
48 Howard Street
Albany, New York 12207

http://www.humaniststudies.org 
Received on Wed Jun 7 13:42:09 2006