Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
LanX's scratchpadby LanX (Saint) |
on Sep 03, 2008 at 12:42 UTC ( [id://708739]=scratchpad: print w/replies, xml ) | Need Help?? |
@Corion
end @Coriontest Code tags
vs Pre-TT
DB<200> h List/search source lines: Control script execution: l [ln|sub] List source code T Stack trace - or . List previous/current line s expr Single step in expr v line View around line n expr Next, steps over subs f filename View source in file <CR/Enter> Repeat last n or s /pattern/ ?patt? Search forw/backw r Return from subroutine M Show module versions c sub Continue until position only pre-tags DB<200> h List/search source lines: Control script execution: l [ln|sub] List source code T Stack trace - or . List previous/current line s expr Single step in expr v line View around line n expr Next, steps over subs f filename View source in file <CR/Enter> Repeat last n or s /pattern/ ?patt? Search forw/backw r Return from subroutine M Show module versions c sub Continue until position
SQL: cloning a sub-tree in a (node_id,parent_id) tablethe idea is to build the clone inside a temp table with node_ids starting from 0 and to later add those IDs to max(ID) of the target table, hence the topology is kept and duplicate ID conflicts are impossible
sunblocker for Eily:original idea here: Re: Blocking users
older stuffFind missing lines
Headlines in the monastery
head 1
head 2
head 3
head 4
head 5
head 6
Things I miss in Perl5In kind of descending order my wish list. (brainstormed example code is just sketched and not tested)
Function Signatures
optimally with
Autoboxinguse method syntax to apply builtins
A REPL in core (allowing lexicals)Seriously it's so much easier to test and experiment in a REPL
Built-in aliasing for lexicals*a=$b only works with package-vars
A simple "in" operator~~ is too confusing
Gather/Take to create iterators like in Perl6 or like Python generators
Multiple loop variables
like while (my ($a,$b,$c) = splice @list,0,3) {} but not destrcutive.
A shorter block syntaxsub to pass lamdas as argument w/o prototype at any position is too long (approach ruby in brevity) maybe func 1,2,3, B{ $a + $b }
A more modular inner structure / documentationbuiltins length and special vars could be attributes of a class string perlfunc is too long!!!
Optional types in declarationit's already possible to type at declaration my $a int but it's ignored. This could be used for optimization of inner loops.
Doc-strings
Easier introspection in generalseriously playing around with typeglobs and stashes is no fun, a simpler interface could be so easy
|
|