#perl
10 October 2007
Total 40 pages. You are browsing page 3/40.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
02:04 <****> need some help. Text::Aspell will not install on cpan..
02:04 <****> So, tell me, system uses (" foo bar baz") uses shell yes? system ("foo", "bar", "baz") doesnt. thus the expansion of . is it handled differently in cases 1 and 2?
02:04 <****> . isn't expanded
02:04 <****> in case 1 is it not expanded since its given to shell?
02:04 <****> it's passed directly to an underlying open system call, the OS determines what your current directory is and finds the file relative to that
02:05 <****> in both cases?
02:05 <****> yes
02:05 <****> ah
02:05 <****> kb3llm, you don't have aspell headers installed on your system
02:05 <****> although, the second case doesn't fork a shell, it issues an execvp()
02:05 <****> preaction: how do i install them?
02:05 <****> or something like it
02:05 <****> kb3llm, sounds like something your distribution handles
02:06 <****> apeiron: yeah, Japanese dislike of unicode seems to make little sense - until you learn about the Han unification controversy, see http://en.wikipedia.org/wiki/Han_unification
02:06 <****> preaction: but aspell works fine, on the system.
02:07 <****> kb3llm, i did not say you were missing aspell, i said you were missing aspell's headers
02:07 <****> ...
02:07 <****> he says to look for an aspell-devel package
02:07 <****> so, are there actions that may implicitly change the cwd in perl? because i did not request a change in cwd, yet it seemed to have changed when i did an opendir().
02:07 <****> the logical next question being "what are headers?"
02:07 <****> apeiron: to sum it up, $glyph ne $grapheme
02:07 <****> it's not perl that does it rookpawn, it's the kernel
02:07 <****> rookpawn: a module could change it; I suspect you are misinterpreting your results
02:08 <****> when you execvp() or fork() it's all up to the kernel
02:08 <****> preaction: will libtext-aspell-perl work? via apt-et
02:08 <****> s/apt-et/apt-get
02:08 <****> kb3llm, i don't see why not. but again that's a distro thing
02:08 <****> rookpawn: you do realize that your current directory is not automatically set to the directory your Perl script is in, right?
02:08 <****> No. Tell me more
02:08 <****> hehe
02:09 <****> the kernel gives your ppid cwd to the kidpid
02:09 <****> rookpawn: your cwd is inherited, just as I said 15 minutes ago
02:09 <****> Somni++
02:11 <****> Failed test 'Iterator' <- what does that mean?
02:11 <****> apache does chdir to the dirname of the perl process in a CGI environment
02:11 <****> so, in shell, i change to dir where script is. say, /foo. I execute "perl bar.pl" (since bar is actually /foo/bar.pl). Now, where is my cwd?
02:11 <****> and # Failed test 'replacement'
02:11 <****> perhaps that's confusing...
02:11 <****> rookpawn: the bash cwd gets passed to perl
02:12 <****> (via the kernel via fork())
02:12 <****> rookpawn: then same as the directory you just changed it to
02:12 <****> Okay, then he said cwd is not set automatically to the directory where my perl script is run from? Does this not conflict with the notion of being inherited
02:12 <****> kb3llm, it means that the automatic tests have failed and that cpan won't install without 'force'
02:12 <****> rookpawn: how was that automatic?
02:13 <****> rookpawn no it does not
02:13 <****> rookpawn: you set the cwd
02:13 <****> preaction: why did they fail? Here, lemmie pastebin the whole thing
02:13 <****> rookpawn, cd ..; perl mydir/myscript.pl; <- no
02:13 <****> "kb3llm" at 24.209.47.228 pasted "fail" (52 lines, 2.3K) at http://sial.org/pbot/27969
02:13 <****> Somni: No, you said its NOT automatically set, yet its inherited.
02:13 <****> rookpawn: that's correct
02:13 <****> rookpawn: you do understand what inherited means, right?
02:13 <****> just wait until rookpawn gets into mod_perl development... don't know WHERE that damned Cwd is...
02:14 <****> kb3llm, it sounds like an issue you should bring up with the developer of the module
02:14 <****> Inherited means passed from a higher source, such as a parent function, or a parent location.
02:14 <****> right, in this case the parent process
02:14 <****> kb3llm, there's also a place you can post bugs on CPAN modules, http://rt.cpan.org
02:14 <****> So, if something is inherited, it means its value is pre-set, yet you say this pre-set does NOT happen
02:15 <****> i dont understand
02:15 <****> you're arguing in a circle
02:15 <****> preaction: cool. I will do, thanks.. in the meanwhile, do you know of a good spell checker perl module?
02:15 <****> you just said: if it's inherited it's pre-set, but if it's pre-set it can't be inherited
02:15 <****> i mean by pre-set as in set at the time of instantition
02:15 <****> kb3llm, Text::Aspell?
02:15 <****> i.e. the inheritence
02:16 <****> preaction: but that checks a whole file, right? I want it to like check from a variable (I'm actually gonna put it in an IRC bot)
02:16 <****> rookpawn, if you did an ls... would ou expect the directory to change?
02:16 <****> why would you expect it to change when you run perl?
02:16 <****> preaction: from the example it looks like it checks a whole file.
02:16 <****> do they not both inherit the cwd in the same way?
02:17 <****> yes, /bin/ls inherits cwd
02:17 <****> rookpawn: I said the cwd is inherited, it is not set by the Perl process
02:17 <****> rookpawn: you can't have it both ways, it cannot be inhereted -and- set
02:17 <****> inherited
02:17 <****> ortographic heresy
02:18 <****> rookpawn: you do realize that your current directory is not automatically set to the directory your Perl script is in, right?
02:18 <****> rookpawn: you do realize that your current directory is not automatically set to the directory your Perl script is in, right?
02:18 <****> kb3llm, are you looking at the same module I am? the first example in the synopsis of Text::Aspell is "# check a word"
02:18 <****> what he said is correct... you'll want to read it again
02:18 <****> rookpawn: yes, -automatically-
02:18 <****> when you say 'cd scripts; ./script.pl'
02:18 <****> that's hardly automatic, is it?
02:19 <****> rookpawn: you do realize that your current directory " are you discussing the current directory in the shell or the current directory value that Perl knows?
02:19 <****> assuming, in bash, your cwd is $HOME, and you say bin/script.pl, the cwd of script.pl is still $HOME
02:19 <****> rookpawn: both, they are the same thing, unless the Perl script calls chdir()
02:20 <****> (or your .bash_profile perhaps)
02:20 <****> there's some mystery here I think...
02:20 <****> eh?
02:20 <****> Perl doesn't care about your .bash_profile
02:20 <****> I'm trying to imagine something that confused poor rookpawn
02:20 <****> i'm trying to remember the name of the guy who was in here last night trolling like this
02:20 <****> or maybe it was the night before...
02:21 <****> I was thinking of (perhaps) past experience with bash scripts
02:21 <****> I think the thing that is confusing rookpawn is that he expects the cwd to always be the directory his script is in
02:21 <****> yeah
02:21 <****> he's been told this is false, yet is inexplicably still arguing
02:21 <****> Okay, question. You type in bash "cd /home/foo". Now, you have a script called bar.pl in that directory. You type "perl bar.pl". Under all cases, if chdir() is never called in bar.pl, is it the case that cwd is still the same at time 0 when you called the script?
02:21 <****> what is that btw... chdir(dirname $0);?
02:21 <****> dirname is from File::Basename maybe?
02:21 <****> rookpawn: yes
Total 40 pages. You are browsing page 3/40.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
