<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi everybody,<br>
    <br>
    I am trying to understand how the EPrints' DSpace.pm import plugin
    exactly works and from what I've read from the API and the plugin's
    code, I got confused as to how
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    epdata_to_dataobj() function should be called. To be honest, the
    same question holds for the import-plugin-example as well
(<a class="moz-txt-link-freetext" href="http://wiki.eprints.org/w/Contribute:_Plugins/ImportPluginsCSV#input_fh">http://wiki.eprints.org/w/Contribute:_Plugins/ImportPluginsCSV#input_fh</a>).<br>
    <br>
    Running:<br>
    <br>
    $ perldoc ~eprints/perl_lib/EPrints/Plugin/Import.pm<br>
    <br>
    mentions about epdata_to_dataobj that:<br>
    <br>
    "<br>
    $dataobj = $plugin-&gt;epdata_to_dataobj( $epdata, %opts )<br>
            Turn $epdata into a EPrints::DataObj using the dataset
    argument passed<br>
            in %opts.<br>
    <br>
            Uses the "handler" object to perform the actual object
    creation.<br>
    <br>
            When sub-classing you must call "epdata_to_dataobj" in order
    to<br>
            correctly handle the parse-only and test phases during
    import.<br>
    "<br>
    <br>
    And this is indeed how the function is coded in
    ~eprints/perl_lib/EPrints/Plugin/Import.pm. On the other hand, the
    online example as well as the DSpace plugin call the same function
    like this:<br>
    <br>
    my $dataobj = $self-&gt;epdata_to_dataobj( $opts{dataset}, $epdata
    );<br>
    <br>
    Which, to my understanding, should be the other way around as far as
    the parameter order is concerned, meaning:<br>
    <br>
    my $dataobj = $self-&gt;epdata_to_dataobj($epdata, $opts{dataset});<br>
    <br>
    The truth is that my perl is very rusty, but from a first glance I
    think that the call to epdata_to_dataobj() function is in both codes
    (plugin example and DSpace plugin) wrong.<br>
    <br>
    Is it so, or am I losing something very fundamental here?<br>
    <br>
    Thanks for your time,<br>
    <br>
    George.<br>
    <pre class="moz-signature" cols="72">-- 
George Mamalakis

IT and Security Officer, 
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)

School of Electrical and Computer Engineering
Aristotle University of Thessaloniki

phone number : +30 (2310) 994379


</pre>
  </body>
</html>