Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102132302
example
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 17, 10:14
Size
1 KB
Mime Type
text/x-perl
Expires
Wed, Feb 19, 10:14 (2 d)
Engine
blob
Format
Raw Data
Handle
24289543
Attached To
R6835 Tequila Perl client
example
View Options
#!/usr/bin/perl
#
##############################################################################
#
# File Name: testtequila
# Description:
# Author: Claude Lecommandeur (Claude.Lecommandeur@epfl.ch)
# Date Created: Tue Jul 9 14:20:42 CEST 2002
# Revision:
#
##############################################################################
#
#
use
strict
;
use
Tequila::
Client
;
my
$tequila
=
new
Tequila::
Client
();
$tequila
->
setservice
(
"Tequila Perl Client test"
);
#$tequila->require ("org=EPFL");
$tequila
->
request
(
"name"
,
"firstname"
,
"email"
,
"title"
,
"phone"
);
$tequila
->
authenticate
();
my
$org
=
$tequila
->
{
org
};
my
$user
=
$tequila
->
{
user
};
my
$host
=
$tequila
->
{
host
};
my
$key
=
$tequila
->
{
key
};
head
();
print
qq{
<h3>Test Tequila :</h3>
<pre>
key = $key
org = $org
user = $user
host = $host
}
;
if
(
$tequila
->
{
attrs
})
{
my
%attrs
=
%
{
$tequila
->
{
attrs
}};
foreach
my
$attr
(
sort
keys
%attrs
)
{
printf
(
qq{%16s = %s\n}
,
$attr
,
$attrs
{
$attr
});
}
}
print
qq{
</pre>
<p>
<a href="$ENV{SCRIPT_NAME}">Test session key</a>
}
;
tail
();
sub
head
{
print
qq{Content-Type: text/html;charset=utf8
<html>
<head>
<title>Test Tequila</title>
</head>
<body>
}
;
}
sub
tail
{
print
qq{
</body>
</html>
}
;
exit
;
}
#BEGIN {
# use lib $ENV{PERL5LIB};
#}
Event Timeline
Log In to Comment