U: Perl
Notizen
- Perl 6 ist die Überarbeitung von Perl 5, wird aber schon fast als eigene Programmiersprache angesehen. Oft ist Perl 5 gemeint, wenn jemand nur "Perl" sagt.
- {Perl allgemein}? (versionsunabhängige Infos)
- http://www.perl6.org/
- {Unterschiede zwischen Perl 6 und Perl 5}?
- {Versionen von Perl 6}?
-
sudo apt-get install rakudo
-
#!/usr/bin/env perl6
use v6;
say 'Hello'; - http://en.wikipedia.org/wiki/Perl_6 (http://de.wikipedia.org/wiki/Perl_6#Perl_6)
- noch nicht fertig, design process for Perl 6 began in 2000
- Abschluss der Syntax-Neugestaltung wird für 2014 erwartet
- http://www.perl-6.de/
- http://www.heise.de/open/artikel/Perl-6-Ja-ist-denn-schon-Weihnachten-10...
- http://wiki.perl-community.de/Wissensbasis/Perl6Tafel
- {Perl 6 Apocalypses}?
- {Implementationen von Perl 6}?
- http://www.perlmonks.org/?node_id=238031 Perl 6 version of cheatsheet
- http://perlcabal.org/syn/ Official Perl 6 Documentation
- Typen sind optional
my Int $i = 0;
my Rat $r = 3.142;
my Str $s = "Hello, world"; -
sub do_something(Str $thing, Int $other) {
. . .
}
by default, the aliases are constant -
sub somefunction($a, $b, :$c, :$d, *@e) {
. . .
} -
for @list -> $a, $b, $c {
. . .
} -
class Point is rw {
has $.x;
has $.y;
}
my $point = Point.new( x => 1.2, y => -3.7 );
# Now change x (note method "x" used as lvalue):
$point.x = 2;
say "Point is at X location: ", $point.x; - Roles
class GuideDog is Dog does Guide {
. . .
} # Subclass composes role
my $dog = new Dog;
$dog does Guide; # Individual object composes role - {Webprogrammierung mit Perl 6}?
- {Module für Perl 6}?
Videos
- https://www.youtube.com/playlist?list=PLRuESFRW2Fa77XObvk7-BYVFwobZHdXdK Perl 6 (English) [192 Videos]
K: typo:Perl6
C: Perl 6