|
http://perldoc.perl.org/perlvar.html posted:# $PROCESS_ID Just as it says, you get the same behavior with your shell, try echo $$ which will return the PID of the current shell.
|
# ? Mar 22, 2010 20:11 |
|
|
# ? May 17, 2024 19:19 |
|
$$ is a variable, the pid of the process iirc. You want "\$" for a literal $
|
# ? Mar 22, 2010 20:12 |
|
Bob Morales posted:Why does http://perldoc.perl.org/perlvar.html is your friend if you see a special variable you don't recognize (Ctrl+F for the variable, $$ in this case): quote:$PROCESS_ID e: whoa <quake 3 guy voice>TRIPLE KILL</quake 3 guy voice>
|
# ? Mar 22, 2010 20:13 |
|
Otto Skorzeny posted:http://perldoc.perl.org/perlvar.html is your friend if you see a special variable you don't recognize (Ctrl+F for the variable, $$ in this case): Awesome. Searching "Perl $$" on Google didn't help much.
|
# ? Mar 22, 2010 20:20 |
|
Bob Morales posted:Awesome. Searching "Perl $$" on Google didn't help much. Somewhat of a non-perl question, but on that note, is there any way of forcing google to NOT ignore punctuation and other non-alphanumeric characters?
|
# ? Mar 22, 2010 21:55 |
|
tripwire posted:Somewhat of a non-perl question, but on that note, is there any way of forcing google to NOT ignore punctuation and other non-alphanumeric characters? Iirc they convert all letters to lowercase and ignore non-word characters, so effectively their index just contains words made of [a-z0-9_]
|
# ? Mar 22, 2010 21:59 |
|
Bob Morales posted:Awesome. Searching "Perl $$" on Google didn't help much. perldoc perlvar /\$\$ alternatively, perldoc -v '$$' or perldoc -v \$\$ produces a narrowed down result
|
# ? Mar 22, 2010 22:33 |
|
Otto Skorzeny posted:Iirc they convert all letters to lowercase and ignore non-word characters, so effectively their index just contains words made of [a-z0-9_] Except for "C++"
|
# ? Mar 22, 2010 22:37 |
|
tripwire posted:Somewhat of a non-perl question, but on that note, is there any way of forcing google to NOT ignore punctuation and other non-alphanumeric characters? Cuil returns the answer I wanted, but a lot of their links are to dead sites. Oh well, enough search engines-back to Perl.
|
# ? Mar 23, 2010 00:35 |
|
Is there a way to tell if the perl my host is running is fastcgi savvy? The FCGI module doesn't even mention anything about needing a different perl build. Catalyst just says you need mod_fastcgi installed and configured. So I finally talk my host into installing mod_fastcgi, and now i'm reading that I need a special perl build? Good grief...
|
# ? Mar 24, 2010 23:56 |
|
uG posted:Is there a way to tell if the perl my host is running is fastcgi savvy? This was true when FCGI was new, but is no longer the case.
|
# ? Mar 25, 2010 00:04 |
|
Otto Skorzeny posted:This was true when FCGI was new, but is no longer the case.
|
# ? Mar 25, 2010 00:11 |
|
So i've been messing with Catalyst more and more and i've run into something that i'm sure DBIx::Class can take care of that i'm accomplishing in a completely foolish manner. I have the follow tables: posts and users. posts has a belongs_to(user) and users has a has_many(posts). Now say I want to update posts, i'd do code:
code:
As you can see i'm using two updates. However i'm pretty sure I should be able to do it all in one. Something like code:
|
# ? Mar 30, 2010 02:19 |
|
Not really; update() doesn't take any arguments other than column values, so it's not really possible to specify a join condition as part of your update. Plus not all databases support joined updates (SQLite doesn't, anyway). However, there's nothing from stopping you from getting direct access to the underlying $dbh inside your resultset class and writing some SQL that does what you need.
|
# ? Mar 30, 2010 02:35 |
|
Mario Incandenza posted:Not really; update() doesn't take any arguments other than column values, so it's not really possible to specify a join condition as part of your update. Plus not all databases support joined updates (SQLite doesn't, anyway). However, there's nothing from stopping you from getting direct access to the underlying $dbh inside your resultset class and writing some SQL that does what you need. EDIT: i'm looking at HTML::FormBuilder instead now as I think it can accomplish this easier than HTML::FormFu uG fucked around with this message at 05:25 on Mar 30, 2010 |
# ? Mar 30, 2010 03:56 |
|
Anybody know of a good module that lets me embed a graph (G={V,E}, as opposed to a chart) in a PerlTK/GTK/etc canvas, and would let me set up mouse handler callbacks, etc? Neither GraphViz nor Graph::Easy seem to have anything like this, and the only things I've found in CPAN (Tk::GraphViz, Gtk2::Ex::GraphViz) seem to be broken.
|
# ? Apr 4, 2010 07:19 |
|
DBIX::Class question...code:
However, when I do code:
uG fucked around with this message at 08:00 on Apr 5, 2010 |
# ? Apr 5, 2010 07:56 |
|
5.12.0 is out Lots of changes and new stuff, perl5120delta here Mario Incandenza fucked around with this message at 08:07 on Apr 13, 2010 |
# ? Apr 13, 2010 08:04 |
|
Reading the core module updates introduced me to several things I either didn't know existed or didn't know were in core. Hello, Text::Soundex
|
# ? Apr 13, 2010 08:25 |
|
Anybody had much experience with the various distributed worker libraries like Gearman, TheSchwartz, and Cantella? Any advice to offer, or other libraries that would be worth trying out while I'm at it?
|
# ? Apr 30, 2010 10:06 |
|
Anyone else going to YAPC this year? I met a few of you last year and had a pretty good time (apart from getting sick after the big dinner.)
|
# ? May 3, 2010 18:02 |
|
leedo posted:Anyone else going to YAPC this year? I met a few of you last year and had a pretty good time (apart from getting sick after the big dinner.) Sartak/Filburt Shellback mentioned he's giving a talk again I'm broke and thus working 10x6 for the summer so I can't be there
|
# ? May 3, 2010 21:13 |
|
Otto Skorzeny posted:Sartak/Filburt Shellback mentioned he's giving a talk again Bummer, I managed to get my employer to send me again (yay!) I am definitely going to be checking out Sartak's "Nonhierarchical OOP" talk since I still have trouble recognizing good uses for roles.
|
# ? May 3, 2010 21:56 |
|
leedo posted:Sartak's "Nonhierarchical OOP"
|
# ? May 3, 2010 22:18 |
|
Mithaldu posted:Is there an online version of that somewhere? Or a book or whatever? http://yapc2010.com/yn2010/talk/2634 Not sure that slides exist yet since it is still more than a month off. This looks like a pretty comprehensive collection of links on the topic. Chromatic also wrote a big series of posts about it.
|
# ? May 3, 2010 22:27 |
|
leedo posted:slides leedo posted:This looks like a pretty comprehensive collection of links on the topic. Chromatic also wrote a big series of posts about it.
|
# ? May 3, 2010 22:40 |
|
Mithaldu posted:Is there an online version of that somewhere? Or a book or whatever? Yes but only because I gave the talk during OSDC.tw last weekend: http://sartak.org/talks/osdc.tw-2010/nonhierarchical-oop/ I'm also giving a twenty minute talk on my Path::Dispatcher (which is not yet written). I look forward to actually meeting some of you dudes at YAPC. Last year I was kinda shy about goons. Filburt Shellbach fucked around with this message at 03:13 on May 4, 2010 |
# ? May 4, 2010 03:04 |
|
Filburt Shellbach posted:Yes but only because I gave the talk during OSDC.tw last weekend: http://sartak.org/talks/osdc.tw-2010/nonhierarchical-oop/ Thanks a lot for this! That's the best way to represent a talk I've ever seen.
|
# ? May 4, 2010 08:47 |
|
Nonhierarchical Poop
|
# ? May 4, 2010 16:20 |
|
I'm using Net:FTP and retrieving a large directory listing, and I get the following output: Net::FTP=GLOB(0x285454)>>> LIST outgoing Net::FTP=GLOB(0x285454)<<< 150 Connecting to port 64474 Net::FTP=GLOB(0x285454)<<< 226-ASCII Net::FTP=GLOB(0x285454)<<< 226-Options: -l Net::FTP=GLOB(0x285454)<<< 226 Output truncated to 2000 matches I'm trying to iterate through the entire list like this: code:
|
# ? Jun 3, 2010 11:08 |
|
yatagan posted:I'm using Net:FTP and retrieving a large directory listing, and I get the following output:
|
# ? Jun 3, 2010 13:49 |
|
I'm setting up a bunch of client machines with some custom programs. Most are working except one. I'm getting the error:code:
|
# ? Jun 3, 2010 15:00 |
|
mister_gosh posted:I'm setting up a bunch of client machines with some custom programs. Most are working except one. I'm getting the error: It doesn't make a difference in Windows, but it does in unix, and since perl has its roots in unix, that could be a likely cause.
|
# ? Jun 3, 2010 15:06 |
|
mister_gosh posted:I'm setting up a bunch of client machines with some custom programs. Most are working except one. I'm getting the error: Download Process Monitor from windows technet, run it, and run your script once. Then check the log to see where it actually searches for FooBar.pm.
|
# ? Jun 3, 2010 15:16 |
|
Wow, so this is how the PERL5LIB was defined:code:
Thanks guys!
|
# ? Jun 3, 2010 15:37 |
|
I don't recall if this was covered already, but can someone give me a rundown of the various web frameworks? CGI::Application/Titanium, Maypole, Catalyst, Jifty, etc? I've been putting together a simple site for a non-work project and I figured it would be a good excuse to learn a framework but it seemed like none of them integrated well with fastcgi, and the ones that did would take too long to learn. They're all probably too large for something simple like what I'm working on, but I'd still like recommendations for what to look at for the next time a big project comes along.
|
# ? Jun 3, 2010 15:52 |
|
CGI::App's great for simple web apps with only a few different pages. Once you pass ~5 screens, or you need to glue together a bunch of different models, start looking at Catalyst. Stick to the same template system and ORM across the board if you can help it, Template::Toolkit and DBIC are usually good enough for most people's needs. Both CGI::App and Catalyst support FastCGI easily - Catalyst does it out-of-the-box, CGI::App has a helper module on CPAN.
|
# ? Jun 3, 2010 16:51 |
|
This code is printing, simply "Error: 18":code:
|
# ? Jun 11, 2010 02:26 |
|
Win32::GetLastError() [CORE] Returns the last error value generated by a call to a Win32 API function. Note that $^E used in a numeric context amounts to the same value.
|
# ? Jun 11, 2010 02:35 |
|
|
# ? May 17, 2024 19:19 |
|
Right but what would "18" be? I should mention that this used to work fine, but there has been some upgrades of multiple components. The process I am calling as well as Perl going from 5.8.3 to 5.10.0. Is it possible that an older version of Win32 is being called? I really doubt this.
|
# ? Jun 11, 2010 12:55 |