Hello moritz, and thanks for your reply.

Why do you want to hide the object orientation from the runner scripts? If that's the most natural interface to your application, why mask it?

Well.... I did mention I was falling down a rabbit hole :) I've been seduced by scripting tools, particularly Marathon which provides extensions for Jython. I saw that, wondered a) how hard it would be and b) how it might "feel" to use it if I could do it, and decided to try. I'm not at all married to hiding the object orientation, I just thought that it might be easier for my fellow testers to write click_folder($folder_id) than $driver->click_folder($folder_id), particularly since they don't (currently) write Perl. In fact, before I go too much further, I'll probably show them sample scripts, one hiding the object orientation and another showing it, and ask them which they'd prefer to work with.

# instead of #sub value #{ # my ( $self ) = ScriptRunner->new(); # return $self->{'driver'}->value; #} sub make_wrapper { my $name = shift; return sub { ScriptRunner->new()->{'driver}->$name(@_); } } *value = make_wrapper('value'); *reset_counter = make_wrapper('reset_counter);

Thanks! I figured there had to be a better way to do what I was trying to, but couldn't come up with it. I'll also read about autoloading.

Regards,

Bald Man Tom


In reply to Re^2: On the merits of implementing a script running application by BaldManTom
in thread On the merits of implementing a script running application by BaldManTom

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.