-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path5to6Additions.txt
64 lines (62 loc) · 2.36 KB
/
5to6Additions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
DECRIPTION
This document is a list of possible topics to put into a document describing
what might be thought of as the esential changes from Perl 5 to Perl 6 that
the typical programmer would need.
Many functions can now be called as methods
New range ops (^.. and friends)
=> now makes Pairs - need explanation of Pairs?
Quote and quotelike ops
tr/// now uses range op for ranges. y/// is gone.
Filetests?
binmode on filehandles with :bin
caller() now callframe()?
chop and chomp now return rather than working in-place
defined means something different
each is now (sort of) .kv
eof is *only* method?
eval is now EVAL (and somewhat different)
system() is now (sort of) shell() and run() and exec() is harder to replicate
Formats are dead
gmtime is now DateTime.now.utc?
hex() is now :16, oct() is :8
int() is now truncate() (or .Int)
lcfirst is gone
length() is now chars() or .chars
argument order of link() and symlink() has changed
__LINE__ is now $?LINE ?
local() is now temp()
localtime() replaced by DateTime methods
pragmas can be no()'d, but not modules anymore
Opening filehandles uses different file mode syntax
pack() and unpack() have fewer template options
package() is probably losing utility
pos() is (sort of) replaced by :c
Need a colon after the filehandle if specifying one in a print or say
quotemeta() ?
ref() can be replaced with $var.WHAT.perl but you shouldn't need it
reverse() only works on lists. Reverse characters with .flip
scalar() is gone
sort() no longer uses $a and $b
split() now treats strings and regexes differently
@_ only works in the absense of a signature
ucfirst() is gone, sort of replaced with tc()
There is no undef in Perl 6
use is currently undocumented
wantarray is dead
warn() now throws exception. Print error string with note()
Call methods on $_ with .method
Array methods no longer default to @_
$0 is now $*PROGRAM_NAME ?
@INC is now @*INC and has different format
Match variables have changed
$ARGV is now $*ARGFILES.filename
@ARGV is now @*ARGS
ARGV is now $*ARGFILES
$. is replaced by the .ins method
$/ replaced by the .nl method
"Consider explaining the general form of changes. For example, operators that
had separate boolean and numeric forms became ?op and +op, and global special
variables gained twigils indicating static compile time or dynamic runtime
behavior."
Mention that "no strict" does work, although "no warnings" doesn't?
Perl::ToPerl6