<p>Even if you can make it work, there is no guaranty it will work acros versions of RT. Do you use RT API for reporting?<br></p>
<p>Ruslan from phone.</p>
<div class="gmail_quote">14.07.2012 15:22 пользователь "Richard McMahon" <<a href="mailto:rgm@ast.cam.ac.uk">rgm@ast.cam.ac.uk</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I have a a few different RT instances and I am running reports<br>
remotely, see exampe code below.<br>
<br>
At the moment I have all the passwords in each report script but I would like to move the DB info and passwords to configuration files and specify the config files as command line options using Getopt::Long.<br>
<br>
I am considering using the perl module Config::Tiny to read<br>
the configuration information. Are there any other suggestions?<br>
<br>
e.g. should/can I uses RT's own configuration handler. If yes,<br>
where is a good place to start? Thiscwould also mean less<br>
extra Per modules needed. I will share the reporing scripts<br>
when I have finished.<br>
<br>
e.g this is what I do now:<br>
<br>
RT::LoadConfig();<br>
<br>
# set/change some Config values<br>
if host=host1) {<br>
RT->Config->Set( DatabaseType => 'mysql' );<br>
RT->Config->Set( DatabaseHost => '<a href="http://host1.ast.cam.ac.uk" target="_blank">host1.ast.cam.ac.uk</a>' );<br>
RT->Config->Set( DatabaseName => 'rt3' );<br>
RT->Config->Set( DatabaseUser => 'rgm');<br>
RT->Config->Set( DatabasePassword => 'NotaPassword');<br>
RT->Config->Set( LogDir => '/home/rgm/soft/rt/host1/log/' );<br>
}<br>
<br>
if (host=host2) { }<br>
<br>
RT::Init();<br>
<br>
r.<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>-------<br>
Dr. Richard G. McMahon | Phone (office) 44-(0)-1223-337519<br>
University of Cambridge | (switchboard) 1223-337548<br>
Institute of Astronomy | (secretary) 1223-337516<br>
Madingley Rd | FAX 1223-337523<br>
Cambridge, CB3 OHA, UK. | mobile 7885-409019<br>
Office: Hoyle 18 | home 1223-359770<br>
------------------------------<u></u>------------------------------<u></u>-------<br>
email: <a href="mailto:rgm@ast.cam.ac.uk" target="_blank">rgm@ast.cam.ac.uk</a> | WWW: <a href="http://www.ast.cam.ac.uk/~rgm" target="_blank">http://www.ast.cam.ac.uk/~rgm</a><br>
<a href="mailto:richardgmcmahon@gmail.com" target="_blank">richardgmcmahon@gmail.com</a> | skype: richardgmcmahon<br>
------------------------------<u></u>------------------------------<u></u>-------<br>
</blockquote></div>