#perl - Fri 9 Mar 2007 between 13:54 and 14:03



actionPerlJam idly wonders if <<foo {bar(@args)} baz>> does the right thing in perl 6
PerlJamidly wonders if <<foo {bar(@args)} baz>> does the right thing in perl 6
narutosanAni-_: well I had to for the college time table stuff and am not able to it now as I am volunteering to build a timetable
KhisanthPerlJam: why wouldn't it? :)
Juerdperlbot: What do you think the right thing is?
xandWHY
rhizoperl6 semantics is rather unperly; in a sense it's much saner ( in a lobotomized sense )
ayrnieuPerlJam - a more verbose form of it can do differently right things, by flagging to allow or disallow interpolation.
punterIs there a Perl function or a library that will copy an object, value by value, to a new object?
ayrnieurhizo - can you give an example of that?
punter(traversing its tree structure)
ayrnieupunter - look at going through Storable, YAML, &c.
Jmax-punter: clone an object?
rhizoayrnieu: the @a=$b in p6 comes to mind from recent #p6 discussion
GumbyBRAINHello, anybody knows a module which implements a multi-dimensional hash of arrays (sounds right, eh?) the of part is the day it was just curious how many modules that do that for the subnotebook?
punterayrnieu: I think a "Dumper($obj)" followed by an 'eval' should do, right?
Jmax-: yes, clone an object
PerlJamJuerd: generate an array of "words" where the middle words (and there may be more than one) are taken from the interpolated results of the subroutine call. If the sub returns a list, then that list gets "worded" directly (I think)
perlygatekeeperdamn, I learned it once and taught perlbot, who now has little
punterOk - new question: Does a "Dumper($obj)" followed by an 'eval' do a good job at cloning any object?
GumbyBRAINLearn a jedi must about near and far.
ayrnieupunter++ # good question management
lesshasteI am trying to make a string that is two values with a random number between -0.5 and 0.5 added to it.. my attempt is
$coords[0]+((rand)- 0.5), " ", $coords[1]+((rand) - 0.5);
Ani-_punter: Either use the clone function (from Clone) or dclone (from Storable)
dkrpunter: checkout Storable::dclone
Jmax-punter: why do you need to clone it?
Ani-_punter: do not use Data::Dumper + eval
punterok, thx
lesshasteit doesn't work though
what am I doing wrong?
Ani-_corelist: Storable
buubotStorable was added to Perl5.007003
Jmax-sub clone { my $self = shift; my $copy = bless { %$self }, ref $self; } # for example
Ani-_corelist: Clone
buubotClone will be added by christmas
PerlJamlesshaste: you haven't given us enough context to answer that definitively.
punterJmax-: I need to clone it for this reason: A function takes an object as an argument - the function then alters the object in order to handle it better - but I need the object intact in the ned
Jmax-: *end
PerlJamlesshaste: what are those commas for? Is there a print in front of all that?
lesshasteperlbot, ok.. so print "@coords\n"; gives 41.8333 22.0000 for example

Page: 5 12 19 26 33 40 47 54 61 68 75 82 

IrcArchive