At 5:55 pm +0200 07/04/02, Thomas De Groote wrote: >Please don't kill me for this question, but as I have been using MacPerl >for a couple of years now just to develop CGIs that eventually run on a >linux box, I started to wonder what you guys really use MacPerl for.
Kill? Heaven forefend. It's a very good question indeed, particularly at this time in MacPerl's history. >I mean, MacPerl is more than Perl, otherwise this list wouldn't exist. What >kind of apps do you make with it? The aspect of MacPerl that has always grabbed my interest is MacPerl as a programming language with which to write applications of one kind or another. With access to the MacOS Toolbox one has most of what is needed to write programs which look, feel and behave pretty much as any regular Mac application. The advantages are considerable. MacPerl is free. Applications written with it are open source and rather easy to maintain. Most people would agree I think that Perl is much easier to use than say C or, C++. And of course the programmer has at his disposal all the immense power of Perl as the driving engine of his application. With the MacPerl port of the Toolbox you have all you need to manage the MenuBar, create windows of considerable complexity, with buttons, text, checkboxes, radiobuttons, popup menus, scroll-bars and all such things. It is not only possible but not that difficult either. Under the hood so to speak, is Perl with its ability to access DBM packages for instance. I have used to write some quite extensive business oriented programs for invoicing and stock control which have proved surprisingly fast and stable. Another attribute of Perl (sure you can do all of these things in 'C' too) is its ability to write PostScript. (See for instance 'pod2ps' and pod2pdf'). So, for instance, an invoicing program can provide a really comfortable GUI for input, look up, process and calculate data, and finally write the graphical package of Invoice/Advice Note/Packing Note and so forth in PostScript and send it off to the printer. I don't know of any other language apart from 'C' which could even begin to do all these things. This brings me back to the point of where we are in MacPerl's history. Is all this to be wasted because MacOS has moved on to Unix while MacPerl remains stuck in the doldrums of the so-called 'classical' pre-carbon era? I just don't know the answer to that. Is there going to be a future? Unfortunately at this time MPW has also effectively been abandoned, in the sense that the decision has been taken to discontinue official support. Apple cannot (apparently) release the sources for MPW and the compilers and linkers so there no possibility of unofficial support either. So that's effectively dead. So those of us who cannot afford to go out and buy, (and maintain year by year) CW are, it seems to me, going to be left behind in MacOS 9 with MacPerl and (unsupported) MPW. Judging by the level of traffic on the once-busy Toolbox list, a lot of folk seem already to have drifted away into the night. One wonders where they have drifted to. PCs maybe. >Also, is there somewhere a quick and dirty tutorial available that shows >you how to make a window and some objects for it? I hope it's not blowing my own trumpet but I put up on my small site below a few days ago an application called 'DialogBuilder' which is intended just for this purpose, that is, to make windows and put objects of various kinds in those windows. To some extent it can also serve as a tutorial package. For instance you can 'build' just a window and look at that script. Then you can add a button, say, and look to see what that code looks like. There are in the package quite a few examples of this kind. Little or no knowledge of the Toolbox is needed for 'DialogBuilder'. >This way I could also start making *real* MacPerl apps. Sure you could, and without too much difficulty either. And I think you would be very happy with the results. I hope this message might be encouraging (in parts at any rate) and that 'DialogBuilder' might be some help. (It is, of course, itself also an example of an application written in MacPerl -- but biggish so rather a mouthful for starters perhaps.) Alan Fry <http://www.afco.demon.co.uk>