From rkleeman at energoncube.net Tue Mar 1 14:49:52 2005 From: rkleeman at energoncube.net (Bob Kleemann) Date: Tue Mar 1 14:50:00 2005 Subject: [San-Diego-pm] March Meeting Message-ID: <20050301224952.GC4980@energoncube.net> San Diego Perl Mongers, Just a heads up that there will be a meeting at our normal time and place this month, Monday, March 14th at 7PM, at the Panera Bread off Mira Mesa Blvd. Bring questions, bring friends, bring colleagues, bring whatever else might be interesting and we'll chat about it then. Let me know if you have any questions. From bruce at brtnet.org Wed Mar 2 11:02:13 2005 From: bruce at brtnet.org (Bruce Timberlake) Date: Wed Mar 2 11:02:22 2005 Subject: [San-Diego-pm] Fwd: March Mingle Message-ID: <200503021102.13708.bruce@brtnet.org> FYI, this was on the SD PHP Users list this morning. I don't know if the Perl Mongers might be interested in attending. Sounds like it might be fun. ---------- Forwarded Message ---------- I know last year we were a part of the March Mingle, could we become an official part once again this year? We need whoever is in charge to email them about it. Info can be found here: http://www.marchmingle.com/ Also everyone please RSVP, it was a lot of fun last year.. and it would be nice to know someone this year, so please come! :) ---------- Forwarded Message ---------- From rkleeman at energoncube.net Wed Mar 2 14:31:58 2005 From: rkleeman at energoncube.net (Bob Kleemann) Date: Wed Mar 2 14:32:11 2005 Subject: [San-Diego-pm] Mention USENIX'05 (again?) at San Diego Perl Mongers March Meeting Message-ID: <20050302223158.GK4980@energoncube.net> I mentioned this at the Feb meeting, but just a note for anyone that's interested. If you are interested, please contact Peter at pmui _at_ usenix _dot_ org. ================================== Register NOW for USENIX'05: the Annual Technical Conference of the Usenix Association at http://www.usenix.org/usenix05/progm. Come to Anaheim this April 10-15 for top-notch tutorials and technical sessions: this is the USENIX Association's 30th Anniversary, and we're celebrating with the strongest lineup of training and technical sessions ever: *** Nearly 40 tutorials, 20 of which are new, featuring: o Rik Farrow leading a hands-on Linux Security Class o Geoff Halprin on the Basic Skill of Troubleshooting o Mark-Jason Dominus conducting a Perl Program Repair Shop o Heison Chak discoursing on VoIP Principles and Practice o Jacob Farmer on Next-Generation Storage Networking (See details at http://www.usenix.org/events/usenix05/training/) *** Four concurrent tracks of Technical Sessions including Invited Talks, a Freenix (BSD/Linux) track, and a Guru track with your favorite academics and industry researchers on such timely topics as: o Spencer Shepler: NFSv4 o Running Virtualized Native Drivers in User Mode Linux o John Ousterhout: Faster Software Builds o IP Network extensions for accessing USB devices o Configuring hardware in a data center based on temperature o Eddie Kohler: DDoS Defense in Practice and Theory o A PC-based Open Source Voting Machine (and paper ballot!) o Surviving Internet Catastrophies (See details at http://www.usenix.org/events/usenix05/tech/) *** Keynote by George Dyson, historian and author of Darwin Among the Machines, will speak about John von Neumann's use of early computers to tackle previously intractable problems. *** Works-In-Progress Reports (WIPs) and Birds-of-a-Feather Sessions (BoFs) round out a rich week overflowing with presentations, information, and collaboration. *** Conference Reception celebrating the 30th Anniversary of USENIX! ------------------------------------------------------------------------ --- WHAT: USENIX '05 - Celebrating the 30th Anniversary of the USENIX Association WHEN: April 10-15, 2005 WHERE: Anaheim, CA: Marriott Hotel WHO: Anyone interested in state-of-the-art computing issues WHY: To get to and stay on the leading edge of practical and actionable research and tools HOW: http://www.usenix.org/usenix05/progm ------------------------------------------------------------------------ --- Five or more people registering together get $100 off per person! Early-Bird Registration discounts end March 21, 2005 -- register NOW for the best pricing at: http://www.usenix.org/usenix05/progm From wwood at ucsd.edu Fri Mar 4 15:06:02 2005 From: wwood at ucsd.edu (Wood, William) Date: Fri Mar 4 15:06:11 2005 Subject: [San-Diego-pm] CGI Program Problem Message-ID: I have a problem I hope you can give me some advice on. My organization is going thru a conversion from Sybase to DB2. We have cgi framework written in perl that has depends on the sybperl exported routines dberrhandle and dbmsghandle. The framework traps all database errors, formats an error message and returns the message to the users browser. None of the hundreds of scripts that utilize the framework perform manual error checking. The conversion to DB2 will require that we switch to using DBI. Apparently DBI does not provide the exported routine technique for handling error conditions. The closest thing I can find is setting PrintError and RaiseError when the db connection is established and then using $SIG{__WARN__} and $SIG{__DIE__} to redirect the messages for formatting and display. I also read that using this technique should be a last resort. Does anyone have a suggestion of how to implement a centralized error handling technique similar to the sybperl exported routine approach or is the __DIE__ method my only option? Bill Wood UCSD Administrative Computing wwood@ucsd.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/san-diego-pm/attachments/20050304/1d569145/attachment.htm From dgwilson1 at cox.net Sat Mar 5 00:49:17 2005 From: dgwilson1 at cox.net (Douglas Wilson) Date: Sat Mar 5 00:47:06 2005 Subject: [San-Diego-pm] CGI Program Problem In-Reply-To: References: Message-ID: <4229728D.3010209@cox.net> Wood, William wrote: > anyone have a suggestion of how to implement a centralized error > handling technique similar to the sybperl exported routine approach or > is the __DIE__ method my only option? DBI has a HandleError attribute that accepts a subroutine. -Doug From joel at fentin.com Tue Mar 8 10:25:34 2005 From: joel at fentin.com (Joel Fentin) Date: Tue Mar 8 10:26:53 2005 Subject: [San-Diego-pm] Clipboard Message-ID: <422DEE1E.1040609@fentin.com> Does anybody know how to put data into and get data from the clipboard via Perl or Javascript? -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Email me: http://fentin.com/me/ContactMe.html Biz Website: http://fentin.com Personal Website: http://fentin.com/me From christopher.hahn at peregrine.com Tue Mar 8 10:45:00 2005 From: christopher.hahn at peregrine.com (Christopher Hahn) Date: Tue Mar 8 10:45:10 2005 Subject: [San-Diego-pm] Clipboard Message-ID: There is an OLE interface. (I would add more, but these interfaces have always seemed relatively undocumented to me) This looks better, but I have yet to use it: http://www.xav.com/perl/site/lib/Win32/Clipboard.html chahn -----Original Message----- From: Joel Fentin [mailto:joel@fentin.com] Sent: Tuesday, March 08, 2005 10:26 AM To: San Diego Perl Mongers Subject: [San-Diego-pm] Clipboard Does anybody know how to put data into and get data from the clipboard via Perl or Javascript? -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Email me: http://fentin.com/me/ContactMe.html Biz Website: http://fentin.com Personal Website: http://fentin.com/me _______________________________________________ San-Diego-pm mailing list San-Diego-pm@pm.org http://mail.pm.org/mailman/listinfo/san-diego-pm From billdav at cox.net Tue Mar 8 11:25:20 2005 From: billdav at cox.net (Bill Davidson) Date: Tue Mar 8 11:25:51 2005 Subject: [San-Diego-pm] Clipboard In-Reply-To: <422DEE1E.1040609@fentin.com> References: <422DEE1E.1040609@fentin.com> Message-ID: <422DFC20.8080103@cox.net> Joel Fentin wrote: > Does anybody know how to put data into and get data from the clipboard > via Perl or Javascript? Can you give more detail about what you are trying to do? With Perl/Tk you want to look up Tk::Clipboard Since you're considering javascript as an option, I'm thinking you're not doing Tk. I'm not sure how to do it with javascript. Did you try Google? --Bill Davidson From joel at fentin.com Tue Mar 8 14:17:33 2005 From: joel at fentin.com (Joel Fentin) Date: Tue Mar 8 14:48:19 2005 Subject: [San-Diego-pm] Clipboard In-Reply-To: <422DFC20.8080103@cox.net> References: <422DEE1E.1040609@fentin.com> <422DFC20.8080103@cox.net> Message-ID: <422E247D.4050000@fentin.com> Bill Davidson wrote: > Joel Fentin wrote: > >> Does anybody know how to put data into and get data from the clipboard >> via Perl or Javascript? > > > Can you give more detail about what you are trying to do? One example: There are several websites where I have written administration software for getting the data into databases. These sites are partially or totally in Spanish but the operator might be at an English keyboard. One way I handle that is to simply display a label containing "??????????????". The operator can copy and paste the needed character(s) into active textboxes. With VB work (not on the web) I can can set it up so that the operator need only click the character of interest and it is automatically inserted at the location of the text cursor. This, by the way, requires one short line of code. So, in attempting the same thing for a web page, I have considered drag & drop and the clipboard. Drag & drop appears to be a real drag if it is to be browser neutral. My searches using the word clipboard got me nowhere. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Email me: http://fentin.com/me/ContactMe.html Biz Website: http://fentin.com Personal Website: http://fentin.com/me From billdav at cox.net Tue Mar 8 15:52:51 2005 From: billdav at cox.net (Bill Davidson) Date: Tue Mar 8 15:53:24 2005 Subject: [San-Diego-pm] Clipboard In-Reply-To: <422E247D.4050000@fentin.com> References: <422DEE1E.1040609@fentin.com> <422DFC20.8080103@cox.net> <422E247D.4050000@fentin.com> Message-ID: <422E3AD3.1000500@cox.net> Joel Fentin wrote: > One example: There are several websites where I have written > administration software for getting the data into databases. These sites > are partially or totally in Spanish but the operator might be at an > English keyboard. > > One way I handle that is to simply display a label containing > "??????????????". The operator can copy and paste the needed > character(s) into active textboxes. > > With VB work (not on the web) I can can set it up so that the operator > need only click the character of interest and it is automatically > inserted at the location of the text cursor. This, by the way, requires > one short line of code. > > So, in attempting the same thing for a web page, I have considered drag > & drop and the clipboard. Drag & drop appears to be a real drag if it is > to be browser neutral. My searches using the word clipboard got me nowhere. There I can help you. Javascript can insert text into form textarea's easily. Of course, getting the cursor position is not DOM standard (WTF?!) and IE has a different extension to do it than Netscape/Mozilla. :( Anyway, here's some javascript I wrote (or really rewrote as I started with something I found on the web that didn't work correctly). I used it for a pop-up keyboard I made to do something similar. For browsers other than Netscape/Mozilla or IE it only appends text to the textarea. // this one is really only for IE. It stores the cursor position when // it is called. It handles several events in the textarea. function storeCursor( textRef ) { if ( textRef.createTextRange ){ textRef.caretPos = document.selection.createRange().duplicate(); } } // This one inserts the given text into the textarea at the current cursor // position for IE and Mozilla. For others, it appends the text to the end. // keyRef is a reference to the HTML object that called this routine. // text is the text to be added to the textarea. It should normally be // only one unicode character. // textId is the HTML id of the textarea being inserted into. function insertAtCursor( keyRef, textId ){ var text = keyRef.innerHTML; var textRef = document.getElementById(textId); if ( textRef.createTextRange && textRef.caretPos ){ // this is for IE only var cursorPos = textRef.caretPos; cursorPos.text = cursorPos.text.charAt(cursorPos.text.length - 1) == ' ' ? text + ' ' : text; }else if ( textRef.selectionStart || textRef.selectionStart == '0' ){ // this is for Mozilla/Netscape var startPos = textRef.selectionStart; var endPos = textRef.selectionEnd; textRef.value = textRef.value.substring(0, startPos) + text + textRef.value.substring(endPos, textRef.value.length); textRef.selectionStart = startPos + text.length; textRef.selectionEnd = startPos + text.length; }else{ // this is for everyone else. append text to the end. textRef.value += text; } textRef.focus(); } My Perl/CGI script generates a different page based upon wether it thinks it's working with IE or Netscape/Mozilla (Finally some Perl! :)). I've stripped out the stuff that's not necessary to your problem. First I guess if it's IE: my $msie = exists($ENV{HTTP_USER_AGENT}) && $ENV{HTTP_USER_AGENT} =~ /MSIE \d/ ? 1 : 0; Later I start my textarea tag: print "