From georgerogers42 at aol.com Fri Jan 7 18:43:06 2011 From: georgerogers42 at aol.com (George Rogers) Date: Fri, 7 Jan 2011 21:43:06 -0500 (EST) Subject: [Chicago-talk] Experiances with Mojolicious. Message-ID: <8CD7CF4E9F38E54-1060-4F5D@webmail-d059.sysops.aol.com> http://blogs.perl.org/users/george_rogers/2011/01/mojolicious-is-delicious.html I've been working on a charity website with Mojolicious its not going to be up until I get the shopping cart and order processing code working. but It's a good start. I initially used Catalyst but the dependencies proved to be too much. Any help on writing unit tests for web apps would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgerogers42 at aol.com Fri Jan 7 18:51:29 2011 From: georgerogers42 at aol.com (George Rogers) Date: Fri, 7 Jan 2011 21:51:29 -0500 (EST) Subject: [Chicago-talk] Experiances with Mojolicious. In-Reply-To: <8CD7CF4E9F38E54-1060-4F5D@webmail-d059.sysops.aol.com> References: <8CD7CF4E9F38E54-1060-4F5D@webmail-d059.sysops.aol.com> Message-ID: <8CD7CF615AF4F5F-1060-5067@webmail-d059.sysops.aol.com> -----Original Message----- From: George Rogers To: Chicago-talk Sent: Fri, Jan 7, 2011 8:43 pm Subject: [Chicago-talk] Experiances with Mojolicious. http://blogs.perl.org/users/george_rogers/2011/01/mojolicious-is-delicious.html I've been working on a charity website with Mojolicious its not going to be up until I get the shopping cart and order processing code working. but It's a good start. I initially used Catalyst but the dependencies proved to be too much. Any help on writing unit tests for web apps would be appreciated. _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Harrys Buttons Website.tar.gz Type: application/gzip Size: 5604 bytes Desc: not available URL: From brian.d.foy at gmail.com Wed Jan 19 00:18:51 2011 From: brian.d.foy at gmail.com (brian d foy) Date: Wed, 19 Jan 2011 02:18:51 -0600 Subject: [Chicago-talk] help with system call In-Reply-To: <3C9301B1-D353-4B59-A8BB-3FE43075D3D8@c2group.net> References: <20101227161300.C0D5B1C58@alexander.xo.com> <3C9301B1-D353-4B59-A8BB-3FE43075D3D8@c2group.net> Message-ID: On Mon, Dec 27, 2010 at 2:18 PM, Kent Cowgill wrote: > Better than that, use a perl module from cpan to parse out your mime attachments. > > Wish I could recall the one I've used with great success in the past, but I'm away from a computer and snowed in at the moment, so I can't http://search.cpan.org . Here's an extract of a mail processing program that I use to do something similar but from a procmail filter: use MIME::Parser; # get the message my $message = do { local $/; <> }; # extract the payload my $parser = MIME::Parser->new(); $parser->output_dir( $tmpdir ); $parser->parse_data( $message ); # count the images. If there are none, don't do anything chdir $tmpdir; my @images = glob( "*.jpg" ); die "No images to process!\n" unless @images; -- brian d foy http://www.pair.com/~comdog/ From michael at potter.name Wed Jan 19 15:53:39 2011 From: michael at potter.name (Michael Potter) Date: Wed, 19 Jan 2011 18:53:39 -0500 Subject: [Chicago-talk] Selenium Message-ID: Mongers, I am trying to use Selenium to test an ill behaved webpage that I am not in control of. If there is anyone in the group who considers themselves a Selenium expert I would be happy to pay for a few hours of help. My current issue is that I am getting a timeout on the open of a webpage. I am also not in control of the environment: It is windows XP and IE 7 or 8. I am asking on this group rather than a selenium group because I want to hire someone I know. -- Michael Potter -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard at rushlogistics.com Mon Jan 31 13:40:25 2011 From: richard at rushlogistics.com (Richard Reina) Date: Mon, 31 Jan 2011 16:40:25 -0500 (EST) Subject: [Chicago-talk] scalar question Message-ID: <20110131214025.8CDC01D3B@alexander.xo.com> I know I should no this, but I don't and was wondering if someone could enlighten me. I have some scalars that represent filenames and look like this my $fl1=3321-1.pdf my $fl2=3321-2.pdf my $fl3=3432-1.pdf I can get everything before the "-" like this: $fl2=~s/\-.*//; # get the root of the filename but how can I do it without changing the contents of the original scalar? I'd like to put the result directly in a new scalar. $root_name= $f12=~s/\-.*//; # get the root of the filename Thanks. -- Richard Reina Rush Logistics, Inc. Watch our 3 minute movie: http://www.rushlogistics.com/movie From scott.sexton at gmail.com Mon Jan 31 13:56:18 2011 From: scott.sexton at gmail.com (Scott Sexton) Date: Mon, 31 Jan 2011 15:56:18 -0600 Subject: [Chicago-talk] scalar question In-Reply-To: <20110131214025.8CDC01D3B@alexander.xo.com> References: <20110131214025.8CDC01D3B@alexander.xo.com> Message-ID: It looks like you're just trying to get the 3321 part of the whole 3321-1.pdf name. If so, you should do this: $fl2=~/^(\d{4})/; # This matches the first 4 digits in the string and puts them into $1 my $root_name = $1; Or to use what you had, you'd need to copy the variable first since the regex replace always happens in place. $root_name = $f12; $root_name =~s/\-.*//; # replaces the hyphen and everything after with nothing On Mon, Jan 31, 2011 at 3:40 PM, Richard Reina wrote: > I know I should no this, but I don't and was wondering if someone could > enlighten me. I have some scalars that represent filenames and look like > this > > my $fl1=3321-1.pdf > my $fl2=3321-2.pdf > my $fl3=3432-1.pdf > > I can get everything before the "-" like this: > $fl2=~s/\-.*//; # get the root of the filename > > but how can I do it without changing the contents of the original scalar? > I'd like to put the result directly in a new scalar. > > $root_name= $f12=~s/\-.*//; # get the root of the filename > > Thanks. > -- > Richard Reina > Rush Logistics, Inc. > Watch our 3 minute movie: > http://www.rushlogistics.com/movie > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From imranjj at gmail.com Mon Jan 31 14:01:43 2011 From: imranjj at gmail.com (imran javaid) Date: Mon, 31 Jan 2011 16:01:43 -0600 Subject: [Chicago-talk] scalar question In-Reply-To: <20110131214025.8CDC01D3B@alexander.xo.com> References: <20110131214025.8CDC01D3B@alexander.xo.com> Message-ID: split is one way But if you prefer regex: my $fl1="3321-1.pdf"; my ($pref,$suff,$ext) = ($fl1 =~ m/(\w+)-(\w+)\.(\w+)/); -imran On Mon, Jan 31, 2011 at 3:40 PM, Richard Reina wrote: > I know I should no this, but I don't and was wondering if someone could > enlighten me. I have some scalars that represent filenames and look like > this > > my $fl1=3321-1.pdf > my $fl2=3321-2.pdf > my $fl3=3432-1.pdf > > I can get everything before the "-" like this: > $fl2=~s/\-.*//; # get the root of the filename > > but how can I do it without changing the contents of the original scalar? > I'd like to put the result directly in a new scalar. > > $root_name= $f12=~s/\-.*//; # get the root of the filename > > Thanks. > -- > Richard Reina > Rush Logistics, Inc. > Watch our 3 minute movie: > http://www.rushlogistics.com/movie > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at heyjay.com Mon Jan 31 14:12:05 2011 From: me at heyjay.com (Jay Strauss) Date: Mon, 31 Jan 2011 16:12:05 -0600 Subject: [Chicago-talk] scalar question In-Reply-To: <20110131214025.8CDC01D3B@alexander.xo.com> References: <20110131214025.8CDC01D3B@alexander.xo.com> Message-ID: <06CAFF34-C783-4F35-982D-B1B3C0CE7CA5@heyjay.com> Yea I know one @a = split(/\-|\./,$fld1); # or something Sent from my iPhone On Jan 31, 2011, at 3:40 PM, Richard Reina wrote: > I know I should no this, but I don't and was wondering if someone could enlighten me. I have some scalars that represent filenames and look like this > > my $fl1=3321-1.pdf > my $fl2=3321-2.pdf > my $fl3=3432-1.pdf > > I can get everything before the "-" like this: > $fl2=~s/\-.*//; # get the root of the filename > > but how can I do it without changing the contents of the original scalar? I'd like to put the result directly in a new scalar. > > $root_name= $f12=~s/\-.*//; # get the root of the filename > > Thanks. > -- > Richard Reina > Rush Logistics, Inc. > Watch our 3 minute movie: > http://www.rushlogistics.com/movie > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From briank at kappacs.com Mon Jan 31 14:25:20 2011 From: briank at kappacs.com (Brian Katzung) Date: Mon, 31 Jan 2011 16:25:20 -0600 Subject: [Chicago-talk] scalar question In-Reply-To: <20110131214025.8CDC01D3B@alexander.xo.com> References: <20110131214025.8CDC01D3B@alexander.xo.com> Message-ID: <4D4736D0.5060201@kappacs.com> my $fl1 = '3321-1.pdf'; my $root1; ($root1 = $fl1) =~ s/-.*//; # s/// only effects $root1 here - Brian On 2011-01-31 15:40, Richard Reina wrote: > I know I should no this, but I don't and was wondering if someone could enlighten me. I have some scalars that represent filenames and look like this > > my $fl1=3321-1.pdf > my $fl2=3321-2.pdf > my $fl3=3432-1.pdf > > I can get everything before the "-" like this: > $fl2=~s/\-.*//; # get the root of the filename > > but how can I do it without changing the contents of the original scalar? I'd like to put the result directly in a new scalar. > > $root_name= $f12=~s/\-.*//; # get the root of the filename > > Thanks. -- Brian Katzung, Kappa Computer Solutions, LLC Leveraging UNIX, GNU/Linux, open source, and custom software solutions for business and beyond Phone: 877.367.8837 x1 http://www.kappacs.com From Andy_Bach at wiwb.uscourts.gov Mon Jan 31 15:09:06 2011 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach at wiwb.uscourts.gov) Date: Mon, 31 Jan 2011 17:09:06 -0600 Subject: [Chicago-talk] scalar question In-Reply-To: References: <20110131214025.8CDC01D3B@alexander.xo.com>, Message-ID: > But if you prefer regex: my $fl1="3321-1.pdf"; my ($pref,$suff,$ext) = ($fl1 =~ m/(\w+)-(\w+)\.(\w+)/); One thing it's well worth always doing (no matter how sure you are about your data) is to test your match rather than assume it works: my ($pref,$suff,$ext); if ($fl1 =~ m/(\d+)-(\d+)\.(\w+)/ ) { ($pref,$suff,$ext) = ($1, $2, $3); } else { warn("Data doesn't match format: $fl1\n"); } or, a little less verbose: my $fl1="3321-1.pdf"; my ($pref,$suff,$ext); unless ( ($pref,$suff,$ext) = ($fl1 =~ m/(\d+)-(\d+)\.(\w+)/) ) { warn("Data doesn't match format: $fl1\n"); } ---------------------- Andy Bach Systems Mangler Internet: andy_bach at wiwb.uscourts.gov Voice: (608) 261-5738, Cell: (608) 658-1890 Proposed email program pre-post warning msg: "Warning: Your mail program have not even shown you the entire message yet. Logically it follows that you cannot possibly have read it all and understood it. " Bike Shed wisdom Poul-Henning Kamp http://www.webcitation.org/5ZZaDOxyW -----chicago-talk-bounces+andy_bach=wiwb.uscourts.gov at pm.org wrote: ----- To: "Chicago.pm chatter" From: imran javaid Sent by: chicago-talk-bounces+andy_bach=wiwb.uscourts.gov at pm.org Date: 01/31/2011 04:01PM Subject: Re: [Chicago-talk] scalar question split is one way But if you prefer regex: my $fl1="3321-1.pdf"; my ($pref,$suff,$ext) = ($fl1 =~ m/(\w+)-(\w+)\.(\w+)/); -imran On Mon, Jan 31, 2011 at 3:40 PM, Richard Reina < richard at rushlogistics.com > wrote: I know I should no this, but I don't and was wondering if someone could enlighten me. I have some scalars that represent filenames and look like this my $fl1=3321-1.pdf my $fl2=3321-2.pdf my $fl3=3432-1.pdf I can get everything before the "-" like this: $fl2=~s/\-.*//; # get the root of the filename but how can I do it without changing the contents of the original scalar? I'd like to put the result directly in a new scalar. $root_name= $f12=~s/\-.*//; # get the root of the filename Thanks. -- Richard Reina Rush Logistics, Inc. Watch our 3 minute movie: http://www.rushlogistics.com/movie _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk