| action | PerlJam idly wonders if <<foo {bar(@args)} baz>> does the right thing in perl 6 |
| PerlJam | idly wonders if <<foo {bar(@args)} baz>> does the right thing in perl 6 |
| narutosan | Ani-_: 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 |
| Khisanth | PerlJam: why wouldn't it? :) |
| Juerd | perlbot: What do you think the right thing is? |
| xand | WHY |
| rhizo | perl6 semantics is rather unperly; in a sense it's much saner ( in a lobotomized sense ) |
| ayrnieu | PerlJam - a more verbose form of it can do differently right things, by flagging to allow or disallow interpolation. |
| punter | Is there a Perl function or a library that will copy an object, value by value, to a new object? |
| ayrnieu | rhizo - can you give an example of that? |
| punter | (traversing its tree structure) |
| ayrnieu | punter - look at going through Storable, YAML, &c. |
| Jmax- | punter: clone an object? |
| rhizo | ayrnieu: the @a=$b in p6 comes to mind from recent #p6 discussion |
| GumbyBRAIN | Hello, 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? |
| punter | ayrnieu: I think a "Dumper($obj)" followed by an 'eval' should do, right? Jmax-: yes, clone an object |
| PerlJam | Juerd: 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) |
| perlygatekeeper | damn, I learned it once and taught perlbot, who now has little |
| punter | Ok - new question: Does a "Dumper($obj)" followed by an 'eval' do a good job at cloning any object? |
| GumbyBRAIN | Learn a jedi must about near and far. |
| ayrnieu | punter++ # good question management |
| lesshaste | I 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) |
| dkr | punter: checkout Storable::dclone |
| Jmax- | punter: why do you need to clone it? |
| Ani-_ | punter: do not use Data::Dumper + eval |
| punter | ok, thx |
| lesshaste | it doesn't work though what am I doing wrong? |
| Ani-_ | corelist: Storable |
| buubot | Storable was added to Perl5.007003 |
| Jmax- | sub clone { my $self = shift; my $copy = bless { %$self }, ref $self; } # for example |
| Ani-_ | corelist: Clone |
| buubot | Clone will be added by christmas |
| PerlJam | lesshaste: you haven't given us enough context to answer that definitively. |
| punter | Jmax-: 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 |
| PerlJam | lesshaste: what are those commas for? Is there a print in front of all that? |
| lesshaste | perlbot, ok.. so print "@coords\n"; gives 41.8333 22.0000 for example |