Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 86725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:17:28+00:00 2026-05-10T22:17:28+00:00

We use Perl for GUI test automation. It has been very successful. We have

  • 0

We use Perl for GUI test automation. It has been very successful. We have written a very lightweight DSL kind of language for GUI testing. The DSL is very similar to a object model.

For example, we have an Application object at the root. Each property sheet in the application is a View object. Each page under the page is called Page object itself. From Perl we send commands to a GUI application and the GUI interpret the command and respond to the command nicely. To send a command we do the following:

socket_object->send_command('App.View2.Page2.Activate()') socket_object->send_command('App.View1.Page3.OKBtn.Click()') 

This is not very readable. Instead, I want to write a Perl DSL for App, View and Page. Does Perl provide some sort of DSL structure where I can do the following?

App.View2.Page2.Activate(); App.View1.Page2.Click(); 

Where App shall be an instance of the Application class. I have to get the object of View2 at run time.

How to use such a things?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:17:29+00:00Added an answer on May 10, 2026 at 10:17 pm

    You can do almost anything in Perl. But you have to do some strange stuff to get Perl to perform with syntax that is just not Perl.

    • To handle exactly what you have there, you would have to a lot of advanced tricks, which are by definition not that maintainable. You would have to:

      • overload the concatenation operator ‘.’ (requires a blessed reference)
      • turn strictures off or create an AUTOLOAD subs to allow for those bare words – of course, you could write subs for all of the words you wanted to use (or use the barewords module).
      • possibly, create multiple packages, with multiple AUTOLOADs
    • Another way is source filters, I can probably pick up a downvote just for mentioning this capability. So I wouldn’t exactly recommend this approach for people who are asking for help. But it’s out there. Source filters (and I’ve done my share) are just one of those areas where you can think you’re too clever for your own good.

      Still, if you are interested in Perl as a DSL ‘host’ language, then source filters aren’t exactly off limits. However, limiting this to just what you show that you want to do, Perl6::Attributes will probably do most of what you would need right off the shelf. It would take the . and translate them into the ‘->’ that Perl would understand. But you can still take a look at source filters to understand what’s going on behind the scenes.

      I also don’t want to leave this topic without suggesting that a lot of the frustration you could have generating your own source filter (which I advise NOT to do) is eased by using Damian Conway’s Filter::Simple.

    • The simplest thing is to forgo the ‘.’ operator and just instead expect Perl-looking code.

      App->View2->Page2->Activate();  App->View1->Page2->Click(); 

      App would be either a package or a sub. Either defined in the current package or imported which returns an object blessed into a package with a View2 sub (possibly an AUTOLOAD sub) which returns either the name of a package or a reference blessed into a package, that understands Page2, and then finally the return from that would understand Activate or Click. (See the OO tutorial, if you need.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I would make a very simple VBScript file and call… May 11, 2026 at 3:01 pm
  • added an answer You can do this easily with paramiko, checkout SFTP with… May 11, 2026 at 3:01 pm
  • added an answer If you're using Java you can try http://neo4j.org/ May 11, 2026 at 3:01 pm

Related Questions

I am going to spend 30 minutes teaching Perl to an experienced programmer. The
I'm working on improving our group's development process, and I'm considering how best to
I'm a LAMP web developer in Perl and at my current place we use
I've often seen people use Perl data structures in lieu of configuration files; i.e.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.