🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
whaaat hello 02:39
ab5tract o/ whaaat 10:34
tbrowder \o whaat & ab5tract 10:37
tbrowder i want to have an "autosave" option in a compiled module. i only "use" that module once. can i put the action for saving a file in an END block inside that module and have it work? 13:43
or would it have to be in a bin file? 13:44
the docs are detailed, but i don't see a good example of that use. 13:45
i'll present a gist later today for comment. 13:46
lizmat_ tbrowder: an END block in a module will always be run when the process exits 13:53
tbrowder ok, i got it to work. in the unit class i needed to (1) duplicate the attr vars i needed as ordinary my vars, the use them in the END block. 14:18
did that duping with a TWEAK 14:19
i think that will do the trick in the actual class when i flesh it all out. 14:20
may be crude but following a paraphrase dr knuth's rule "premature optimization 'is the root of wasted coding effort'" 14:24
tbrowder can i call a class method with self inside submethod TWEAK? 16:33
and change $!attr values in it?
lizmat tbrowder: yes, why not? TWEAK is a (sub)method just as any other method, it is just being called *for* you at some point 17:00
tbrowder lizmat: question on Git::Blame::File, 20:57
i'm in some dir and the file i want info on is at /path/to/file. should the .git already exist! 21:02
s/!/?/ 21:03
i assume i must create the repo dir with the file of interest in that dir or a subdir. then the path to the file of interest defines the .git repo that Git::Blame::File uses for its purposes. 21:19
never mind, i 22:11
see how it works. 22:12