#perl
10 November 2007
Total 20 pages. You are browsing page 1/20.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Sat Nov 10 00:00:30 2007
00:12 <****> "hippie|work" at 207.191.178.70 pasted "perl -c displaying warnings differently if full path is specified" (27 lines, 421B) at http://sial.org/pbot/28530
00:14 <****> In short, if I test a module with "perl -c ./some/relative/path/Module.pm", I get an appropriate warning about a possible typo. If I test it with "perl -c /absolute/path/Module.pm", I don't get any warning. Why is this?
00:16 <****> How can I append a path for perl to search for .pm via env vars?
00:16 <****> hippie|work: use strict; :)
00:17 <****> johnjay: PERL5LIB
00:17 <****> Thanks
00:17 <****> johnjay: perldoc -q "include path"
00:18 <****> dkr: Ya, that complains like it should no matter how I call it. But why does it depend on how I specify the path to the file wih just 'use warnings'?
00:19 <****> I don't know.
00:19 <****> GumbyBRAIN: Doctor, it hurts when I do this.
00:19 <****> Yeah, so it hurts to use this.
00:20 <****> I don't want it to not hurt, I just want to know *why* it hurts. :)
00:21 <****> can I assign handles like $fh = STDIN; ?
00:21 <****> is there a difference between-- use base Exporter; **and** use Exporter; @ISA = qw/Exporter/;
00:21 <****> ?
00:21 <****> hippie|work: I assumed doctors just said "so don't do that" when they didn't know why it hurts. :)
00:21 <****> dkr: Heh! Good point.
00:21 <****> can I assign handles like $fh = STDIN; ?
00:22 <****> no
00:22 <****> awesomess3: base is somewhat recent (5.8?)
00:22 <****> dkr: but ?
00:22 <****> $fh = *STDIN or $fh \ *STDIN
00:23 <****> $fh = *STDIN or $fh = \ *STDIN
00:23 <****> ok
00:23 <****> awesomess3: I prefer use base Exporter
00:23 <****> mostly just because it is less lines of code. :)
00:23 <****> use parent 'Exporter'
00:24 <****> anno-, what, *STDIN and \*STDIN are the same ?
00:24 <****> pravus: 'use base' was introduced in 1997 with 5.004.
00:24 <****> no. both work, but prefer the ref.
00:24 <****> I need to close all FDs from 3 up to 1024
00:24 <****> awesomess3: well then, nevermind ;)
00:25 <****> In the morning, I made up how to close all FDs then I forgot how
00:25 <****> Ah, I remember
00:25 <****> oMish: fmy $openmax = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ); foreach $i (3 .. $openmax) { POSIX::close($i); }
00:25 <****> ah, easy
00:26 <****> the POSIX::_SC_OPEN_MAX par is actually a bullshit
00:26 <****> *part
00:26 <****> nevermind
00:26 <****> really?
00:26 <****> yes
00:26 <****> pravus: it's just really weird because almost all (98%) of the modules that come with perl use the '@ISA=' rather than the 'use base' for connecting the module with Exporter, and that just seems odd to me, because 'use base' would be more clear.
00:26 <****> how do i reverse a string
00:26 <****> fridgid: perldoc -f reverse
00:26 <****> anyone here familiar with mod_perl2 that can think of a reason why I cant use `` to get the output of a command? for example my $out = `ls`;
00:26 <****> ty
00:27 <****> fridgid: my $s = 'abc' ; print reverse split $s, //
00:27 <****> no, it ain't chris
00:27 <****> awesomess3: new module writers copied old module writers. :)
00:27 <****> something like that
00:28 <****> scalar reverse
00:28 <****> perldoc -f reverse explains that.
00:32 <****> nandor: Because back ticks are icky.
00:33 <****> acutally it does work i just had my command screwed up :)
00:33 <****> Still icky!
00:36 <****> icky is in the yuck of the beholder
00:40 <****> um
00:40 <****> what's the best most perl-y way to zip stuff besides system?
00:41 <****> Archive::Zip?
00:41 <****> initself: yes
00:41 <****> zipping isn't really perly :(
00:42 <****> iank: u r so right
00:42 <****> i kno rite???
00:42 <****> gumbybrain: eval
00:42 * initself flogs himself for not being perl-y, also for working at this DUMB JOB, also not being buu's slace yet.
00:42 <****> Undefined subroutine &main::foo called at (eval 238) line 1.begin failed--compilation aborted at (eval 238) line 2, at eof.
00:42 <****> perlbot: fnord
00:42 <****> gumbyBRAIN: eval
00:42 <****> But there will be arriving on thursday 1, at eofsyntax error at (eval 31) line 134" and it's working now. Sorry about that.
00:42 <****> it sucks being a slace, anyway.
00:42 <****> s/slace/slave/
00:42 <****> simon cozens!
00:42 <****> initself, no!
00:43 <****> I'm simon shine.
00:43 <****> simon: u must be british to the core
00:43 <****> maybe I should write an introductory perl book just to confuse people even more.
00:43 <****> initself, to the extent that I'm not actually a british citizen, probably.
00:43 <****> Anybody knows about this error when installing perl modules on Ubuntu: 'conflicting types for 'pthread_t'' ?
00:43 * CPAN rating: YAML-LibYAML rated 5 stars by David Garamond
00:43 * initself jumps on buu.
00:44 <****> initself, I think I won't ever count as more than just an anglophile. :) maybe an anglophilophile.
00:45 <****> simon: don't lie, you bliming brit!~
00:45 <****> Anybody knows about this error when installing perl modules on Ubuntu: 'conflicting types for 'pthread_t'' ?
00:45 <****> Pasting the question twice will not make us twice as likely to answer it.
00:46 <****> ok, 20% more likely ios good enough
00:48 <****> Uh oh.
00:48 <****> Oo
00:49 <****> using apt-get or cpan?
00:52 <****> cpan
00:54 <****> so do it the other way? :)
00:54 <****> Fetching with LWP: ftp://bc1.hpc.lsu.edu/pub/mirrors/CPAN/authors/id/S/SA/SAPER/XSLoader-0.08.tar.gz
00:54 <****> johnjay's url is at http://xrl.us/9sn7
00:54 <****> LWP failed with code[404] message[File 'XSLoader-0.08.tar.gz' not found]
00:54 <****> The URL is valid, any ideas?
00:55 <****> dkr, no such module
00:55 <****> or maybe there is
00:56 * CPAN upload: Module-Starter-1.470 (+++++) by RJBS
00:56 * CPAN upload: Module-Starter-Plugin-TT2-0.124 by RJBS
00:57 <****> nope, no such package
Total 20 pages. You are browsing page 1/20.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
