Re: use case for activeState
Pipirilo wrote: I've been working with MS .NET for desktop and web applications for quite a while, and it doesn't fit my expectations. I've used ORACLE long time ago, and that is a very good tool, I miss it. I would think Visual Studio is a reasonable platform for Windows Forms development. What are your expectations? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: ActivePerl -x64, and another problem with mixing compilers.
Jan Dubois wrote: It is normal if you are running Vista or 2008 Server, in which case this tree contains every single file of the OS (including the components that have not been installed). All other installed files are really just NTFS hardlinks into this tree. omg. Thanks for the revelation. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: ActivePerl -x64, and another problem with mixing compilers.
Running the *appropriate* vcredist_x64.exe fixes the problem. (The appropriate one being the one for VC++ 2008, not the one for VC++ 2005.) Does this mean that if there is an existing app which ref the VC2005 dll, there will be a collision problem? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Reading hash arrays in the order it was written
Fish, David wrote: Hello! The problem I am having is I am pulling data from a table in a certain order and loading it into the hash array but when I read the hash array it comes out in a different order than it is written. What I have done as a work around, is the read the data from a file that has it in the correct order. Is there away to build the hash so that it reads in the order it was created? Wouldn't a stack (essentially just an array) be better than a hash? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Newbie Question
I'm sorry to fumble around the old question: wouldn't sending a filename as a parameter be a more scalable solution, as opposed to squeezing in stuff through command line? If this function is to happen regularly (or concurrently for the matter), you can create a temporary file as the file reference, then remove it as soon as the job is done. Karl Anderson wrote: Thank you, Passing it as a file would be best, however it is selected text so I believe it is a long string. k Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: win32 service application (like google desktop)
Yup, you're still looking at PDK's PerlSvc packager. It's all there buddy. Edward Peschko wrote: great.. you are right, that's exactly what I'm looking for.. Now suppose that I want to install a standalone executable such that it is integrated into the start menu, and also runs as part of the startup sequence on any machine that it is installed on... anything to help there, or do I need to write to the registry myself? Are there any perl based installers out there, anyways? Thanks much, Ed On Wed, Apr 2, 2008 at 4:09 PM, Jan Dubois [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Check out the PerlTray utility in the Perl Dev Kit it does all the things you are looking for: http://aspn.activestate.com/ASPN/docs/PDK/7.1/PerlTray.html Download a trial version and look at the PerlTray sample programs. http://www.activestate.com/Products/perl_dev_kit/index.mhtml?_x=1 Cheers, -Jan *From:* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] *On Behalf Of *Edward Peschko *Sent:* April 2, 2008 3:57 PM *To:* Perl-Win32-Users@listserv.ActiveState.com mailto:Perl-Win32-Users@listserv.ActiveState.com *Subject:* win32 service application (like google desktop) all, I wanted to get the following behaviors in a perl script: 1. a small icon for the perl script, in the lower corner of the window (ie: by the system clock). Clicking on this expands the existing gui. 2. a single instance (and only a single instance) of the script runs at all times. 3. mousing over the script displays text associated with that script. 4. no 'cmd' associated with the script.. runs standalone. In short, I was looking on how to make a script that behaves like the google desktop applet.. Anyone made something like this? Ed ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Newbie Question
You're trying to put in 900 arguments into the command line? Aren't you better off passing the filename into the command line? Karl Anderson wrote: Thank you in advance I am attempting to write a perl script to manipulate about 900 words of text in scite. I am passing the text to perl via $(CurrentSelection). My problem is how do I get such a large commandline argument into the script? k ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: difficult multi-threading debugging scenario
Some questions to ask: 1. Is it more stable in a 32-bit environment? 2. Does a 'lite' version (no actual work, but threads are scheduled and run) of your MT framework throw out the same problem? 3. Have you thrown in eval() at critical points to capture exceptions? Bear in mind eval in threads works slightly different. [EMAIL PROTECTED] wrote: Here's a difficult 'perl' debugging problem. Have a relatively simple but multi-threaded script that runs a bunch of remote 'tasklist' commands via pipe opens every five minutes, collects the outputs, checks that certain programs and services are running, and generates e-mail alarms when things are amiss. This script runs fine, but after the first two weeks of operation it hung. Running under 64-bit Perl 5.10.0 freshly compiled from the base distribution with Visual Studio 2005 SP1 C/C++. I believe the script is fine and that a problem may exist in 'perl'. Locks are used to protect a few shared arrays and semaphores are used to wake up threads. An earlier multi-threaded issue was resolved by moving from 5.8.8 to 5.10.0 and it seems the perl MT support is still fairly new and may have issues. Also googled up a bug from last year where a condition variables hangs up, though it's not clear if the fix is in 5.10.0. What makes the most sense is to somehow obtain a snapshot of the state of the interpreters after the next hang, however many weeks or months out that happens to be. Just knowing where it gets stuck would get me 85% there. However I don't see any easy way to dump or attach the perl interpreter process and find out what's going on unless I want to hack it at the C language level (i.e. not easy). Tried running with -d but can't seem to interrupt the script with CTRL-C or CTRL-BREAK. For now I'm running both the MT version of this script and an earlier ST version as a backup. The ST version will hang if any of the 'tasklist' children hang, but that doesn't seem to happen even when the network goes to pieces so the ST version will probably run well enough. If it doesn't hang it will be far more useful than the MT version even though it's less technically correct and gathers outputs in a round-robin line-at-a-time manner from the array of 'tasklist' pipes. For now the application being monitored is more reliable that the MT monitoring script. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Where's the next 2 script games commentries?
Looking forward to them... ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Who's got the guru beard?
Ok now we know Jan is a 'deviant'. It's piqued my interest, so I looked up Randy as well At least one of us has the beard... Jan Dubois wrote: And yes, no facial hair... Back in the days (December 1999) I was the only developer at ActiveState without some kind of guru-beard (remember, I'm an ex-banker), but over time I convinced some others (including the gsar man) to come clean too. :) inline: kobes-randy.jpg___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: My first 2 Scripting Games commentaries are online now
Hey Jan, now I know how you look...no guru-beard? I'm disappointed. Jan Dubois wrote: Feel free to check them out, even if you are not taking part in the Games, and let me know what you think: http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/experts.mspx I have solutions for all 10 events, but I haven't written all the write-ups yet. So any feedback on the style /content would be welcome. Note that this is the Advanced Perl division, so I assume readers are familiar with Perl and all the basic concepts. Cheers, -Jan ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: 2008 Winter Scripting Games have begun
Personally I am looking forward to new ecosystems supporting the Perl community. Efforts like swish-e, kinosearch, (SDK for) Asterix are good examples. Remember that Perl - like any other product - needs to constantly renew itself before it is irreversibly outdated. Warnings signs will be what languages are being taught to CS students in the varities. In Singapore we used to teach Perl. Now it's all about Java and .Net. Bharucha, Nikhil wrote: Exactly, MS aint stupid. Perl on Windows via ActiveState is stable and relatively straightforward and of course powerful. Perl aint going nowhere. The need for a scripting language will never go away. Large applications will always need bridge programs etc. Additionally, many companies are recognizing the power/code reuse/better code documentation aspects of using OO Perl. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angelos Karageorgiou Sent: Monday, February 18, 2008 5:10 AM To: Foo JH Cc: Jan Dubois; [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com Subject: Re: 2008 Winter Scripting Games have begun Foo JH wrote: I guess they're trying to get some inspiration from the Perl libraries/ syntax for their next-gen scripting language? P#? PowerPerl? Foo JH wrote: I guess they're trying to get some inspiration from the Perl libraries/ syntax for their next-gen scripting language? P#? PowerPerl? Nah, they know what a powerful scripting engine Perl is and they are trying to show that they do care about the existing smart technology. Of course they will try to push their tech, but Perl is active and working Now. Like it was when IIS first came out and that miserable server took a bite out of the market when PERL was ported to windows ! I took a quick look at powershell and it turned my stomach. maybe I am an old dog unable to learn new tricks like python and such, but powershell I really did not like, maybe given enough time... ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This email is intended for the recipient only. If you are not the intended recipient please disregard, and do not use the information for any purpose. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: 2008 Winter Scripting Games have begun
I took a quick look at powershell and it turned my stomach. maybe I am an old dog unable to learn new tricks like python and such, but powershell I really did not like, maybe given enough time... In the same way that given enough time we will all learn to enjoy the security and peace of mind that UAC has brought to our desktops? :) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: using overload
Hey Rob, Yes - I've had reasonable success with 'use overload'. The particular error you've quoted doesn't ring any bells for me, so it's probably best if you can provide some (minimal) code that causes the error. Attached is my simple test program. Maybe I read the tutorial the wrong way, but that's how I interpreted it... The problem with the code lies in line 25. Error is: Operation : no method found, argument in overloaded package MyObj at test.pl line 25. Please advise. Thanks. use strict; use warnings; $|=1; my $a = MyObj-new; my $b = MyObj-new; print $a + $b; package MyObj; use strict; use warnings; use overload '+' = 'MyAdd'; sub new { my $class = shift; return bless {},$class; } sub MyAdd { my ($a,$b) = @_; print ''.$b; return 1; } ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: using overload
Thanks Rob, once again; it's all my fault... Sisyphus wrote: - Original Message - From: Foo JH [EMAIL PROTECTED] . . The problem with the code lies in line 25. Error is: Operation : no method found, argument in overloaded package MyObj at test.pl line 25. I've changed it slightly - does this help ? - use strict; use warnings; $|=1; my $a = MyObj-new; my $b = MyObj-new; print $a + $b; # prints \n\n (returned by MyAdd) package MyObj; use strict; use warnings; use overload '' = 'MyStringify', '+' = 'MyAdd'; sub new { my $class = shift; return bless {},$class; } sub MyAdd { my ($a,$b) = @_; print ZZ .$b; # prints ZZ MyObj=HASH(0xa7897c) return \n\n; } sub MyStringify { return $_[0]; } - The print() function stringifies its argument(s), so when you print $b it wants to stringify $b - and then (for some reason that I can't think of) expects the stringification of $b to be overloaded. Since there's no such overloading of stringification specified, it then complains. One solutions is to provide an overloaded stringification sub (which is what I've done) - though I'm not sure that it stringifies in the way that you want. If it doesn't, then simply modify MyStringify to return what you want. Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: 2008 Winter Scripting Games have begun
I guess they're trying to get some inspiration from the Perl libraries/ syntax for their next-gen scripting language? P#? PowerPerl? Jan Dubois wrote: Microsoft is running the 3rd annual Scripting Games competition, and this year they added a Perl division alongside VBScript and Windows PowerShell: http://www.microsoft.com/technet/scriptcenter/funzone/games/default.mspx The games have already begun on Friday, but the deadline for the first 2 events isn't until Wednesday morning, so it is not too late to enter and get a perfect score! All Perl entries will be judged by running them with ActivePerl 5.10.0.1002, so you can start using all the new 5.10 features if you want. The competitors pack is a self-extracting ZIP file containing additional data files needed for some challenges. It is provided as an .exe file (probably so it could be digitally signed), but you can unpack it with normal unzip too (this is just a subtle hint that the actual challenges are not platform specific; you just need to remember to prefix the path to any of the data files with C:/Scripts/ before you submit your scripts). I'll be providing sample solutions and a running commentary for the Advanced Perl Division to the scripting guys at Microsoft, who will publish them from each events page after the deadline. They should also become linked from here: http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/experts.mspx So let's show them that there are a sufficient number of Perl users that it is worthwhile keeping a Perl division in the Scripting Games for the upcoming years! :) BTW, you also have a chance to win a Perl Dev Kit license if you enter the contest for at least a single event! Cheers, -Jan ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
using overload
Hi all, Just want to check with the community if anyone has success using 'use overload' in their packages? I keep getting this error on my Perl5.8.8 build 820: Operation : no method found, argument in overloaded package MyClass at test.pl line 8. thanks ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: UWinnipeg 5.10 ppm repository
Thanks for the effort Randy. Much appreciated. Merry Christmas! Randy Kobes wrote: I've started a ppm repository for ActivePerl 10xx ppm packages, based on perl-5.10, at http://cpan.uwinnipeg.ca/PPMPackages/10xx/ This is mainly intended for those (relatively few) CPAN distributions that don't build under ActiveState's automated system: http://ppm.activestate.com/BuildStatus/5.10-A.html The CPAN search utility at http://cpan.uwinnipeg.ca/htdocs/faqs/cpan-search.html also now includes a listing of available ppm packages for builds 10xx, which includes ActiveState's default repository. Also, if you use PPM-Make to make up ppm packages, there was a bug that led to incorrect generation of the NAME attribute of the ARCHITECTURE field for perl-5.10; this has been fixed in version 0.95: http://cpan.uwinnipeg.ca/dist/PPM-Make ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Happy 20th Birthday, Perl!
Sheng Ri Kuai Le Perl! Howard Maher wrote: I don't know about you all, but I think that we all should take a moment to celebrate Perl's 20th birthday today... It just seems so not long ago, December 18th, 1987... a tiny little one was born of man but had an existence so ethereal and unworldly that it truly could bless millions of objects at once throughout the world. HAPPY BIRTHDAY, PERL! Howard ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: ActivePerl 5.10 Build 1000 Beta release
Wow, this is exactly what I've been waiting for this whole year! Now if the final release will only come out before Christmas...hee hee Jan Dubois wrote: ActiveState is pleased to announce ActivePerl 5.10.0 Build 1000 Beta, a beta release of the complete, ready-to-install Perl distribution for Windows, Mac OS X, Linux, Solaris, and AIX. This build is based on the first release candidate of the Perl 5.10 source code. Since Perl 5.10 is not yet complete, this build is designated as a Beta and will be followed by a final build once Perl 5.10 is officially released. Please use this beta build to try out new features in Perl 5.10 and to test source level compatibility of your existing Perl code under this new release (note that Perl 5.10 is not binary compatible to earlier releases). For detailed information or to download this beta release, see: http://www.activestate.com/Products/activeperl/beta_download.plex New in ActivePerl 5.10.0 Build 1000 Beta Some exciting new features to look for: * The new switch statement and smart-match operator The new smart-matching operator ~~ compares two expressions with each other; the exact nature of the match is being determined by the types of both expressions: matching a string and hash will return if the hash contains a key equal to the string; matching a regular expression against an array will return if any element of the array matched successfully against the regexp etc. The new switch statement will smart-match a single expression repeatedly against a list of other expression until one matches. For example: given($foo) { when (foo) { say '$foo is the string foo'; } when ([1,3,5,7,9]) { say '$foo is an odd digit'; continue; # Fall through } when ($_ 100) { say '$foo is numerically less than 100'; } default { die q(I don't know what to do with $foo); } } * Defined-or operator The new defined-or operator // allows you to write $a // $b instead of repeating the first argument as in defined $a ? $a : $b Also the statement $c //= $d; can now be used instead of $c = $d unless defined $c; * Many improvements to the regular expression engine, including: The regular expression engine is no longer recursive, meaning that patterns that used to overflow the stack will either die with useful explanations, or run to completion, which, since they were able to blow the stack before, will likely take a very long time to happen. - It is now possible to write recursive patterns that are easy to read (for a regular expression), and are executed in an efficient manner. - It is now possible to name capturing parenthesis in a pattern and refer to the captured contents by name. The naming syntax is (?NAME). It's possible to backreference to a named buffer with the \kNAME syntax. After the match the named capture groups are accessible via the %+ hash: my $value = foo 42; if ($value =~ /^(?name\w+) \s* (?number\d+)$/x) { say Name $+{name} and Number $+{number}; } - possessive quantifiers - backtracking control verbs - relative backreferences Other new features include: * new say() function * lexical $_ variable * _ prototype * UNITCHECK blocks * state variables * stacked filetest operators * byte-order modifiers for pack() and unpack() * Many bug fixes * Additional core modules * Extended documentation Download ActivePerl 5.10.0 Build 1000 Beta now: http://www.activestate.com/Products/activeperl/beta_download.plex Getting Started === Whether you're a first-time user or a long-time fan, our free resources will help you get the most from ActivePerl. Mailing list archives: http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/ActivePerl Feedback Everyone is encouraged to participate in making Perl an even better language. For bugs related to ActiveState use: http://bugs.activestate.com/enter_bug.cgi?product=ActivePerlversion=1000 For bugs related directly to Perl please use the 'perlbug' utility. Enjoy! ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Windows PowerShell and .pl association
IIRC the spacing issue is a standard problem for all programs. If any program (.Net, Java) path has a space, it also has to be quoted. Suresh Govindachar wrote: Glenn asked: (They have taken the pleasant activity of working at a console and made it miserable drudgery. In cmd.exe, I had to be careful to use unix find rather than cmd.exe's find. In the power-shell, I am finding that more unix commands are over-ridden, for example, diff; I think I'll just prefix all my unix-utility commands with u: ufind, ugrep etc.) Is there any compensating benefit to using PowerShell, to overcome the miserable drudgery that you describe? Why not just stick with cmd.exe? Before answering the question, there is a bug in the .pl file-asssociation. If the path to the .pl file has spaces so that one needs to use then the .pl association is not recognized! I was not clear about what was miserable drudgery. I don't mind renaming my unix utilities with the prefix u. It is the complicated way of, say, setting an environment variable that's painful -- but I don't do that very often. I have just been using PowerShell for a few hours, and so far I can continue to use it as cmd.exe (except for the above bug). The one big benefit over cmd.exe is being able to use / in path names. I never got used to \. Also, _if_ the console/terminal PowerShell Plus supports lots of colors, I will be able to use console vim (rather than gvim). Today with the power-shell: Right-Click on short-cut to PowerShell brings a drop-down menu: - Properties Pick Compatibility Tab Hit [X] Run in 256 colors However, the result was that colors on the entire desktop got messed up! For example, the Olive Green theme became steel-gray! So I switched back to 16 colors. --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Any hint when 5.10 will be out?
Something interesting to look forward to: 'print' will be replaced by 'say' Major change, I'll say! 田口 浩 wrote: New month, And I hope File::Slurp will be packaged into ActivePerl. Regards, H.T. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Dubois Sent: Thursday, August 30, 2007 1:10 PM To: 'Foo JH'; perl-win32-users@listserv.ActiveState.com Subject: RE: Any hint when 5.10 will be out? I think it will be soon, as in the next month or two. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Any hint when 5.10 will be out?
Try this site: http://www.slideshare.net/acme/whats-new-in-perl-510 田口 浩 wrote: Is 5.10 so atractive? Any documents describing new features easy to understand to me? Regards, taguti On Wed, 29 Aug 2007, Foo JH wrote: Just raising my hand that I'm eagerly awaiting the release of 5.10...what's the news? I think it will be soon, as in the next month or two. Note that this is a guess, not a promise, as I have no control over it. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Any hint when 5.10 will be out?
Just raising my hand that I'm eagerly awaiting the release of 5.10...what's the news? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: reading the Network Interface Card(NIC) name
If you're doing this via Windows, you can go via WMI. Google: wmi win32_networkadapter Ankit Mehrotra wrote: Hi all, I want to read the names of the NIC's of a blade server. Is there any ready made package through which I can read them ? Thanks Ankit =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Dynamically referencing a package variable
Hi all, Please bear with me while I try to explain my problem... I'd like to figure out how to access package variables at runtime. In other words, I may have a variable $class that contains the classname, and I want to set a value to the package reference by this variable. It'll be something like: $class::Message = It works; The problem now is that the package name is not known until runtime. I may either be writing to $Package1::Message or $Package2::Message. Can anyone enlighten me on the proper syntax to use to do this? To complicate matters, what happens if I also want to assign values of variables which are known only at runtime? For example (pseudocode): $class::$variable = It works; Thanks for your help. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Dynamically referencing a package variable
Thanks Justin, I'm quite familiar with OOP. It's class variables that I'm interested in setting, not instance variables. In Perl, this is implemented as package variables like $MyPackage::MyVariable. I could've done this: $__PACKAGE__::MyVariable, but as I said, the package name is not determined at run time, so I need to use a variable in place of __PACKAGE__ Hope you have some ideas on this. Thanks. Justin Allegakoen wrote: ---8 I'd like to figure out how to access package variables at runtime. In other words, I may have a variable $class that contains the classname, and I want to set a value to the package reference by this variable. It'll be something like: $class::Message = It works; ---8 Sounds like youre on the OOP path but don’t have an in depth understanding of it, at least not in a Perl sense. ---8 The problem now is that the package name is not known until runtime. I may either be writing to $Package1::Message or $Package2::Message. Can anyone enlighten me on the proper syntax to use to do this? ---8 Run time binding and polymorphism are things that you should be evaluating. ---8 To complicate matters, what happens if I also want to assign values of variables which are known only at runtime? For example (pseudocode): $class::$variable = It works; ---8 Looks as if youre unwittingly trying to use symbolic references. Mark Jason Dominus explains the donts here http://perl.plover.com/varvarname.html As for the rest well perlboot and perltoot will point you in the right direction. Just in ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Dynamically referencing a package variable
The way I read your post had the encapsulation bells ringing. Again, symbolic references offer a possible solution:- code package Root; $me = 'How much?'; package main; use strict; use warnings; my $package = 'Root'; my $var_name = 'me'; # And ducking the rotten tomatoes he continues with no strict 'refs'; print 'I was quibbed with ' . ${${package}::$var_name} . qq{\n}; ${${package}::$var_name} = 'For you? Ten dollars'; print 'So I replied ' . ${${package}::$var_name} . ''; /code Typeglobs and aliasing may be more revered though. Thanks Justin, your sample codes did the trick. Damn, I didn't know it requires so many quotes! Regarding your (hint) on encapsulation, can you encapsulate class variables? I've always treated typeglobs as a not-if-i-can-help-it kind of feature, but if you've a sample code to demonstrate an alternative (if not better) way, I'd like to keep my options open. But in any case, you did in 5 min what ramming my head against the wall couldn't. :) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[SPAM?] Re: ActiveState releases ActivePerl 5.8.8.822
Hundreds of...I hope it's more updates than bug fixes...:P Btw, http://www.activestate.com/products/activeperl/ does not seem to render well on FireFox. It used to very well though. Jan Dubois wrote: ActiveState is pleased to announce ActivePerl 5.8.8.822, a maintenance release of the complete, ready-to-install Perl distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX. For detailed information or to download ActivePerl, see: http://www.activestate.com/products/activeperl/ == New in ActivePerl 5.8.8.822 == Maintenance release with updates including: * Several hundred updates and bug fixes from the core Perl repository * Bundled modules updated to the latest released versions * Enhanced support for MinGW * Improved Windows installers Download ActivePerl 5.8.8.822 now: http://www.activestate.com/store/activeperl === Getting Started === Whether you're a first-time user or a long-time fan, our free resources will help you get the most from ActivePerl. User forums and FAQs: http://community.activestate.com/products/ActivePerl Mailing list archives: http://aspn.activestate.com/ASPN/Mail/?topic=Perl Documentation: http://aspn.activestate.com/ASPN/docs/ActivePerl === Feedback === Everyone is encouraged to participate in making Perl an even better language. For bugs related to the ActivePerl, please use: http://bugs.ActiveState.com/ActivePerl ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: ActiveState releases ActivePerl 5.8.8.822
Hundreds of...I hope it's more updates than bug fixes...:P Btw, http://www.activestate.com/products/activeperl/ does not seem to render well on FireFox. It used to very well though. Jan Dubois wrote: ActiveState is pleased to announce ActivePerl 5.8.8.822, a maintenance release of the complete, ready-to-install Perl distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX. For detailed information or to download ActivePerl, see: http://www.activestate.com/products/activeperl/ == New in ActivePerl 5.8.8.822 == Maintenance release with updates including: * Several hundred updates and bug fixes from the core Perl repository * Bundled modules updated to the latest released versions * Enhanced support for MinGW * Improved Windows installers Download ActivePerl 5.8.8.822 now: http://www.activestate.com/store/activeperl === Getting Started === Whether you're a first-time user or a long-time fan, our free resources will help you get the most from ActivePerl. User forums and FAQs: http://community.activestate.com/products/ActivePerl Mailing list archives: http://aspn.activestate.com/ASPN/Mail/?topic=Perl Documentation: http://aspn.activestate.com/ASPN/docs/ActivePerl === Feedback === Everyone is encouraged to participate in making Perl an even better language. For bugs related to the ActivePerl, please use: http://bugs.ActiveState.com/ActivePerl ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Extract schedukes from Exchange
Taguchi san, Try using Outlook Redemption. It seems to work for me. There's a command for you to access another's schedule (provided that user shares the schedule). The author Dmitry is very supportive. ?? ? wrote: Someone have experiences to get another's schedule on Exchange server? We are using Outlook to set or see schedules of myself and others. We are about 10 to 20 people in our group, without a telephone operator. We must look into others schedules if they are at company or absent. I like to make a convenient screen displaying all members schedules at one page, though it must force all members to set fixed words to schedules, like ON, OFF, ABROAD(rare), ... Regards, T.H. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Extract schedukes from Exchange
This happens if you: 1. Are still using Outlook objects (which with Redemption you don't need to) 2. Are not in the same domain as Exchange (which you should be) 田口 浩 wrote: I tried Redemption bofore, but then I could't skip password popup. -Original Message- Sent: Monday, September 12, 2005 3:32 PM Subject: RE: Outlook Redemption You need to call ImpersonateLoggedOnUser after calling LogonUser. See the following blog for the discussion of impersonation in MAPI: http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx -Original Message- Sent: Sunday, September 11, 2005 11:28 PM Subject: RE: Outlook Redemption Thank you for rapid reply, supprised so rapid! I'm used to Win32::AdminMisc by roth.net. But this is my first try to use this module for Exchange server. As you looked into the attached jpg, my Exchange server is '..corp' And my account password is below, but I failed to logon. Is this a wright approach? I didn't think this popup is not Outlook... use Win32::AdminMisc; # Win32 logon say Win32 LogonAsUser...; my $rc= Win32::AdminMisc::LogonAsUser('..corp', '\..', 'my_password'); if (! $rc) { say Win32 Logon Error: , Win32::FormatMessage(Win32::GetLastError()); # exit; } http://www.roth.net/perl/adminmisc/ Regards, -Original Message- Sent: Monday, September 12, 2005 3:02 PM Subject: RE: Outlook Redemption Hirosi, That is not an Outlook security popup (that Redemption deals with), it is a login dialog that is shown by Windows itself when an RPC channel is opened. To avoid it you would either need to be logged in as that user or impersonate thee user in question using LogonUser/ImpersonateLoggenOnUser Windows API function (don't know if you can call them in Perl). -Original Message- Sent: Sunday, September 11, 2005 10:50 PM Subject: Outlook Redemption Hello, I have already a script to delete old msgs, but (yes) it causes popup msg box for a password. Is it possible to suppress popup with Redemption? Of cause I've read the FAQ, but I cann't understand if possible. I can write Perl only, sorry. Can you show me the rewritten script? -Original Message- Sent: Wednesday, June 20, 2007 5:24 PM Subject: Re: Extract schedukes from Exchange Taguchi san, Try using Outlook Redemption. It seems to work for me. There's a command for you to access another's schedule (provided that user shares the schedule). The author Dmitry is very supportive. ?? ? wrote: Someone have experiences to get another's schedule on Exchange server? We are using Outlook to set or see schedules of myself and others. We are about 10 to 20 people in our group, without a telephone operator. We must look into others schedules if they are at company or absent. I like to make a convenient screen displaying all members schedules at one page, though it must force all members to set fixed words to schedules, like ON, OFF, ABROAD(rare), ... Regards, T.H. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Using Win32::OLE to Query Exchange Remotely
Thanks for sharing your work on Exhange (Win32::Exchange) with the community Steven. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: problem with printing messages to the screen
You can turn off buffering: $|=1; jagdish eashwar wrote: Hi, I have written a script which accesses each file in a directory and processes them in turn. While it is doing so, I want it to put out status message like: Processing $filename, please wait.. And then when the script has finished processing a file, I want it to say Done at the end of the same line. For this, I have put 'print Processing $filename, please wait..; ' near the top of the loop, and 'print Done\n;' at the bottom. When I do this, both the messages are put out at the same time after the file is processed. If I put a \n at the end of the first message, the messages are output one by one with the requisite time lag in between, but the Done comes on the next line. How can I get Perl to put out the messages on the same line with the time lag? jagdish eashwar ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::OLE - ? encoding of returned strings
Thanks Jan, your recent tip on converting Win32::OLE-passed strings as UTF8 saved me hours of blank looks. Specifically: Win32::OLE-Option(CP = Win32::OLE::CP_UTF8()); Have a great Labour Day! Mike Trotman wrote: Thanks - that's very useful. And I had missed the Unicode mode in the Win32::OLE documentation. To clarify: Part of my problem is that the MSXML XSLT transformations do NOT output the character encoding in the XML declaration. So - $xmldoc-transformNode($xsltsheet) may output Windows-1252 encoded data - but does not contain encoding='Windows-1252' in the !? xml version='1.0'? and so other parts of the process expect it to contain UTF-8. If I turn on the Win32::OLE UTF8 code page for a Win32::OLE call to MSXML that returns a UTF-16 string (or Windows-1252) - is the automatic conversion to UTF8 likely to be correct - or incorrect? IE - does the automatic conversion correctly detect the CP of the OLE output? Thanks Jan Dubois wrote: On Fri, 27 Apr 2007, Mike Trotman wrote: I am writing a CGI application that uses WIN32::OLE to interface to Microsoft ADO, MS Access, SQL Server and MSXML for XML documents and XSLT transformations. I suspect that something in the way I am passing data around (or in the ADO implementation of 'savetoxml') is not dealing correctly with XML document encoding declarations. The data is originally in an MS Access database - but has been entered using copy and paste from MS Word documents from around the world - so contains many weird and wonderful bytes. To help in my debugging process can anyone tell me how WIN32::OLE deals with 'strings' returned from method calls? i.e. - are they pure byte data as output by the method (and maybe in UTF-16)? - or are they converted to Perl's internal format (using any current Perl encoding settings)? - or does something else happen? The problems I am having are primarily when outputting XML documents (or HTML) to send to the browser. e.g.my $OUTPUT=; $OUTPUT=$xmldoc-transformNode($xsltsheet); print $OUTPUT; All string data is converted to the current system codepage by Win32::OLE before being passed back to Perl _unless_ you switch Win32::OLE to Unicode mode first: Win32::OLE-Option(CP = Win32::OLE::CP_UTF8()); After this call all strings are converted to UTF8 and marked as such in the Perl internal flags. Cheers, -Jan Message Scanned by ClamAV on datalucid.com -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :+44-0208-239-6810 email: [EMAIL PROTECTED] web: http://www.datalucid.com Message Scanned by ClamAV on datalucid.com ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Compiling Perl
Perl Dev Kit from Activestate - GUI interface or command line, one license = multiple platforms - works very well. To clarify: is it really 1 licence = multiple platforms (Windows, Linux...)? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Compiling Perl
The PDK costs money though. PAR (available free through the perl package manager that comes with activestate perl) works on basically the same concepts (and therefore works almost if not exactly as well), but the documentation is worse and it's usability is worse (command line only, no gui). I've used PAR a lot, and apart from some strange issues with finding and packaging the correct DLL's for a DBD::Oracle application, it's worked remarkably well. I second that. PAR works for simple packaging, but the money spent on the PDK will save you a fair number of hours and headaches (more hair on the head). In addition, the PDK helps to package special applications like Windows services, system trays. Those are time-savers as well. Brian ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: perl as a windows service
There are 2 ways to run Windows as a service: via PerlSvc (commercial packager), and via Win32::Daemon (http://www.roth.net/perl/Daemon/). See which one you like best. John Norris wrote: Hi, in the FAQs at http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/Windows/ActivePerl- Winfaq4.html#How_do_I_run_a_Perl_script_as there are a lines on running on with W2K/XP. Does anyone have more step by step instructions on this. I have looked at the help of the MMC and can find nothing with regard to Perl. Is the entry refering to the PerlSrv program in the developers kit? Regards, John Norris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Name of IF style
There are other ways to block out code in Perl. Personally, I use a vim macro and just comment out the block by marking the first line (type ma [mark 'a' position]) and going to the last line and executing the macro by hitting the key you have it bound to (I use #) Lucky you. I am using UltraEdit. Don't think they do thator do they? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Name of IF style
Peters, Thanks for reminding me how noob I am at UE. But it's always good to know what I didn't know, as long as I know now. :) Huub Peters wrote: My way of fast commenting code in UE: - Select the code to be commented - ALT-E - 3x arrow UP (2x = uncomment) - Enter You could also type n instead of the 3x arrow UP which is faster offcourse but I got used to the above method.. TIMTOWTDI Huub Peters. - Original Message - From: Foo JH [EMAIL PROTECTED] To: Bill Luebkert [EMAIL PROTECTED] Cc: perl-win32-users@listserv.ActiveState.com Sent: Monday, February 05, 2007 12:18 PM Subject: Re: Name of IF style There are other ways to block out code in Perl. Personally, I use a vim macro and just comment out the block by marking the first line (type ma [mark 'a' position]) and going to the last line and executing the macro by hitting the key you have it bound to (I use #) Lucky you. I am using UltraEdit. Don't think they do thator do they? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Name of IF style
David, Thanks also for the tip. Now I am doubly noob... - UEdit column comment select your code to comment ALT+C (column edit) type # and spaces as you like it ++ David Sniper Rigaudiere ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Name of IF style
Taguchi san, I like the coding style below for one main reason: it's easy to comment out if needed. IMHO good coding style should support the following: 1. Easy to read. Puristic styles are a matter of opinion. I prefer to maintain a hybrid concept between KR, BSD, and none-of-the-above; choosing one where it makes the code easier to understand at first (or second) glance. 2. Easy to comment out. Since Perl does not support block comments like C (/* and */), I usually refactor key blocks of codes into functions, so it's easier to deactivate them (eg. for debugging purposes). 田口 浩 wrote: Hello, The code below is in the Camel book, and I like this style. Anyone knows the name of this style or there is no such a name? if(/^abc/) { $abc = 1 } elsif (/^def/) { $def = 1 } elsif (/^xyz/) { $xyz = 1 } else { $nothing = 1 } I know KR and BSD/Allman style refering to the IF style, but this is not these. I can't remember someone was calling it as... Regards, Hirosi Taguti ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: checking for infinite loops
I wonder if it's possible to kill a thread in the Win32 implementation of Perl? Chris Wagner wrote: I would start by executing the sub program in a seperate thread. That way the main thread can keep an eye on it and decide if it's run too long and then do something about it. Another way to do it is with Win32::Process and then kill them after some time span. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Inspecting a COM object
Sexy! Thanks Mark and Jan. mark pryor wrote: --- Jan Dubois [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 09:36:23 +0800, Foo JH [EMAIL PROTECTED] wrote: I was wondering if there is any API that lets me inspect a COM object in Perl. By this I mean list out the functions, classes, stuff like that. I see this happening with the OLE browser that comes with the ActivePerl HTML manual. Is that written in Perl? Yes, it is written in Perl, but the Win32::OLE::TypeLib and Win32::OLE::TypeInfo classes it uses are not documented. I wrote the OLE browser to explore both using PerlScript for DHTML and support for OLE typelibs in Win32::OLE. Therefore the APIs were only experimental. Since there was not a lot of interest in this functionality from other people, I never spend the time to finalize the API and document it. But you can probably figure a lot of this out by looking at the OLE browser source. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Hello, Starting in Perl 5.8.8 build 819 (Aug 29 2006), ActiveState has added a patch which gets working the TLBInf32.dll object. This is an activex wrapper around interfaces in OLEAUT32.dll, like ITypeLib. Here is a sample script that uses a combination of registry scraping and TLBinf32 methods to analyze a COM object like Scripting.FileSystemObject - tlbtest.pl #!/usr/bin/perl; use strict; use warnings; use Win32::OLE qw(in with); use Win32::TieRegistry( Delimiter=/, ArrayValues=0 ); # TLI main progid my $Obj = Win32::OLE-new('TLI.TLIApplication', \OleQuit) || die(could not create Obj\n); print ref=, ref($Obj), \n; my $oRef = $Obj-TypeLibInfoFromFile(C:\\WINDOWS\\system32\\scrrun.dll); print ref=, ref($oRef), \n; # all tlbinf32 collections are 1 based my $cc = $oRef-{Coclasses}; my $iCount = $cc-{Count}; my $libname = $oRef-{Name}; print LibName=, $libname, cnt=, $iCount, \n; my $i = 1; my $pkey = $Registry-Open(HKEY_CLASSES_ROOT/); while ($i = $iCount) { my $oItem = $cc-Item($i); my $sName = $oItem-{Name}; my $progidkey = $pkey-Open($libname\.$sName); if ($progidkey) { # if the TypeFlag masks with 2 then its createable (11 works too) my $tkind = $oItem-{AttributeMask}; if ( $tkind and 2 ) { print $progidkey-GetValue(''), \n; print $sName \n; } } $i ++; } print type=, ref($Registry), \n; my $libs = $Registry-Open(HKEY_CLASSES_ROOT/TypeLib); #keys(%$diskKey) foreach my $guid ( $libs-SubKeyNames ) { # step down and open the next subkey my $verkeys = $libs-Open($guid); # foreach my $sver ( $verkeys-SubKeyNames ) { my $mkey = $libs-Open($guid/$sver/); my $helpstr = $mkey-GetValue(''); ; my @sk = $mkey-SubKeyNames; # the langcode is not known apriori (usually 0), so take it as the 0'th subkeyname my $lc = $sk[0]; # version must be a decimal with a decimal point (lame messenger tlb has a bug $MS!) next, unless (index($sver, '.') 0); #get the inproc server path my $pathkey = $libs-Open($guid/$sver/$lc/win32/) ; my $pathval = null; if ($pathkey) { $pathval = $pathkey-GetValue(''); } # $pathkey-GetValue('') print $pathval, ,$helpstr, $sver $guid\n; } # pass } # subroutines below sub OleQuit { my $obj = shift; undefine $obj; } --- end script -- We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Inspecting a COM object
Hi all, I was wondering if there is any API that lets me inspect a COM object in Perl. By this I mean list out the functions, classes, stuff like that. I see this happening with the OLE browser that comes with the ActivePerl HTML manual. Is that written in Perl? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Webservice Call using Win32::OLE
I can't give you a direct answer, but maybe you'd like to try SOAP::Lite instead. It's cross-platform (may not be relavant), and it has worked on both Java and C# web services. Briggs, Larry wrote: Hi I am trying to convert the following VB script webservice call into perl I am trying to use Win32::OLE. Can this be done and if it can how would I go about doing this. I have provided the Perl code that I have tried to write so far. Any help that you can provide to point me in the right direction. Const appUserID = ServiceID Const password = ServicePass Const appTokenName = TokenName encryptedToken = Request.Cookies(Cookies) ' set up data to post to web service postData = postData = postData userID= appUserID postData = postData password= password postData = postData encryptedToken= encryptedToken ' set URL to web service method decryptWebServiceURL = https://Webserver/decryptTokenService/decryptToken.asmx/decryptToken; ' create ServerXMLHTTP object Set oServXMLHTTP = Server.CreateObject(MSXML2.ServerXMLHTTP) ' initialize ServerXMLHTTP object Call oServXMLHTTP.open(POST, decryptWebServiceURL, False) ' set ServerXMLHTTP header to post data Call oServXMLHTTP.setRequestHeader(Content-Type, application/x-www-form-urlencoded) ' send request to web service Call oServXMLHTTP.send(postData) ' retrieve results from web service Set decryptToken = oServXMLHTTP.responseXML ' destroy ServerXMLHTTP object Set oServXMLHTTP = Nothing Perlcode #!perl -w use strict; use CGI qw/:standard/; use CGI::Cookie; use CGI::CARP qw(fatalsToBrowser); use MIME::Base64; $GopaxCookie = $Cookies{GOPAX}; my $ServiceID = ServiceID; my $PassWd = ServicePass; use Win32::OLE qw(in with); my $Postdata =; $Postdata = $Postdata.userID=. $ServiceID ; $Postdata = $Postdata.password=. $PassWd ; $Postdata = $Postdata.encryptedToken=. $GopaxCookie; my $decryptWebServiceUrl = https://Webserver/decryptTokenService/decryptToken.asmx/decryptToken;; my $DOM = Win32::OLE-new('MSXML2.ServerXMLHTTP') or die new() failed; $DOM-open(POST,$decryptWebServiceUrl, FALSE); $DOM-setRequestHeader(Content-Type,application/x-www-form-urlencoded); $DOM-send($Postdata); my $Results = $DOM-responseXML; Thanks Larry ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Print MS Word Docs?
Wow. It's that simple? Thanks for sharing. Ken Cornetet wrote: sub PrintWord { my $file = shift; my $word = Win32::OLE-new('Word.Application'); $word-{Visible} = 0; my $doc = $word-Documents-Open($file); $doc-PrintOut(0); undef $doc; $word-Quit(); undef $word; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris O Sent: Monday, November 20, 2006 4:15 PM To: perl-win32-users@listserv.ActiveState.com Subject: Print MS Word Docs? Anyone know how to print MS Word documents with perl? According to Microsoft's site, there is no command line option to open print a file. I know there has to be a way seeing how it can be invoked by right-clicking a document and selecting print. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: time manipulation
You can try converting $a and $b into secs, and do the math from there. Then convert back to a string format again. Alejandro Santillan wrote: I would like to know if there exists some module that is able con add and substract times. For example, I want to see the time in seconds between the beginning and ending of an application. Something like this: $a=13:12:01; $b=13:02:01; $c=$a-$b; I would like $c to be 00:10:00, or 600 secs. Is some module able to do this task? Alejandro ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: PERL on a CD
The only downside to running (Active)Perl from a CD, is that ppm does not seem to work. Something about paths being wrong and stuff. Appreciate any solutions to this matter. Timothy Johnson wrote: The only disadvantage to running Perl from a CD is that the file associations would not be there, so you would have to prepend perl.exe to your command-line to launch your script. perl myscript.pl Other than that, you can just copy your perl directory to a CD and run it from any machine with a similar architecture. If you're going to be redistributing scripts a lot, though, it might be worth looking into the Perl Dev Kit from ActiveState. You can package your scripts into executables and redistribute them without having to worry if the client has Perl installed or not. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael D. Smith Sent: Tuesday, July 25, 2006 10:32 AM To: perl-win32-users@listserv.ActiveState.com Subject: Re: PERL on a CD Is it possible to burn PERL and a script onto a CD and execute it from there without installing perl on the host computer? There would be nothing in the registry. The path to perl.exe would have to be included for the script to execute -- but beyond that, I'm a blank. Any thoughts appreciated. Actually, it would be unknown if PERL were installed on the host computer or not -- is there any way to check first? -- as it would definitely execute quicker off the hard drive than off a CD. TIA ms ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Up-to-date Alternatives to Tiny Perl? (Was: PERL on a CD)
This is encouraging. Do you know if the free version of the MS compiler will work as well? Sisyphus wrote: - Original Message - From: Veli-Pekka Tätilä . . How difficult would it be to compile my own Perl using VC6 and include the modules, too? I've only been installing Perl modules using PPM so far although do know C. With either VC6.0, VC7.x or MinGW/dmake, building perl 5.8.8 is *very* easy. (It might also be just as easy with VC8 ... not sure.) Just follow the instructions in 'README.win32' in the perl source tarball. With VC compilers it's pretty much just a matter of: 1) unpack the perl5.8.8 source. 2) cd to the 'win32' folder 3) edit 'Makefile' so that 'INST_DRV' and 'INST_TOP' point to the location where you want perl to be installed. 4) run 'nmake' 5) check that all is ok by running 'nmake test' 6) run 'nmake install' That will give you an ActiveState-type build of perl. There are other changes you can make to the Makefile if you like (eg to disable multi-threading, or to build a debug version of perl) - the configurable section of that file is largely self-documenting. However, there's not necessarily much to gain by building your own perl (as opposed to installing AS perl) and there can even be some disadvantages - such as no PPM (though you can install an old version of PPM from CPAN), and none of the non-CORE modules that PPM uses. Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs