Interesting question. I guess you cannot directly use the object as a bind variable since there's no corresponding value in ora_types:
:ora_types ORA_VARCHAR2 ORA_STRING ORA_NUMBER ORA_LONG ORA_ROWID ORA_DATE ORA_RAW ORA_LONGRAW ORA_CHAR ORA_CHARZ ORA_MLSLABEL ORA_NTY ORA_CLOB ORA_BLOB ORA_RSET
But you could possibly turn the arguments into an XML document and pass that as a CLOB. See this sample from the DBD::Oracle man page:
# Build a large XML document, bind it as a CLOB, # extract elements through PL/SQL and return as a CLOB # $dbh is a connected database handle # output will be large local $dbh->{LongReadLen} = 1_000_000; my $in_clob = "<document>\n"; $in_clob .= " <value>$_</value>\n" for 1 .. 10_000; $in_clob .= "</document>\n"; my $out_clob; my $sth = $dbh->prepare(<<PLSQL_END); -- extract 'value' nodes DECLARE x XMLTYPE := XMLTYPE(:in); BEGIN :out := x.extract('/document/value').getClobVal(); END; PLSQL_END # :in param will be converted to a temp lob # :out parameter will be returned as a string. $sth->bind_param( ':in', $in_clob, { ora_type => ORA_CLOB } ); $sth->bind_param_inout( ':out', \$out_clob, 0, { ora_type => ORA_CLOB +} ); $sth->execute;
--
print map{chr}unpack(q{A3}x24,q{074117115116032097110111116104101114032080101114108032104097099107101114})

In reply to Re: Objects in PL/SQL in DBD::Oracle by andreas1234567
in thread Objects in PL/SQL in DBD::Oracle by archfool

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.