#perl
28 October 2007
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
04:03 <****> GumbyBRAIN: someone else is writing a perl radio station?
04:03 <****> Reemo: no, in perl
04:03 <****> you said it shows as HASH... if it's empty
04:03 <****> what does it display if it isn't empty?
04:04 <****> This is the output which is usually send to irssi:
04:04 <****> ACTION www.T4E.dj: Show: HASH(0x88299cc) - DJ: Playliste - Artist: Playlist - Title: Playlist
04:04 <****> net-aiml-0.0.3 perl-5.8.7 i686-linux-thread-multi-64int 3.1 chris@bingosnet.co.uk.
04:04 <****> I doubt that HASH part is supposed to be there.
04:04 <****> Perl is on the radio instead.
04:04 <****> If $onair isnt empty it is displayed like $title, $artist etc
04:06 <****>{v}) too?
04:06 <****> for my $v
04:06 <****> yes
04:06 <****>{onair}. it sounds like XML::Simple is being inconsistent or something.
04:07 <****> does it?
04:07 <****> it sounds like XML::Simple is always giving you back a hashref ...
04:07 <****> How? sry i'm not very skilled with perl
04:07 <****>{onair}; # perhaps
04:07 <****> GumbyBRAIN: I am not supposed to be one with the toilet, just near it
04:08 <****> you mean perl/tk, so i can not give it one.
04:08 <****> pravus: no, a ref is always true
04:08 <****>{v};', without enclosing the code?
04:08 <****>{onair} is a simple scalar value, ref will return false
04:08 <****> {} || 'never happens' # i believe
04:08 <****> or to do multiple such assignments at once
04:08 <****> luke-jr: you can do that but then you have to use $$v
04:08 <****> hmm
04:08 <****> f00li5h: i don think it is a reference in all circumstances
04:08 <****> If $onair isnt empty it is displayed like $title, $artist etc
04:08 <****> pravus: madness... how can it not be a ref when the output says HASH(0X243623462)/
04:09 <****> s[/][?]
04:09 <****> f00li5h: i think it's a reference when that XML element is empty
04:09 <****>{v};
04:09 <****> pravus: "empty" has no meaning in perl, does it?
04:09 <****> otherwise it's a scalar
04:09 <****> mauke: aha!
04:09 <****> pravus: it's always a scalar ...
04:09 <****> f00li5h: non-reference then
04:09 <****> pravus: meow
04:10 <****> Oo this now returns:
04:10 <****> ACTION www.T4E.dj: Show: - DJ: Playliste - Artist: Playlist - Title: Playlist
04:10 <****> is Data::Alias not standard?
04:10 <****> i think XML::Simple is doing weird things. i've seen it happen before
04:10 <****> core: meow
04:10 <****> Aehm ref returns false
04:10 <****> Weird weird weird...
04:10 <****> Reemo: so it's not a reference to anything
04:10 <****> Zoffix: meow
04:10 <****> Reemo: use Data::Dumper
04:10 <****> yo
04:10 <****> GumbyBRAIN: meow
04:10 <****> ['purr','meow','purr','purr','meow','meow','purr','meow','purr','meow','meow','purr','meow','purr','meow','meow','meow','purr','meow','purr','meow','purr','purr','purr','meow','purr','purr','pur.
04:10 <****> f00li5h: but sometimes it is, apparently
04:11 <****> o_O
04:11 <****>_<
04:11 <****> On $onair ?
04:11 * CPAN rating: Devel-Declare rated 5 stars by Shawn M Moore
04:11 <****> Reemo: on the whole structure, to find out what's in it
04:11 <****> Ok, i'll paste it
04:11 <****> Reemo: perhaps it'd be handy if you pasted Dumper() output for when $onair is valid and not valid
04:11 <****> okay
04:12 <****> just a moment
04:12 * f00li5h --shopping &
04:12 <****> O_o
04:12 <****> pravus: i've run out of coffee
04:12 <****> !_!
04:12 <****> GumbyBRAIN: ?
04:12 <****> U????s ????o? ?s???d.
04:13 <****> Haha, cute.
04:13 <****> f00li5h: try not to run into coffee. I hear it's very hot
04:13 <****> Supaplex: o_O
04:13 <****> perlbot, utf8 ?
04:13 <****> ? U+0287 "LATIN SMALL LETTER TURNED T", category: "IPA Extensions", utf8 bytes: CA 87
04:14 <****> perlbot, utf8 U
04:14 <****> U U+0055 "LATIN CAPITAL LETTER U", category: "Basic Latin", utf8 bytes: 55, lower-case: U+0075 (u)
04:14 <****> perlbot, utf8 klingon
04:14 <****> That doesn't look like a valid UTF-8 character or unicode codepoint
04:14 <****> U+01AE (0xc6 0xae): LATIN CAPITAL LETTER T WITH RETROFLEX HOOK [?]
04:16 <****> Soo this is the output for both set and not: http://pastebin.com/m238042a6
04:16 <****> Line 1 + 18 should be comments...
04:17 <****> hah. nice.
04:17 <****> Reemo: in example 1, onair is an empty anonymous hashref. in example 2, it's a simple string.
04:17 <****> http://www.ghostwheel.com/merlin/Personal/notes/2006/05/20/the-son-of-god-uses-a-performa/ wtf
04:17 <****> Jmax's url is at http://xrl.us/7rwn
04:17 <****> checking for ref should work, then
04:17 <****> (apple tech support recording)
04:17 <****> Reemo: my ref() trick should work
04:17 <****> Okay :)
04:17 <****> *tries*
04:18 <****> stuff like that is the reason i've tried moving away from XML::Simple
04:19 <****> Ahh...
04:19 <****> doesnt work :-(
04:19 <****> ref returns false
04:19 <****> undef);
04:19 <****> everytime
04:19 <****> (data structure topology changes)--
04:21 <****> Okay apeiron that works, $onair is now undef if empty
04:21 <****> Reemo, There's a whole bunch of options you can pass to XMLin() to tune what it does, a number of options dealing with this kind of thing.
04:22 <****> Okay
04:22 <****> Thank you all for your help :)
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
