Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks

Embed perl or Gtk2-perl?

by xiaoyafeng (Friar)
 | Log in | Create a new user | The Monastery Gates | Super Search | 
 | Seekers of Perl Wisdom | Meditations | PerlMonks Discussion | 
 | Obfuscation | Reviews | Cool Uses For Perl | Perl News | Q&A | Tutorials | 
 | Poetry | Recent Threads | Newest Nodes | Donate | What's New | 

on Nov 06, 2009 at 10:13 UTC ( #805439=perlquestion: print w/ replies, xml ) Need Help??
xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I have had a perl snippet to manipulate data from database. Now I intend to make a tree view interface as the front end of it for end users so that they can sort, remove, and add the data easily.

The problem make me headache is:
  • this gui interface will be running on windows.
  • gtk2-perl can't be installed by cpan or ppm on M$ easily.
  • I have to embed perl into C if I write gui interface in Gtk+. But I'm afraid that it will take too much time for me since I don't have any try on embedding before.

So which way should I choose for the sake of saving time:

  • rewrite code in c totally
  • install gtk+-perl a thousand times ;)
  • embed perl into c
TIA



I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Comment on Embed perl or Gtk2-perl?
Re: Embed perl or Gtk2-perl?
by Anonymous Monk on Nov 06, 2009 at 10:16 UTC
[reply]
Re: Embed perl or Gtk2-perl?
by zentara (Chancellor) on Nov 06, 2009 at 13:14 UTC
[reply]
[reply]
Re: Embed perl or Gtk2-perl?
by Kirsle (Sexton) on Nov 06, 2009 at 18:53 UTC

    If Gtk2-Perl is too difficult to install, you could just install it once on your system and compile your Perl script into an EXE to distribute it to others... then the users don't need Gtk2-Perl, or even Perl itself, to be able to run your program.

    If this is for Win32-only you could also consider Win32::GUI as the UI toolkit which would provide a more native look-and-feel to your app... or you can use Tk, which looks almost native on Win32 (there's only very small quirks about it that make it stand out from regular Win32 apps, such as the active button doesn't get a dotted-line border around it, and disabled text isn't sunken in but just solid grey, but for the most part it fits in on Windows). Perl/Tk is very easy to install on Windows, as is Win32::GUI.

    For compiling your Perl app into an EXE, look into pp (PAR::Packer) for a free/open source solution, PerlApp from ActiveState for a commercial version (it's the best compiler I've ever used)... and then there's also perl2exe, also commercial, but I've had trouble getting it to work on some of my perl scripts.

[reply]
Re: Embed perl or Gtk2-perl?
by amir_e_a (Scribe) on Nov 06, 2009 at 19:16 UTC

    I am not a gtk expert and i am not a native English speaker, but i have a few English corrections for you:

    > The problem make me headache is:

    Better: "Here is the problem that gives me headache:"

    > gtk2-perl can't be installed by cpan or ppm on M$ easily.

    Better: "from CPAN" or "using the CPAN shell".

    > I don't have any try on embedding before.

    Better: "I didn't try embedding before" or "I don't have any experience with embedding before."

    Hope it helps.

[reply]
      > The problem make me headache is:

      • The problem that made my headache is:
      • The problem that makes my head ache is:
      • My PITA is:

      > I don't have any try on embedding before.

      • I never tried embedding before.
      • This is my first try at embedding.
      • First try embedding.
[reply]

Back to Seekers of Perl Wisdom


Login:
Password
remember me
What's my password?
Create A New User

Node Status
node history
Node Type: perlquestion [id://805439]
Approved by dsheroh
Front-paged by Arunbear
help
Community Ads
Chatterbox
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users
Others having an uproarious good time at the Monastery: (11)
Corion
GrandFather
atcroft
Gavin
herveus
Eyck
biohisham
djp
goeb
gnosti
darkman0101
As of 2009-11-21 10:07 GMT
Sections
The Monastery Gates
Seekers of Perl Wisdom
Meditations
PerlMonks Discussion
Categorized Q&A
Tutorials
Obfuscated Code
Perl Poetry
Cool Uses for Perl
Perl News
Information
PerlMonks FAQ
Guide to the Monastery
What's New at PerlMonks
Voting/Experience System
Tutorials
Reviews
Library
Perl FAQs
Other Info Sources
Find Nodes
Nodes You Wrote
Super Search
List Nodes By Users
Newest Nodes
Recently Active Threads
Selected Best Nodes
Best Nodes
Worst Nodes
Saints in our Book
Leftovers
The St. Larry Wall Shrine
Offering Plate
Awards
Craft
Snippets Section
Code Catacombs
Quests
Editor Requests
Buy PerlMonks Gear
PerlMonks Merchandise
Planet Perl
Perlsphere
Use Perl
Perl.com
Perl 5 Wiki
Perl Jobs
Perl Mongers
Perl Directory
Perl documentation
CPAN
Random Node
Voting Booth

Future historians will find that the material characteristic of the current era is...

Aluminium
Plastic
Oil
Water
Carbon dioxide
Copper
Iron
Silicon
Salt
Uranium
Hydrogen
Other

Results (729 votes), past polls