#!/usr/bin/env perl use strict; use Carp; use Pod::Usage; =head1 NAME =head1 DESCRIPTION This program is only useful for InSilicoSpectro used in the Phenyx environment. Returns a given file corresponding to a given user (for example, the file with the user modifications). =head1 SYNOPSIS http://www.phenyx-ms.com/tools/cgi/getUserFile.pl?user=jo&file=modres.xml =head1 ARGUMENTS =over 4 =item user=name =item file=filename =back =head1 OPTIONS =over 4 =item zip=1 Make a zip archive with the file. =item opt=1 Does not CORE::die if a requested file does not exist =item help=1 =back =head1 COPYRIGHT Copyright (C) 2004-2005 Geneva Bioinformatics www.genebio.com This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =head1 AUTHORS Alexandre Masselot, www.genebio.com =cut BEGIN{ eval{ require DefEnv; DefEnv::read(); }; if($@){ } } END{ } $|=1; # flush immediately; my $isCGI; use CGI qw(:standard); if($isCGI){ use CGI::Carp qw(fatalsToBrowser warningsToBrowser); warningsToBrowser(1); } use InSilicoSpectro; use InSilicoSpectro::InSilico::CleavEnzyme; use InSilicoSpectro::InSilico::ModRes; BEGIN{ $isCGI=$ENV{GATEWAY_INTERFACE}=~/CGI/; sub carp_error{ my $msg=shift; if ($isCGI){ my $q=new CGI; error($q, $msg); }else{ print STDERR $msg; } } CGI::Carp::set_message(\&carp_error);# if $isCGI; sub error(){ my($q, $msg)=@_; # $q->header; print $q->start_html(-title=>"$0", -author=>'alexandre.masselot@genebio.com', -BGCOLOR=>'white'); print "