From cj at enersave.ca Sat Oct 17 18:55:50 2015 From: cj at enersave.ca (Chris) Date: Sat, 17 Oct 2015 21:55:50 -0400 Subject: [tpm] Script to unsubscribe from email lists In-Reply-To: <53386CFA-039E-43B7-AC8E-071DF5B3EA0F@stok.ca> References: <53386CFA-039E-43B7-AC8E-071DF5B3EA0F@stok.ca> Message-ID: <20151018015555.D8462A14D6@relay.mailchannels.net> My Eudora in box receives many messages that I want upsubscribe from. I am hoping to write a script that clicks that button for me. I have a regex that finds the unsubscribe actions but I held with having the script carry out the required action. For example if the script finds List-Unsubscribe: http://visitor.constantcontact.com/do?p=un&m=001-d1Z3Hxt0qEzE2NEpPyreg%3D%3D&se=001SqUaA22xAVc%3D&t=001EkZLEx15CcE%3D&llr=hi5v9dmab what perl command would post to the link and unsubscribe? Or send an email to the address below? List-Unsubscribe: Thanks for your help! Chris Jones 14 Oneida Avenue Toronto, ON M5J 2E3 Tel. 416-697-0056 From shlomif at shlomifish.org Sun Oct 18 03:11:46 2015 From: shlomif at shlomifish.org (Shlomi Fish) Date: Sun, 18 Oct 2015 13:11:46 +0300 Subject: [tpm] Script to unsubscribe from email lists In-Reply-To: <20151018015555.D8462A14D6@relay.mailchannels.net> References: <53386CFA-039E-43B7-AC8E-071DF5B3EA0F@stok.ca> <20151018015555.D8462A14D6@relay.mailchannels.net> Message-ID: <20151018131146.48b4a84c@telaviv1.shlomifish.org> Hi Chris, On Sat, 17 Oct 2015 21:55:50 -0400 Chris wrote: > My Eudora in box receives many messages that I want upsubscribe > from. I am hoping to write a script that clicks that button for me. > > I have a regex that finds the unsubscribe actions but I held with > having the script carry out the required action. > > For example if the script finds List-Unsubscribe: > http://visitor.constantcontact.com/do?p=un&m=001-d1Z3Hxt0qEzE2NEpPyreg%3D%3D&se=001SqUaA22xAVc%3D&t=001EkZLEx15CcE%3D&llr=hi5v9dmab > what perl command would post to the link and unsubscribe? > See http://perl-begin.org/uses/web-automation/ . > Or send an email to the address below? > List-Unsubscribe: > > See http://perl-begin.org/uses/email/ . Regards, Shlomi Fish -- Shlomi Fish From cj at enersave.ca Sun Oct 18 17:19:20 2015 From: cj at enersave.ca (Chris) Date: Sun, 18 Oct 2015 20:19:20 -0400 Subject: [tpm] Script to unsubscribe from email lists In-Reply-To: <20151018131146.48b4a84c@telaviv1.shlomifish.org> References: <53386CFA-039E-43B7-AC8E-071DF5B3EA0F@stok.ca> <20151018015555.D8462A14D6@relay.mailchannels.net> <20151018131146.48b4a84c@telaviv1.shlomifish.org> Message-ID: <20151019001921.7066460453@relay.mailchannels.net> Thank you all for your helpful replies. At 06:11 AM 18/10/2015, Shlomi Fish wrote: >Hi Chris, > >On Sat, 17 Oct 2015 21:55:50 -0400 >Chris wrote: > > > My Eudora in box receives many messages that I want upsubscribe > > from. I am hoping to write a script that clicks that button for me. > > > > I have a regex that finds the unsubscribe actions but I held with > > having the script carry out the required action. > > > > For example if the script finds List-Unsubscribe: > > > http://visitor.constantcontact.com/do?p=un&m=001-d1Z3Hxt0qEzE2NEpPyreg%3D%3D&se=001SqUaA22xAVc%3D&t=001EkZLEx15CcE%3D&llr=hi5v9dmab > > what perl command would post to the link and unsubscribe? > > > >See http://perl-begin.org/uses/web-automation/ . > > > Or send an email to the address below? > > List-Unsubscribe: > > > > > > >See http://perl-begin.org/uses/email/ . > >Regards, > > Shlomi Fish > >-- >Shlomi Fish >_______________________________________________ >toronto-pm mailing list >toronto-pm at pm.org >http://mail.pm.org/mailman/listinfo/toronto-pm Chris Jones 14 Oneida Avenue Toronto, ON M5J 2E3 Tel. 416-697-0056 From olaf.alders at gmail.com Fri Oct 23 05:52:50 2015 From: olaf.alders at gmail.com (Olaf Alders) Date: Fri, 23 Oct 2015 08:52:50 -0400 Subject: [tpm] this month's meeting (Weds, Oct 28) Message-ID: Just a reminder to RSVP for this month's meeting if you plan to attend: http://www.meetup.com/Toronto-Perl-Mongers/events/225031099 It's particularly important for this month as we need to provide a list of guests before the meeting so that everyone can get into the room. So, if you want to be there, please do RSVP. We have 3 speakers lined up and we'll also have some attendees from another meetup group there: http://www.meetup.com/Techalicious/events/226000300 It'll be a fun night. Looks like attendance will be good. Hope to see many of you there. Olaf From olaf.alders at gmail.com Wed Oct 28 16:04:45 2015 From: olaf.alders at gmail.com (Olaf Alders) Date: Wed, 28 Oct 2015 19:04:45 -0400 Subject: [tpm] starting now Message-ID: <3A0FD1E0-DD23-422B-AA65-4105FC5F11AE@gmail.com> https://hangouts.google.com/call/pqiud2rlj5gyr27zc43cakshgma From zoffixznet at gmail.com Wed Oct 28 20:19:28 2015 From: zoffixznet at gmail.com (Zoffix Znet) Date: Wed, 28 Oct 2015 23:19:28 -0400 Subject: [tpm] Mojolicious::Lite <-> Full Mojolicious Message-ID: <1446088768.28913.14.camel@ZofMain> Hey, During tonight's talk, a question came up about how do we get from ::Lite apps to full Mojolicious apps (I believe the person's name was Alan; apologies, if I'm wrong) Just wanted to add to what was said at the meeting: First, there's the "Growing" Guide that talks about the process of converting the ::Lite to Full (here: https://metacpan.org/pod/Mojolicious::Guides::Growing ) Second, the most important thing to keep in mind is that ::Lite apps are just full apps with some sugar on top. ::Lite refers to the "lightness" of how it's used, not the available functionality. Take a look at the source code of Mojolicious::Lite: https://metacpan.org/source/SRI/Mojolicious-6.26/lib/Mojolicious/Lite.pm As you can see, its base class is the full Mojolicious class, and on ->import (when ::Lite is `use`d), just some syntactic sugar is monkey patched into the caller to make subs like `app`, `get`, and others do something useful. Under the hood, the full Mojolicious app handles all the dirty work. Also, as part of my learning process, I often simply used Acme::Dump::And::Dumper to dump a variable or return value in question to see what object it was and then went and read the docs on what methods it offered. Be keen to notice any of the "..inherits all methods from blah blah" in the docs as many of the classes are subclasses of others. A lot of times, you'll find the variable in question contains your Mojolicious::Controller and you just take it from there. Hope that helps! Cheers, ZZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ceeshek at gmail.com Thu Oct 29 10:02:21 2015 From: ceeshek at gmail.com (Cees Hek) Date: Thu, 29 Oct 2015 13:02:21 -0400 Subject: [tpm] Correction regarding my talk last night Message-ID: Hi All, Thanks for letting me speak on Mojolicious last night. Just a correction on something I said last night. I received an email from Joel Berger who watched the talks online today (Olaf and Dave, your efforts for getting the TPM meetings online are not going to waste). When I showed the example using the Delay object, I mentioned that you could not guarantee the order in which your callbacks completed, and hence the callback results that are sent to the next step were not guaranteed to be in order. This was incorrect. The results are returned in the order in which you started the callbacks. The delay object knows which order the $delay->begin calls were made, and even though the callbacks may finish in an unpredictable order, the delay object ensures that the results as passed to the next step in the correct order. Also, Joel mentioned that nesting delay objects also works correctly. This is something that I wasn't sure if it was supported, but it is supported. He provided the following example that shows this in action (inside one of the steps of a delay object, he makes a call to a subroutine, and this subroutine creates it's own delay object and uses it to make some non blocking calls). https://github.com/jberger/MojoForum/blob/master/lib/MojoForum/Helpers.pm If anyone is interested in looking further into the Non-Blocking support in Mojo, Joel's blog series on the subject is highly recommended: Writing Non-Blocking Applications with Mojolicious: Part 1 Writing Non-Blocking Applications with Mojolicious: Part 2 Writing Non-Blocking Applications with Mojolicious: Part 3 Non-blocking Mojolicious apps are even easier now! Cheers, Cees Hek -------------- next part -------------- An HTML attachment was scrubbed... URL: From olaf.alders at gmail.com Thu Oct 29 10:48:46 2015 From: olaf.alders at gmail.com (Olaf Alders) Date: Thu, 29 Oct 2015 13:48:46 -0400 Subject: [tpm] Sample Mojo app Message-ID: I mentioned that there's a Mojo app in the MetaCPAN family that anyone is free to play with. It lives here: https://github.com/CPAN-API/github-meets-cpan You should be able to run it locally in a lot of cases via cpanm or Carton if you have MongoDB installed. You can also play with the MetaCPAN developer VM which should support this out of the box. (Haven't tested that myself). Olaf From legrady at gmail.com Thu Oct 29 11:50:24 2015 From: legrady at gmail.com (Tom Legrady) Date: Thu, 29 Oct 2015 14:50:24 -0400 Subject: [tpm] Correction regarding my talk last night In-Reply-To: References: Message-ID: <56326A70.3020807@gmail.com> Thanks Cees & Joel Great talk last night! And proof of the power of the innner-tubes! Tom On 10/29/2015 01:02 PM, Cees Hek wrote: > I received an email from Joel Berger -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoffixznet at gmail.com Thu Oct 29 15:18:56 2015 From: zoffixznet at gmail.com (Zoffix Znet) Date: Thu, 29 Oct 2015 18:18:56 -0400 Subject: [tpm] Deploying Mojolicious Apps In-Reply-To: <56326A70.3020807@gmail.com> References: <56326A70.3020807@gmail.com> Message-ID: <1446157136.6493.7.camel@ZofMain> Hey, Someone emailed me asking to clarify deployment... I wrote a large response, so I figured I may as well share it to the list, if anyone else had the same question: If all you have is shared hosting... tough luck: Although it's possible to run Mojolicious apps as CGI scripts (http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Apache-CG ), it's by far less than ideal, since you'll be starting your app up for each request?and that's slow. The proper way to do it is to have your Mojolicious app run continuously. That's usually a problem on shared hosts, because the system will kill any process that runs too long (1and1 shared hosting kills them after about 30 seconds of run time, for example). What you could do (and how I did it) is get a VPS from Linode (https://www.linode.com/ ). It's just $10/month, so the cost is comparable to shared hosting. What that gives you is essentially your own server. You can install anything you want on it. On mine, I installed Debian Linux, along with Apache. Then, I saved this file in /etc/apache2/sites-available/, named xtatik.org.conf ServerName xtatik.org Order deny,allow Allow from all ProxyRequests Off ProxyPreserveHost On ProxyPass / http://localhost:8081/ keepalive=On ProxyPassReverse / http://localhost:8081/ RequestHeader set X-Forwarded-Proto "http" Notice the "8081" port number; that's the port my Mojolicious app is listening on. Then I just enable that site in Apache (a2ensite xtatik.org) and restart the server(apache2ctl restart) and now Apache will forward any requests for "xtatik.org" to my Mojolicious app. Now, in my app, I configure Hypnotoad to serve on port 8081 as well (replace "$self", the Mojolicious::Controller, with "app" for ::Lite apps): $self->config(hypnotoad => {listen => ['http://*:8081']}); At this point, you can simply run: hypnotoad YourApp.pl And hypnotoad will start up your app, and visiting xtatik.org would now show the content generated by my app.... but, you don't wanna do that manually every time your server reboots, so what you can do is use Toadfarm (https://metacpan.org/pod/Toadfarm ) to start up all of your apps. And just to note: if you have only a single app, nothing's stopping you from foregoing Apache and just telling hypnotoad to listen on port :80 (or :443 for HTTPS). Many people also use nginx server instead of Apache due to lower resource requirements, but I was already familiar with Apache, so I went with that. Hope that helps! :) Cheers, ZZ -------------- next part -------------- An HTML attachment was scrubbed... URL: