Re: functionality of checkref in perl

Markus Hoenicka <[email protected]>
Newsgroups gmane.text.refdb.general
Message-ID <[email protected]>
Hi Mathias,

Quoting Mathias Krüger <[email protected]>:

> So I really don't unterstand, how to use the checkref-function in the
> Perl-Module, in last parameter I am able to submit $output-parameter,
> but how I get the output? the only out I get is:
>
> 999:1 checked:0 skipped:0 failed
>
[...]
>
> print $client->refdb_checkref($data, "ris", "utf-8", "scrn");
>
>
After that, just run:

print $client->get_data();


The Perl Client module functions always return the command summary  
(i.e. the brief message which the C clients send to stderr, which is  
the one you saw in your tests). The most recently returned data, if  
any, are always accessible via the get_data() member function. The  
reason for this somewhat obscure design is that some commands do not  
return data, but only a summary. For the sake of consistency, these  
functions would have to return undef if we'd use the data proper as a  
return value throughout.

BTW the test script test.pl runs each function at least once. It is a  
good resource for finding out how these functions work.

regards,
Markus
-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.