From doug.miles at bpxinternet.com Wed Nov 6 12:00:36 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Job: Possible contract opportunity Message-ID: <3DC958C4.9060709@bpxinternet.com> Everyone, I talked to Ron Mileti last week looking for a full time position. He didn't have any available, but he is looking for contract workers. Here is his dream list of requirements. He seems pretty flexible, so if you don't have some of the qualifications (I sure didn't) don't let that stop you. Feel free to give him my name when you talk to him, so he knows where you're comming from. Programmer/Web Developer: Vilocity Interactive, Inc., a growing marketing and interactive development company based in Cleveland and Phoenix, is looking for an experienced Programmer/Web Developer for project work, leading to a possible full-time position. The focus will be advanced website development, email applications, and CD-ROM development. If you are looking for a technical challenge, a creative workplace, a team setting, national-level clients, and an opportunity to grow, then please read on: General Requirements: To be considered, you must have 3+ years experience and an outstanding record with a web development firm, IT company, or related field. Must be well-rounded, with multiple skill sets, and eagerness to do whatever is needed to produce great work for our clients. Development Requirements: Skill sets should include most if not all of the following: ASP, CGI, Perl, JavaScript, PHP, Cold Fusion, MSSQL, MYSQL, Access, Flash/ActionScript, HTML, DHTML. Visual Basic and/or Java is helpful but not required. Experience with web server and network/workstation administration is a plus. Environments: IIS4/5, Apache, Windows9x/NT/2000, Unix/Linux. MacOS a plus. Educational Requirements: Bachelors Degree. Masters Degree is a plus. Interested in becoming part of the Vilocity crew? If so, please email your resum? and salary requirements and/or hourly rate to info@vilocity.com. Ron Mileti President Vilocity Interactive Inc. 15849 N. 71st, #100 Scottsdale, AZ 85254 http://www.vilocity.com PH: 480.281.1467 From phaedrus at illogics.org Wed Nov 13 06:26:35 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: ITEC expo Wed. & Thurs - hand out OpenOffice CDs! Message-ID: <200211131226.gADCQaFe021711@slowass.net> > > > Scott Walters and I will be at the ITEC tomorrow handing out copies of > Open Office to whomever will talk with us, and generally talking up Free > Software. > > I'll be the one in the PLUG t-shirt... > > November 13 and 14 at the Phoenix Civic Plaza, 10-4. > > http://events.goitec.com/overview/default.asp?ec=PHX02 > > \\/ > This didn't seem to have gone through.. lemmie try again. Tomorrow, Bill and I are meeting noonish to hand out Open Office CDs. I've burnt 100 mini-CDRs. Why are we doing this? 1. Business. I want more business. More awareness of the high quality of Free Software available means more people using the products that I know, I like, I have experience in, and I want to continue to support. 2. Awareness. Free Software is being systematically outlawed. If you thought the DMCA and UCITA were bad, just wait until you see whats coming down the pike. In the past I didn't care what anyone else was doing. Now I realize that businesses using and depending upon Free Software means Free Software has an important ally in Washington. 3. Good Will. From talking to people at the AZ Business Expo, Microsoft is almost universally hated by everyone that has to use them right now. People are itching for alternatives. Heavy handed tactics are making people itchy. However, people are very misinformed. All they have to work with is Microsofts FUD because no one has ever told them otherwise. People are very eager to ask questions about Free Software and Open Source and they respect and value the opinions of people that work with it for a living. The members of the BSA have sent letters to everyone. What have we done? Heres the catch. I want *you* to help me hand out these CDs. I don't want to throw them all over the place. I want to talk to people, answer their questions, gauge their interest, and possibly give them a CD if I think it would help them. Outnumbered thousands to two, thats a tall order. I need your help. I also have copies of Knoppix's Live Linux CD, which runs Linux (complete with a huge number of packages installed) off of CD without require an install to HD or any setup whatsoever. The mini-CDRs also contain Mozilla. "Whats in it for me?" 1. Print off a pile of business cards and pass them out with the CDs. 2. More business for the Free Software, Open Source communities means more business for you. If we all don't make an effort to advertise together, no one will, and we eat Microsoft's crumbs. Re: MS, I'm not advocating abolishing them, just don't want the operating systems and languages I love to be crushed at their hands like so many an OS/2. I'll be wearing my black Amiga death vigil T-shirt. See ya there. -scott From phaedrus at illogics.org Thu Nov 14 15:32:29 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: ITEC expo Wed. & Thurs - hand out OpenOffice CDs! Message-ID: <200211142132.gAELWU6b026279@slowass.net> Thanks to everyone who showed up! We all had a good time roving around and gabbing. Reactions were great. They ranged from "OH yeah, I hate Microsoft" to "Yeah, I know about Open Office" to "Oh yeah, our engineers all use that" to just plain "Interesting, thanks". This was definately a different crowd than the AZ Business Expo. More small businesses were representing themselves with their own engineers there, and more sales people were knowledgeable about their product and in closer communication with the engineering division. Everyone knew what Linux was. A few people commented that Linux wasn't useful as a desktop platform, prompting delivery of a Knoppix live-boot CD to their waiting hands and minds ;) If you didn't make it this time, the next date is listed on http://illogics.com. While you're there, follow the instructions and create a page for yourself and link to your homepage/resume. If nothing else, its free google juice. The OpenOffice CDs we handed out also promoted this website (if you can still say "promoted" and "website" and not get shoot). If anyone wants to chip in on mailing/media expenses, I'll be mailing copies of this CD around to area businesses. I don't know at what point I skipped "evangalist" and went stright to "zealot", so I'm sorry =) Thanks, -scott > > > > > > > Scott Walters and I will be at the ITEC tomorrow handing out copies of > > Open Office to whomever will talk with us, and generally talking up Free > > Software. > > > > I'll be the one in the PLUG t-shirt... > > > > November 13 and 14 at the Phoenix Civic Plaza, 10-4. > > > > http://events.goitec.com/overview/default.asp?ec=PHX02 > > > > \\/ > > > > This didn't seem to have gone through.. lemmie try again. > > Tomorrow, Bill and I are meeting noonish to hand out Open Office > CDs. I've burnt 100 mini-CDRs. > > Why are we doing this? > > 1. Business. I want more business. More awareness of the high quality of > Free Software available means more people using the products that I > know, I like, I have experience in, and I want to continue to support. > > 2. Awareness. Free Software is being systematically outlawed. If you thought > the DMCA and UCITA were bad, just wait until you see whats coming down the > pike. In the past I didn't care what anyone else was doing. Now I realize > that businesses using and depending upon Free Software means Free Software > has an important ally in Washington. > > 3. Good Will. From talking to people at the AZ Business Expo, Microsoft > is almost universally hated by everyone that has to use them right now. > People are itching for alternatives. Heavy handed tactics are making > people itchy. However, people are very misinformed. All they have to > work with is Microsofts FUD because no one has ever told them otherwise. > People are very eager to ask questions about Free Software and Open > Source and they respect and value the opinions of people that work with > it for a living. The members of the BSA have sent letters to everyone. > What have we done? > > Heres the catch. I want *you* to help me hand out these CDs. I don't > want to throw them all over the place. I want to talk to people, answer > their questions, gauge their interest, and possibly give them a CD if I > think it would help them. Outnumbered thousands to two, thats a tall > order. I need your help. I also have copies of Knoppix's Live Linux CD, > which runs Linux (complete with a huge number of packages installed) > off of CD without require an install to HD or any setup whatsoever. > The mini-CDRs also contain Mozilla. > > "Whats in it for me?" > > 1. Print off a pile of business cards and pass them out with the CDs. > > 2. More business for the Free Software, Open Source communities means > more business for you. If we all don't make an effort to advertise > together, no one will, and we eat Microsoft's crumbs. > > Re: MS, I'm not advocating abolishing them, just don't want the > operating systems and languages I love to be crushed at their hands like > so many an OS/2. > > I'll be wearing my black Amiga death vigil T-shirt. See ya there. > > -scott > From doug.miles at bpxinternet.com Fri Nov 15 12:33:41 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: ITEC expo Wed. & Thurs - hand out OpenOffice CDs! References: <200211142132.gAELWU6b026279@slowass.net> Message-ID: <3DD53E05.6050605@bpxinternet.com> phaedrus@illogics.org wrote: > Thanks to everyone who showed up! We all had a good time roving around and > gabbing. Reactions were great. They ranged from "OH yeah, I hate Microsoft" > to "Yeah, I know about Open Office" to "Oh yeah, our engineers all use that" > to just plain "Interesting, thanks". > > This was definately a different crowd than the AZ Business Expo. More small > businesses were representing themselves with their own engineers there, > and more sales people were knowledgeable about their product and in closer > communication with the engineering division. Everyone knew what Linux was. > A few people commented that Linux wasn't useful as a desktop platform, > prompting delivery of a Knoppix live-boot CD to their waiting hands and > minds ;) > > If you didn't make it this time, the next date is listed on > http://illogics.com. While you're there, follow the instructions and create > a page for yourself and link to your homepage/resume. If nothing else, its free > google juice. > > The OpenOffice CDs we handed out also promoted this website (if you can still > say "promoted" and "website" and not get shoot). If anyone wants to chip in > on mailing/media expenses, I'll be mailing copies of this CD around to area > businesses. > > I don't know at what point I skipped "evangalist" and went stright to > "zealot", so I'm sorry =) > > Thanks, > > -scott This is great! I'm glad this turned out well. I was home sick. :( > >>> >>>Scott Walters and I will be at the ITEC tomorrow handing out copies of >>>Open Office to whomever will talk with us, and generally talking up Free >>>Software. >>> >>>I'll be the one in the PLUG t-shirt... >>> >>>November 13 and 14 at the Phoenix Civic Plaza, 10-4. >>> >>>http://events.goitec.com/overview/default.asp?ec=PHX02 >>> >>>\\/ >>> >> >>This didn't seem to have gone through.. lemmie try again. >> >>Tomorrow, Bill and I are meeting noonish to hand out Open Office >>CDs. I've burnt 100 mini-CDRs. >> >>Why are we doing this? >> >>1. Business. I want more business. More awareness of the high quality of >> Free Software available means more people using the products that I >> know, I like, I have experience in, and I want to continue to support. >> >>2. Awareness. Free Software is being systematically outlawed. If you thought >> the DMCA and UCITA were bad, just wait until you see whats coming down the >> pike. In the past I didn't care what anyone else was doing. Now I realize >> that businesses using and depending upon Free Software means Free Software >> has an important ally in Washington. >> >>3. Good Will. From talking to people at the AZ Business Expo, Microsoft >> is almost universally hated by everyone that has to use them right now. >> People are itching for alternatives. Heavy handed tactics are making >> people itchy. However, people are very misinformed. All they have to >> work with is Microsofts FUD because no one has ever told them otherwise. >> People are very eager to ask questions about Free Software and Open >> Source and they respect and value the opinions of people that work with >> it for a living. The members of the BSA have sent letters to everyone. >> What have we done? >> >>Heres the catch. I want *you* to help me hand out these CDs. I don't >>want to throw them all over the place. I want to talk to people, answer >>their questions, gauge their interest, and possibly give them a CD if I >>think it would help them. Outnumbered thousands to two, thats a tall >>order. I need your help. I also have copies of Knoppix's Live Linux CD, >>which runs Linux (complete with a huge number of packages installed) >>off of CD without require an install to HD or any setup whatsoever. >>The mini-CDRs also contain Mozilla. >> >>"Whats in it for me?" >> >>1. Print off a pile of business cards and pass them out with the CDs. >> >>2. More business for the Free Software, Open Source communities means >> more business for you. If we all don't make an effort to advertise >> together, no one will, and we eat Microsoft's crumbs. >> >>Re: MS, I'm not advocating abolishing them, just don't want the >>operating systems and languages I love to be crushed at their hands like >>so many an OS/2. >> >>I'll be wearing my black Amiga death vigil T-shirt. See ya there. >> >>-scott >> > > > > > From doug.miles at bpxinternet.com Tue Nov 19 17:19:12 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Meeting 11/21/2002 Message-ID: <3DDAC6F0.7030603@bpxinternet.com> We'll be having a Phoenix.pm meeting Thursday November 21st at 7:00PM. It will be held at The Willow House, which is located at 149 W. McDowell Rd., which is just West of Bowne on McDowell. This is a social meeting, so just show up, hang out, and have fun. The Willow House has coffee, and sandwiches, so bring some money if you are hungry. If you want more information, visit http://www.willowhouse.com/. See you there! From doug.miles at bpxinternet.com Thu Nov 21 11:19:33 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Reminder: Meeting 11/21/2002 Message-ID: <3DDD15A5.7070106@bpxinternet.com> Please RSVP... We'll be having a Phoenix.pm meeting Thursday November 21st at 7:00PM. It will be held at The Willow House, which is located at 149 W. McDowell Rd., which is just West of Bowne on McDowell. This is a social meeting, so just show up, hang out, and have fun. The Willow House has coffee, and sandwiches, so bring some money if you are hungry. If you want more information, visit http://www.willowhouse.com/. See you there! From aj at exiledplanet.org Thu Nov 21 14:21:00 2002 From: aj at exiledplanet.org (Andrew Johnson) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Reminder: Meeting 11/21/2002 Message-ID: <20021121201745.UEBF21264.mtiwmhc14.worldnet.att.net@COM> I'll be there doug.miles@bpxinternet.com (Doug Miles) wrote: __________ >Please RSVP... > >We'll be having a Phoenix.pm meeting Thursday November 21st at 7:00PM. >It will be held at The Willow House, which is located at 149 W. McDowell >Rd., which is just West of Bowne on McDowell. This is a social meeting, >so just show up, hang out, and have fun. The Willow House has coffee, >and sandwiches, so bring some money if you are hungry. If you want more >information, visit http://www.willowhouse.com/. See you there! > > > > > > From doug.miles at bpxinternet.com Tue Nov 26 13:45:42 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser Message-ID: <3DE3CF66.4080108@bpxinternet.com> Hey all, I just implemented a parser that takes something like this: command param1 param2="value2" param3="value3 \"foo\"" and puts the parameters and values into a hash. The value for param1 would be "1". I'm not sure I implemented it the best way, though. I thought I'd get some ideas from you folks to get a different perspective. I'll post what I did after I get some responses. I don't want to contaminate your thinking. :) From eden.li at asu.edu Tue Nov 26 14:39:08 2002 From: eden.li at asu.edu (Eden Li) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser References: <3DE3CF66.4080108@bpxinternet.com> Message-ID: <001101c2958b$de72bf50$8873a995@LUFA> UNTESTED: use Parse::RecDescent; my (%params) = (); my ($parser) = new Parse::RecDescent (<param ($_) } # %params now contains parameters :) eden From: "Doug Miles" > I just implemented a parser that takes something like this: > > command param1 param2="value2" param3="value3 \"foo\"" > > and puts the parameters and values into a hash. The value for param1 > would be "1". I'm not sure I implemented it the best way, though. I > thought I'd get some ideas from you folks to get a different > perspective. I'll post what I did after I get some responses. I don't > want to contaminate your thinking. :) > > From phaedrus at illogics.org Tue Nov 26 14:38:54 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser In-Reply-To: from "Doug Miles" at Nov 26, 2002 12:45:42 PM Message-ID: <200211262038.gAQKctw0029431@slowass.net> Theres no one here but us endangered bobtailed lesser plumed plum crested symbol owls! My solution, in two lines: # test data $_ = qq{param1 param2="value2" param3="value3 \\"foo\\""}; s{(\w+)\s*=?\s*(['"]?)(.*?)(? Hey all, > > I just implemented a parser that takes something like this: > > command param1 param2="value2" param3="value3 \"foo\"" > > and puts the parameters and values into a hash. The value for param1 > would be "1". I'm not sure I implemented it the best way, though. I > thought I'd get some ideas from you folks to get a different > perspective. I'll post what I did after I get some responses. I don't > want to contaminate your thinking. :) > > From phaedrus at illogics.org Tue Nov 26 14:42:58 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser Message-ID: <200211262042.gAQKgwiw029462@slowass.net> (Trying again... can't remember what email happyfunball expects me to use) Theres no one here but us endangered bobtailed lesser plumed plum crested symbol owls! My solution, in two lines: # test data $_ = qq{param1 param2="value2" param3="value3 \\"foo\\""}; s{(\w+)\s*=?\s*(['"]?)(.*?)(? Hey all, > > I just implemented a parser that takes something like this: > > command param1 param2="value2" param3="value3 \"foo\"" > > and puts the parameters and values into a hash. The value for param1 > would be "1". I'm not sure I implemented it the best way, though. I > thought I'd get some ideas from you folks to get a different > perspective. I'll post what I did after I get some responses. I don't > want to contaminate your thinking. :) > > From phaedrus at illogics.org Tue Nov 26 14:48:43 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Sorry for the dup In-Reply-To: from "phaedrus@illogics.org" at Nov 26, 2002 12:38:54 PM Message-ID: <200211262048.gAQKmhCC029519@slowass.net> Ack, sorry for the duplicate. I thought my message was rejected again. Too many email aliases ;) > s{(\w+)\s*=?\s*(['"]?)(.*?)(? foreach my $i (keys %hash) { $hash{$i} =~s/\\//g } This prolly needs explained. Globally, we're matching a word, followed by any amount of space, an optional equal sign, any amount of space, an optional quote character, anything at all*, and then whatever we matched for the quote character, which may be nothing. However, the second time, we don't just match the quote character - we put a conditional in front of it - (? References: Message-ID: <3.0.6.32.20021126151354.00910e90@pop.phnx.qwest.net> At 12:48 PM 11/26/02 -0800, you wrote: > >Ack, sorry for the duplicate. I thought my message was rejected again. >Too many email aliases ;) > >> s{(\w+)\s*=?\s*(['"]?)(.*?)(?> foreach my $i (keys %hash) { $hash{$i} =~s/\\//g } > >This prolly needs explained. > >Globally, we're matching a word, followed by any amount of space, an optional >equal sign, any amount of space, an optional quote character, anything at all*, >and then whatever we matched for the quote character, which may be nothing. >However, the second time, we don't just match the quote character - we put >a conditional in front of it - (?if the previous thing was NOT a \. We need a \ to escape our \. This is a >"zero width negitive look-behind" asserition. We require (assert) something: the it >isn't true (negitive) that previous thing (look-behind) is \. > >* "Anything at all" is matched non-greedily, so it stops as soon as the next thing >in the regex would match. > >After that, we just have to remove the now redundant \'s from our values and >we're good to go. > >-scott > > > Please do not let it happen again Please do not let it happen again -- even the safest course is fraught with peril From doug.miles at bpxinternet.com Tue Nov 26 15:46:10 2002 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser References: <3DE3CF66.4080108@bpxinternet.com> Message-ID: <3DE3EBA2.2050303@bpxinternet.com> Doug Miles wrote: > Hey all, > > I just implemented a parser that takes something like this: > > command param1 param2="value2" param3="value3 \"foo\"" > > and puts the parameters and values into a hash. The value for param1 > would be "1". I'm not sure I implemented it the best way, though. I > thought I'd get some ideas from you folks to get a different > perspective. I'll post what I did after I get some responses. I don't > want to contaminate your thinking. :) > > I left out a few details that I forgot to mention. There can be optional whitespace around the '=' and command may be a command, a scalar, an array, or a method call. What the program does from there depends on which it is. Right now the program is putting the data in an array, but this will change to a hash in the future. Oh, and ignore the $tag_parser parameter. :) I have to pay around with Scott and Eden's examples some more, but here is what I did (I'm sure the formatting will be screwed up): #!/usr/bin/perl use Regexp::Common; my $tag_content = '$scalar param1 param2="\"test2\""'; my @parameters = process_tags('', $tag_content); print join('|', @parameters) . "\n"; $tag_content = q{@array format="'test3'" default_format="test4"}; @parameters = process_tags('', $tag_content); print join('|', @parameters) . "\n"; $tag_content = 'command doug="test5" julie="test6"'; @parameters = process_tags('', $tag_content); print join('|', @parameters) . "\n"; # process_tags ######################################################### sub process_tags { my $tag_parser = shift; my $tag_content = shift; # Suppress "Use of uninitialized value in" warnings. pos($tag_content) = 0; my @parameters; while(pos($tag_content) < length($tag_content)) { if(my ($match, $scalar) = $tag_content =~ /\G^(\$([a-zA-Z0-9_:.]+))/) { pos($tag_content) += length($match); } elsif(my ($match, $array) = $tag_content =~ /\G^(\@([a-zA-Z0-9_:.]+))/) { pos($tag_content) += length($match); } elsif(my ($command) = $tag_content =~ /\G^([a-zA-Z0-9_:.]+)/) { pos($tag_content) += length($command); } elsif($tag_content =~ / \G # Start at last match pos. (([a-zA-Z0-9_:.]+) # A parameter. (?:\s*?=\s*? # '=' & optional WS. $RE{delimited}{-delim=>'"'}{-esc=>'\\'}{-keep})?) # '"' delimited value. /x # / Fix VIM syntax highlighting problem. ) { my $match = $1; my $parameter = $2; my $value = defined($5) ? $5 : 1; $value =~ s/\\"/"/g; #print "$1|$2|$3|$4|$5|$6|$7|$8|$9\n"; push(@parameters, ($parameter, $value)); pos($tag_content) += length($match); } else { pos($tag_content) += 1; } } # END: while(pos($tag_content) < length($tag_content)) From phx-pm-list at grueslayer.com Wed Nov 27 07:49:08 2002 From: phx-pm-list at grueslayer.com (David A. Sinck) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser References: <200211262042.gAQKgwiw029462@slowass.net> Message-ID: <15844.52564.212069.761418@magnitude.righthandgraphics.com> \_ SMTP quoth phaedrus@illogics.org on 11/26/2002 12:42 as having spake thusly: \_ \_ I decided that CGI was entirely too large at 6695 lines, so I \_ decided to rewrite it, or atleast the parts of it that I actually use: \_ \_ my $in = $ENV{QUERY_STRING}||''; $in.='&'; read(STDIN, $in, $ENV{CONTENT_LENGTH}||0, length($in)); \_ map { $nam='word';s{^([a-z]+)=}{$nam=$1;''}e; tr/+/ /; s/%(..)/pack('c',hex($1))/ge; $$nam=$_; } split/[&;]/, $in; \_ \_ This decodes GET and/or POST data. On initial glance it seems like it handles GET and SOME POST data. I bet if you upload a file through that you're going to be displeased. Similarly, any form where the encoding type is "multipart/form-data" becase the data is diced really finely with a chainsaw. Also what about checkbox buttons with the same name? I like cookies that have [] m&ms [] chocolate chips [] that come with milk Seems to me that will clobber $cookie_features right fast when it needs to be an array. \_ I'm reading in $ENV{QUERY_STRING} or else the empty string (to make \_ warn happy), concat'ing the '&' seperator, then reading from STDIN \_ for whatever length $ENV{CONTENT_LENGTH} I sure hope browsers send that accurately. And are never spoofed by evil folks with $ENV{CONTENT_LENGTH} = 1e90. :-) \_ specifies starting at the \_ end of what we read from the query string. This way, GET variables \_ have priority over POST variables. Really? I read that as just the opposite. You have GET&POST as $in, then you split on & and feed it through map. It looks to me like you'll get the second evaluation (from the POSTed var) to clobber the first. \_ I split that on ";" or "&", and \_ do a few string operations (all of which default to $_) on \_ $_. First, replace a varname composed of lowercase letters with '', I think the spec or at least common practice allows uppercase chars too, but if you control the horizontal and vertical, that's not a problem. \_ stashing that in $nam over top of the default 'word'. Then I decode \_ what is left, using a symbol table lookup to store in the variable \_ specified by $nam. It seems like you could have clobbered $main:: variables this way, which could lead to a posting on BUGTRAQ. :-) Me? I 'use CGI;' it's shorter to type. :-) It has fallen down on some cookie parsing at one point. Come to think of it, I suspect the code posted would too. ... &foo=this%00that& ... it was right inconvenient of vignette to stuff nulls in the value. David Perl's power can be a devastating weapon in the hands of a skilled user, but it sometimes seems with Perl, you become skilled by repeatedly shooting yourself in the foot. -- J. Friedl, MRE2 From phx-pm-list at grueslayer.com Wed Nov 27 07:54:12 2002 From: phx-pm-list at grueslayer.com (David A. Sinck) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser References: <3DE3CF66.4080108@bpxinternet.com> <3DE3EBA2.2050303@bpxinternet.com> Message-ID: <15844.52868.114517.51675@magnitude.righthandgraphics.com> \_ SMTP quoth Doug Miles on 11/26/2002 14:46 as having spake thusly: \_ \_ Doug Miles wrote: \_ > Hey all, \_ > \_ > I just implemented a parser that takes something like this: \_ > \_ > command param1 param2="value2" param3="value3 \"foo\"" \_ > \_ > and puts the parameters and values into a hash. The value for param1 \_ > would be "1". I'm not sure I implemented it the best way, though. I \_ > thought I'd get some ideas from you folks to get a different \_ > perspective. I'll post what I did after I get some responses. I don't \_ > want to contaminate your thinking. :) What about defaults? I've recently decided to try a hash config of my %args = ( 'h' => {'short' => 'this help', }, 'i' => {'short' => 'ignore password descrepancies', }, 'd' => {'short' => 'what to debug', 'arg' => 's', }, 'b' => {'short' => 'database to dump', 'arg' => 's', 'default' => 'mysql', }, .... ); sub print_help { [...] my $args = join ("\n", map { sprintf "-%s %s: %s", $_, (($args{$_}{arg}) ? "<$args{$_}{arg}>" : ' '), $args{$_}{short} } sort keys %args); print < <200211272036.gARKatrc010685@slowass.net> Message-ID: <15845.12861.673169.469384@magnitude.righthandgraphics.com> Scott (afaik) didn't send this reply to the list, but since he pointed out I was a fast read/critic privately (and with reason :-), I thought I'd be sure everyone got to see me fall upon my sword. Ew...that's going to leave a mark. \_ SMTP quoth Scott Walters on 11/27/2002 12:36 as having spake thusly: \_ \_ > \_ SMTP quoth phaedrus@illogics.org on 11/26/2002 12:42 as having spake thusly: \_ > \_ \_ > \_ I decided that CGI was entirely too large at 6695 lines, so I \_ > \_ decided to rewrite it, or atleast the parts of it that I actually use: \_ > \_ \_ > \_ my $in = $ENV{QUERY_STRING}||''; $in.='&'; read(STDIN, $in, $ENV{CONTENT_LENGTH}||0, length($in)); \_ > \_ map { $nam='word';s{^([a-z]+)=}{$nam=$1;''}e; tr/+/ /; s/%(..)/pack('c',hex($1))/ge; $$nam=$_; } split/[&;]/, $in; \_ > \_ \_ > \_ This decodes GET and/or POST data. \_ > \_ > On initial glance it seems like it handles GET and SOME POST data. I \_ > bet if you upload a file through that you're going to be displeased. \_ \_ Oh, man. Everyone is a critic. Please note the "or atleast the parts of it \_ that I actually use" above. Damn it, I knew I should have waited before opening my yap. Sorry. \_ There is a nitche for small, minimal, custom solutions. Yup. \_ I've seen dashes, spaces, and of course underscores used in the real \_ world. I don't live in the real world. I only visit. Welcome to my quote file. \_ I couldn't have said it better myself =) I should disclaim that *anything* \_ I post to this list is *not* the recommended way of doing it, for any \_ newbies reading. Regular Perlers already know better. Mwahaha. David C is like riding a bike: The more you do it, the faster you ride, causing more pain and suffering when you have a wreck. --Eric Dey From phaedrus at illogics.org Wed Nov 27 15:13:26 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser In-Reply-To: from "David A. Sinck" at Nov 27, 2002 01:59:41 PM Message-ID: <200211272113.gARLDRKt010946@slowass.net> > > Damn it, I knew I should have waited before opening my yap. Sorry. Nono, I always welcome feedback. One of the more memorable submissions: http://wiki.slowass.net/?JoTotland > > Mwahaha. > Bwahahahahahah!! From phaedrus at illogics.org Wed Nov 27 15:26:22 2002 From: phaedrus at illogics.org (phaedrus@illogics.org) Date: Thu Aug 5 00:16:51 2004 Subject: Phoenix.pm: Parameter parser In-Reply-To: from "David A. Sinck" at Nov 27, 2002 01:59:41 PM Message-ID: <200211272126.gARLQM1M011186@slowass.net> > > > \_ > On initial glance it seems like it handles GET and SOME POST data. I > \_ > bet if you upload a file through that you're going to be displeased. Oh, I forgot to mention: inline images (file uploads) are implemented by recognizing chunks of data in the page that look like uuencoded data, so file uploads are essentially done by uuencoding a file, and then cut and pasting it into the textarea on your browser. And to think that no one will give me a job... -scott