Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Thanks for both of these responses! Both of them mention concerns that I've already thought about. None of them seem to be a problem.. Yet! 8) We'll see once I actually have the code soldered.

My initial code sample is actually incorrect. It would've been more appropriatly written:

#!/app/perl5.005/bin/perl package First; sub new { bless {}, 'First' }; sub test { my $self=shift; bless $self, 'Second'; $self->test; } 1; package Second; sub test { my $self=shift; print "Hello World!\n"; } 1; package main; my $t=new First(); print $t,"\n"; # Output: First=HASH(0x2864) $t->test or die $t->error; print $t,"\n"; # Output: Second=HASH(0xc2864)

I'm shielding the caller from having to try the different approaches manually. (Notice the fail over moved into First::test from main::. Also added a test on the return of the main:: call to test.) The fail-over "rules" will be determined by the failure type. an ORA-00001 (Unique constraint violation) may execute a new class that scrubs the data, then re-tries the First class again. (Ok.. I'd probably just make that a conditional and "truncate" the table ;) or throw the row to an exceptions table)

If the table to be loaded fails over to another approach, it will be logged and the configuration file can be updated to reflect which load process worked best. Bypassing First altogether when you know it's gonna fail.

Again, thanks for the responses.. The two links mentioned are really cool! (Both of them sound fairly close to my situation) Now it's off to code!

SMF 8)

In reply to Re: Replacing namespaces by smferris
in thread Replacing namespaces by smferris

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (5)
    As of 2021-05-11 00:59 GMT
    Find Nodes?
      Voting Booth?
      Perl 7 will be out ...

      Results (111 votes). Check out past polls.