The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-10-23

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 asarch joined #mojo
00:06 sri oh my, i just keep getting worse at hearthstone
00:21 sri hmm, so should we update the modern perl link in the docs?
00:21 sri the one we link to is the 2011-2012 edition
00:24 good_news_everyon joined #mojo
00:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWlUR
00:24 good_news_everyon mojo/master 0f0d4e5 Sebastian Riedel: link to the latest edition of the Modern Perl book
00:24 good_news_everyon left #mojo
00:24 sri guess we should, the ebook is still free
00:24 pink_mist sounds like a good idea, yeah
00:25 * Grinnz_ just downloadified
00:25 Grinnz_ despite the scary "checkout" stuff, you dont have to make an account or give billing info, just a name and email address
00:26 sri i hate that my name is on every page, but at least it's not as irritating as in addison wesley books
00:26 Grinnz_ hehe
00:27 zeke joined #mojo
00:32 sri guess i should update my library with newer programming books
00:33 sri been some time since i last looked up new stuff
00:34 sri maybe there's better html5 books now
00:35 sri argh, i really don't like lea verou, but it looks like her CSS Secrets is a must buy
00:52 trone Still don't know why, but pass the filehandle from $asset->handle to $csv->getline($fh) return undef.
00:52 trone if I get $fh = IO::File->new( $asset->path, 'r') and pass this $fh, all goes smooth
00:53 Grinnz_ where's $asset from?
00:54 trone Grinnz_: from an upload. I use this code: http://pastebin.com/iuRTTz2P
00:54 Repaster Repasted text from trone: http://fpaste.org/282750/14455616/
00:55 trone I can say the log->debug print the right thing there
00:55 trone need to check what $asset->handle->tell() says to me...
00:57 Grinnz_ the csv module may be expected the filehandle to be seeked to 0.
00:57 trone yep. howevr the handle seems on the right position. I go for other checks.
01:00 Grinnz_ try systell as defined here: http://perldoc.perl.org/functions/sysseek.html
01:01 trone ok, it works. I don't understand where, but I consume the stream ...
01:01 trone if i reset with seek before to read, it works.
01:01 Grinnz_ i doubt the CSV module uses unbuffered I/O for getline though
01:01 Grinnz_ cool
01:01 trone (sorry for the fake alarm)
01:02 trone Can be a good idea reset the cursor in the constructor of my csv parser?
01:02 Grinnz_ a better idea is taking a filename or scalar data instead of a filehandle IMO
01:02 trone the fh is a construction attribute, and indeed is expected it is at 0,0
01:03 trone Grinnz_: yep, i have that way to do things
01:03 trone Parser->new() accept filehandle or filename-to-get-filehandle :)
01:03 Grinnz_ if you do take a FH, seeking to 0 is reasonable probably
01:03 trone indeed
01:04 trone it's soooo late...
01:04 trone but i'm curious about where i consume the stream
01:06 trone do you know if when I create the Mojo::Asset::File and add_chunk to it the cursor reset?
01:06 trone i suppose no
01:06 trone so Icreate the Asset
01:06 trone add_chunk
01:06 trone and if I don't reset it, my cursor is at the end
01:06 Grinnz_ Mojo::Asset does no sysseeking unless you call contains or get_chunk
01:07 Grinnz_ or slurp
01:07 trone this make sense
01:07 disputin joined #mojo
01:08 Grinnz_ i guess the unexpected part comes from using the same FH for reading and writing
01:08 trone yep.
01:11 trone Grinnz_: thanks for help me :D
01:11 trone good night :D
01:17 zivester joined #mojo
01:59 kaare joined #mojo
02:08 noganex_ joined #mojo
02:14 nnutter joined #mojo
03:39 irqq joined #mojo
04:03 davido_ joined #mojo
05:10 melo joined #mojo
05:11 scoopio joined #mojo
05:16 melo1 joined #mojo
05:23 inokenty-w joined #mojo
05:55 cpan_mojo Mojo-Webqq-1.5.9 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.5.9
06:03 root joined #mojo
06:05 huihui joined #mojo
06:06 melo joined #mojo
06:06 huihui joined #mojo
06:07 kivilahtio joined #mojo
06:56 Vandal joined #mojo
07:02 dod joined #mojo
07:19 eseyman joined #mojo
07:27 trone joined #mojo
07:34 aborazmeh joined #mojo
07:38 sugar joined #mojo
07:47 mtths joined #mojo
07:59 berov joined #mojo
08:00 damaya joined #mojo
08:00 berov joined #mojo
08:03 irqq joined #mojo
08:17 espent joined #mojo
08:27 meshl joined #mojo
08:56 vanHoesel joined #mojo
09:25 nic joined #mojo
09:46 dod1 joined #mojo
10:01 odc joined #mojo
10:05 dvinciguerra joined #mojo
10:59 neilhwatson joined #mojo
11:09 vanHoesel1 joined #mojo
11:41 meshl joined #mojo
11:41 ajr_ joined #mojo
11:53 d4rkie joined #mojo
12:00 dod joined #mojo
12:06 marcusr joined #mojo
12:23 punter joined #mojo
12:25 damaya joined #mojo
12:34 nic sri: monkey_patch 'Mojo::Log', latest => sub { shift->history->[-1][2] // '' };
12:35 nic I've been trying that out and I really like the convenience
12:35 nic die app->log->error(...)->latest;
12:36 nic just mentioning in case it has a chance of going into core
12:37 nic obviously the above code isn't robust enough, but it's been good enough for me so far
12:39 nic (I mostly use it in commands, where I want log+stderr)
12:42 * pink_mist would do that differently; I'd put in Mojo/Log/Latest.pm: package Mojo::Log::Latest; use Mojo::Log; sub Mojo::Log::latest { shift->history[-1][2] // '' } 1; # and then use Mojo::Log::Latest; wherever I needed that
12:42 pink_mist but monkey_patch is more succint I guess
12:42 pink_mist *succinct
12:43 nic pink_mist: It's never going to be a module by itself, whereas it might perhaps one day be in Mojo::Log
12:44 pink_mist that's not a proper module anyway, it just doesn't use monkey_patch which I find distasteful =)
12:44 nic monkey_patch means "this is temporary; keep checking why you haven't removed it yet"
12:45 jberger helper log_die => sub { my ($c, $m) = @_; $c->app->log->error($m); croak $m };
12:45 hernan605 joined #mojo
12:45 nic error: 'croak' not found
12:45 pink_mist use Carp 'croak';
12:45 jberger require Carp; slap_nic_with_carp;
12:46 nic error: 'slap_nic_with_carp' not found
12:46 jberger yes, yes, compile error
12:46 * jberger throws nic down a well
12:46 * jberger remembers purl and weeps
12:46 osfameron joined #mojo
12:47 osfameron Hello!
12:47 nic hey everybody, it's osfameron!
12:47 * osfameron parties
12:47 * osfameron would like to be able to insert Mojo::Collection objects everywhere you can add a Mojo::DOM
12:48 osfameron e.g. $dom->find('#content')->content($collection_of_dom_paths)
12:48 osfameron having looked at modifying Mojo::DOM::HTML->parse, I think it'd be simpler and more general to make Mojo::Collections overload stringification to ->join('')
12:49 osfameron does that sound like something it'd be worth me PR'ing?
12:49 osfameron (e.g. or is there a design decision NOT to stringify ::Collection for some reason)
12:51 tencendur joined #mojo
12:52 sri osfameron: it used to work that way, went terribly wrong, and we had to remove it :)
12:53 osfameron ah... that's what I feared
12:53 sri like every week someone having problems with it
12:53 osfameron ok, fair enough
12:53 osfameron was it the overloaded stringification that went wrong?
12:53 osfameron or being able to add Collections to DOMs ?
12:53 sri overload
12:54 osfameron ok, so it's worth me working on the latter
12:54 sri there also used to be an AUTOLOAD to call Mojo::DOM methods on the entire collection
12:54 osfameron which is very jQueryish
12:54 osfameron I quite like the explicit ->map though
12:55 sri yea, that was the idea, but it didn't work out
12:55 osfameron similarly, I guess I could just do an explicit ->join I suppose...
12:55 sri dunno about using ::Collection objects instead of Mojo::DOM objects
12:55 osfameron it's just odd how you end up with <div>Mojo::Collection=0xdeadbeef</div> :-)
12:56 sri doesn't seem very elegant in the docs
12:56 sri there is no explicit support for Mojo::DOM objects either, they just stringify
12:57 osfameron my motivating example is e.g.: my $collection = $dom1->find('div.foo');  $dom2->at('#content')->content( $collection );
12:57 sri so, it would look rather inconsistent
12:57 osfameron sure.  except that Mojo::Collection objects *don'* stringify.
12:57 sri yea
12:58 sri so, i'm not particularly worried about the feature, but how it could look good in the docs
13:03 osfameron hmm... as in "I can use Collection objects HERE, so why not also THERE?" type questions?
13:04 punter joined #mojo
13:05 sri also, those methods currently just talk about "HTML/XML fragments"... "Mojo::Collection objects of Mojo::DOM objects with HTML/XML fragments" doesn't have the same ring to it
13:06 osfameron ok, I will have more of a think about whether I really need this before submitting any sort of PR :-)
13:06 osfameron thanks
13:07 osfameron is Mojo::DOM->new($collection->join) the best way to get something that I *can* insert for now?
13:07 osfameron it seems a little inelegant (stringify in order to re-parse) but that's no biggie for now
13:07 sri think so
13:08 sri deep cloning the structure wouldn't be cheap either
13:08 osfameron okies, ta
13:09 sri thinking about it... does Storable preserve weakened refs?
13:11 osfameron dclone?  I'd *expect* so but don't know
13:12 osfameron it must do, if it stores the internal representation accurately
13:14 sri support for cloning might be worth it
13:14 sri perl -Mojo -MStorable -E 'my $dom = x("<p>Test</p>" x 500); n { Mojo::DOM->new($dom) } 100; n { Storable::dclone($dom) } 100'
13:14 sri 1.7s vs 0.1s
13:17 sri if you're working with already existing Mojo::DOM objects that is
13:18 zivester joined #mojo
13:18 d4rkie joined #mojo
13:18 osfameron yes.  I'll want to do that (to replicate HTML::Zoom's repeat_content or similar)
13:19 osfameron that doesn't need to be in MD itself (although $dom->clone wouldn't be terrible)
13:20 sri for the record, dclone does preserve weakened refs
13:28 aborazmeh joined #mojo
13:28 HtbaaPi aside from including csrf_field. Do I need to check its value somewhere as well?
13:29 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Cross-site-request-forgery
13:29 HtbaaPi thanks. I always tend to forget there are guides :(
13:30 pink_mist I suffer from that too :/ always forget the guides =(
13:30 gryphon joined #mojo
13:32 sri can confirm, this does result in a considerable performance boost if multiple Mojo::DOM objects are involved in an operation https://gist.github.com/anonymous/b1ec23ba686eb9cb31a5
13:33 sri perl -Mojo -E 'my $dom = x("<p>Test</p>"); my $dom2 = x("<div>123</div>" x 50); n { $dom->at("p")->append($dom2) } 100'
13:33 sri 0.2s vs 0.05s
13:34 pink_mist nice
13:34 sri it's not exactly pretty though
13:36 osfameron does multiply ->append'ing do the right thing?
13:37 osfameron e.g. ->append($elem1) ->append($elem2)  presumably ends up with $elem2, $elem1 inverted ?
13:37 osfameron (not having to worry about that sort of thing is part of why I originally wanted to just be able to ->content($collection) ;-P
13:39 pink_mist inverted?
13:39 sri this would be a better place for the optimization https://gist.github.com/anonymous/eb4ca47836d1a26e7f2c
13:41 osfameron don't some code paths go through ->delegate(parse => ...) instead?  which goes to Mojo::DOM::HTML->parse
13:42 hernan605 joined #mojo
13:42 genio Grinnz_: heh.  They put a 255 character limit on the URL fields in jira as well
13:43 osfameron ah, that's only for the root node... I'll have to read this more closely
13:43 sri right
13:44 sri only downside i can see is $root->replace($dom) would bypass the optimization
13:44 elik joined #mojo
13:44 sri which might be fixable in some other way
13:46 sri $root->replace($dom) is a bit odd anyway though
13:49 sri oh wait
13:49 sri there's a problem
13:49 osfameron oh?
13:50 sri _parse is supposed to return a root node
13:51 osfameron ah, heh
13:51 damaya joined #mojo
13:59 bw joined #mojo
14:01 huihui joined #mojo
14:04 Trelane joined #mojo
14:04 Trelane morning
14:04 Trelane is there a way to work out if a route exists for a uri without actually doing the whole page generation thing?
14:05 Trelane I'm porting from another app to mojo and currently we have a bunch of regular expressions that sends requests either to mojo or to the other framework
14:05 Trelane I'd like to be able to just let mojo handle the url if it can, or go to the other framework if not
14:06 buu Trelane: Can't you just ask the router?
14:07 buu $routes->match ?
14:07 buu Mojolicious::Routes::Match
14:07 osfameron sri: this is what I'm thinking with ->bind and ->repeat methods a la HTML::Zoom: https://github.com/osfameron/pageboy/commit/dce022ea80e3d6805ceb58ddc1abd11f9046f866
14:09 Trelane buu: I think that might be what I want
14:16 sri hmm, it's a lot more code than i expected to do it right :S
14:16 sri https://gist.github.com/anonymous/058a661df4a5d9b0b598
14:18 osfameron suggests it's missing an abstraction somewhere?
14:18 sri maybe
14:19 sri 9 lines of code is a lot for a little optimization like this
14:20 osfameron do you need a fragment2root and a root2fragment function?
14:21 osfameron in my template code I do M::D->new($fragment) which again does a textual parse, where I'd really prefer $fragment->uproot
14:21 osfameron if those dual functions are worth writing, then your optimization can be written in those terms
14:24 sri i think ->detach is what it's called commonly
14:25 sri turning an arbitrary node into a root node while removing it from the old parent
14:25 osfameron oh yes, that's a much better name
14:25 osfameron (I could only think of ->deracinate... which is awful :D)
14:26 * sri gets the shovel
14:27 * osfameron heads off for a nap
14:38 jberger deracinate is an awesome name!
14:39 sri any thoughts on the optimization?
14:41 vanHoesel joined #mojo
14:43 jberger I have to admit, I've only been half watching
14:43 jberger is there a candidate branch and an executive summary of what's going on?
14:43 tencendur joined #mojo
14:43 jberger (btw, if you had to debug a remote fax collection process, you'd only be half watching too)
14:44 jberger (debug in prod)
14:48 sri basically this https://gist.github.com/anonymous/37bdd5888b4a9a91d5d0
14:51 sri hmm, looking over it again, some things seem a little odd now
14:51 sri some of those methods mention raw content
14:52 sri calling ->append($dom) on a text node is weird
14:52 sri i can see that being confusing
14:54 sri perl -Ilib -Mojo -E 'my $dom = x("<p>Test</p>"); my $dom2 = x("<div>123</div>" x 500); n { $dom->at("p")->append($dom2) } 100'
14:54 sri 2.3s vs 0.74s
15:00 jberger so clone it rather than stringify and reparse
15:00 jberger makes sense to me
15:01 jberger though I think I too would just suggest adding a clone/detach method to Mojo::DOM so that it might be used elsewhere
15:01 jberger I can imagine wanting to do that for some crawlers
15:03 sri that doesn't work
15:03 sri clone/detach would be separate features
15:03 sri this optimization just enables clone/detach to be added later
15:04 jberger I guess I don't see why it isn't the same, but that's ok I don't really have the time for a deeper dive atm
15:04 jberger the optimization seems like an easy win
15:04 jberger with little downside
15:04 sri if you ->detach a subtree and pass it to ->append it still needs to be stringified and reparsed
15:06 sri my $p = $dom->at('p')->detach; $dom->at('div')->append($p);
15:06 sri without the dclone code $p will have to be reparsed
15:09 zivester joined #mojo
15:15 sri i do have a working ->detach too btw.
15:15 sri another 6 lines
15:17 yt7fms joined #mojo
15:25 PryMar56 joined #mojo
15:33 berov left #mojo
15:46 ajr_ joined #mojo
15:47 punter joined #mojo
15:50 asm35 joined #mojo
15:57 sri allright
15:57 sri this is how far i got https://gist.github.com/anonymous/b533d94c0924f80dc209
15:57 sri if someone is interested in efficient DOM manipulation, please review
15:59 lluad joined #mojo
16:00 cpan_mojo Mojo-UserAgent-Mockable-1.02 by POPEFELIX https://metacpan.org/release/POPEFELIX/Mojo-UserAgent-Mockable-1.02
16:09 Kogurr joined #mojo
16:16 disputin joined #mojo
16:16 damaya joined #mojo
16:22 sh4 joined #mojo
16:46 fvox joined #mojo
16:47 glauber joined #mojo
16:49 sri *crickets*
16:57 PopeFelix joined #mojo
17:08 sri well, i tried
17:08 sri there's quite a few problems
17:08 sri which would have to be discussed
17:13 buu I'm just nitpicking but isn't +  return $self if (my $tree = $self->tree)->[0] eq 'root';
17:13 buu slightly over compact
17:21 disputin joined #mojo
17:22 good_news_everyon joined #mojo
17:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWRJe
17:22 good_news_everyon mojo/master e83fd84 Sebastian Riedel: no need to create a new root node every time
17:22 good_news_everyon left #mojo
17:23 sri the cleanup was independent, this is the significant part https://gist.github.com/anonymous/3caf5d2cf4a6c3a7c70e
17:24 sri problems that need to be discussed are inconsistency between ->remove, ->replace and ->detach
17:25 sri if we want manipulation to be fast at all
17:25 sri possible confusion caused by ->detach and ->remove
17:25 sri the new concept of detaching a subtree
17:25 sri and and and
17:27 sri it does not look like manipulating DOM trees is a very common use for Mojo::DOM, so i guess my vote will be -1 actually
17:27 sri so yea, someone will have to convince me to apply my patch ;p
17:28 Grinnz_ i have never used it for manipulation persnally, only traversal and creation
17:30 sri performance gain for the affected functions would be almost exactly 300% if called with an existing Mojo::DOM object as argument
17:30 sri which is not actually that much
17:36 trone joined #mojo
17:52 genio I use it minimally for things like this https://github.com/genio/www-salesforce-nb/blob/master/lib/WWW/Salesforce/SOAP.pm
17:54 sri genio: that's unaffected by the change
17:55 sri my $foo = $dom->at('foo'); $dom->at('bar')->append($foo);
17:55 sri only stuff like that gets faster
17:55 sri moving nodes around
17:56 sri but good to have another reference point for Mojo::DOM usage out there
18:01 good_news_everyon joined #mojo
18:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWRZR
18:01 good_news_everyon mojo/master 0f169b6 Sebastian Riedel: create even less root nodes
18:01 good_news_everyon left #mojo
18:05 meshl joined #mojo
18:09 jberger $sftp->put_content($content, $remote_page_file) or warn $sftp->error if $debug_mode;
18:09 * jberger weeps
18:34 osfameron sri: the changes look good to me, but I understand your concern about making the API cohesive
18:34 osfameron that said, I think ->detach and ->clone are good to implement, not just for optimization purposes, but because they make the API more complete
18:35 osfameron obviously Mojo::DOM is already pretty good in that respect
18:41 hernan605 joined #mojo
18:41 sri i think ->detach would have to replace ->remove
18:42 osfameron hmm?  the semantics are quite different
18:42 osfameron ->remove is removing a nod
18:43 osfameron *node*
18:43 osfameron ->detach is detaching a node into its own root  (and doesn't even *necessarily* mean you have to remove the original from its original root)
18:43 irqq joined #mojo
18:44 osfameron the only reason it's needed is because there's a distiction between node and root (and because the node has back-references to a root, being a non-functional implementation)
18:44 sri my version did remove the original
18:45 sri if you're not removing the original it's not really detaching, more like cloning the subtree
18:45 osfameron yeah... I think that's why I struggled with the naming of it
18:45 osfameron maybe ->clone, which can be called at either root or subtree would be easier to document the purpose of?
18:46 osfameron and then if anyone *wants* ->detach they can just ->clone and ->remove original
18:46 jberger detach I would think clones and removes the parent references from the tree
18:46 jberger from the CLONED tree
18:47 dod joined #mojo
18:54 sri jberger: why do you have to remove it if you clone it?
18:54 sri or the other way around
18:55 jberger I guess you don't have to
18:55 jberger but that's what the name would imply
18:55 jberger "make a new dom object from the contents starting at this node"
18:56 jberger being able to access the parents just feels funny then
18:58 osfameron not just funny, the whole point of detaching is that it's now its own root node.  But I think that's what sri's method already does isn't it?
19:14 Trelane With moose classes one of the concepts is that you have builders, where attributes can calculate their own default value
19:14 Trelane Is there something similar in Mojo for the stash?
19:14 Grinnz the stash doenst really have anything to do with OO...
19:14 Trelane I mean, I can put a moose object in the stash with a weak reference to various mojo like things in it
19:15 Grinnz Mojo::Base defaults can be subroutines though, thats basically the same thing
19:15 Trelane So for example I have a user object that I sometimes need in templates
19:15 pink_mist maybe you should step back and try to explain what you actually want to accomplish?
19:16 Trelane Now, in a traditional MVC the controller would grab that and shove it in the stash
19:16 Trelane But I could equally use a helper to grab it if and only if I needed it from within a template
19:16 osfameron https://metacpan.org/pod/Mojo::Base doesn't specifically say whether sub builders are calculated lazily or eagerly though
19:16 damaya joined #mojo
19:16 pink_mist they're lazy
19:17 Grinnz Trelane, depending what template system you're using, you can call controller helpers from the template
19:17 Grinnz so you could define a helper that either returns a stash value or some default
19:17 Trelane Of course, I'd want to cache that on a per request basis
19:17 Trelane I assume that means I'd want to store that in the stash somehow
19:17 Grinnz sure
19:17 Trelane Yeah, so the pattern I foresee is using a helper like you describe
19:17 * osfameron is enjoying not having a stash (with OX ;-)
19:18 Trelane Now I ask, is there any codification of this pattern anyhow?
19:18 Grinnz you mean like examples?
19:19 Trelane yeah, or a standard pattern that everyone follows for this
19:19 Grinnz dunno
19:20 jberger the hash is a pretty simple thig
19:21 osfameron Trelane: do you have a strong reason for not just *always* stashing the user?
19:22 jberger helper my_thing => sub { my $c = shift; $c->stash->{my_thing} ||= build_my_thing($c); }
19:22 jberger sorry, the stash is a simple thing, just a hash
19:24 Grinnz yeah that's a distilled down version of what i've done with some objects I stick in the stash
19:32 damaya joined #mojo
19:34 Trelane osfameron: I might not need it.  The user is just one example of something
19:35 sri jberger: let me put it differently, if you remove a subtree, why do you also want to clone it, instead of using the existing one?
19:43 jberger when you don't want to remove it from the original, just get a new one from that point
19:46 damaya joined #mojo
19:53 sri jberger: but ->detach does remove it
20:03 js joined #mojo
20:17 jnbek joined #mojo
20:22 jberger ok, so what I'm thinking of would instead be $dom->clone->at(...)->remove
20:23 jberger my brain is just now recovering from the faxes hell of the past week
20:28 sri ->remove doesn't really fit, since it returns the parent node
20:29 jberger oh, and now the other comment from before makes sense to me
20:29 jberger detach is remove and return
20:29 jberger sorry I'm being so dense today
20:30 jberger faxes rot your brain
20:30 Grinnz_ what does the fax say?
20:30 sri that's why i think ->remove wouldn't fit into the api anymore if we did something like ->detach
20:31 Grinnz_ beep beep beep kssshhhhhhhhhhhhrrrrrrr
20:31 jberger it said nothign, literally nothing for days
20:31 jberger hahahahaha
20:31 jberger sri: I can see that point
20:39 osfameron it's just doing more work than it needs to if you don't want the new detached root
20:41 sri that micro optimization is not worth having two methods
20:41 osfameron so... what do you do if you have a root full of <template/> nodes
20:42 osfameron you want to be able to clone the template nodes
20:42 sri not to mention the confusion it would cause for new users
20:42 osfameron and then re-clone them later
20:42 osfameron so you don't want to detach from the original
20:42 osfameron (this is effectively my use-case for wanting ->detach)
20:43 sri i'd say cloning
20:43 osfameron e.g. https://github.com/osfameron/pageboy/commit/dce022ea80e3d6805ceb58ddc1abd11f9046f866#diff-7d77d8082d046e2c41b1d6f4f0272e2cR22
20:43 osfameron so clone the whole root and then detach the bit you want?
20:44 sri $dom->at('p')->clone implemented as sub clone { dclone shift } would have an interesting effect, it would also clone the partents
20:44 sri s/t//
20:45 batman_ joined #mojo
20:45 osfameron is that a good thing?
20:48 SmokeMachine joined #mojo
20:49 osfameron well, interesting discussion either way!  but off to bed now, nn
20:50 Lucas1 joined #mojo
20:51 damaya joined #mojo
20:54 dvinciguerra joined #mojo
20:56 damaya joined #mojo
21:43 damaya joined #mojo
21:50 yt7fms joined #mojo
21:57 yt7fms1 joined #mojo
22:01 neilhwatson joined #mojo
22:09 meshl joined #mojo
22:44 Adurah joined #mojo
23:06 Lucas1 joined #mojo
23:18 Lucas1 joined #mojo
23:23 espent_ joined #mojo
23:35 lluad joined #mojo
23:50 ajr_ joined #mojo
23:59 damaya joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary