Portuguese Perl Workshop 2012
The Portuguese Perl Workshop is back, the event will be held on September 28th in Braga, Portugal.
Check the workshop website for more information.
The Portuguese Perl Workshop is back, the event will be held on September 28th in Braga, Portugal.
Check the workshop website for more information.
The Portuguese Perl Workshop is back. This year's event will be held in the 22nd and 23rd of September in sunny Lisbon, where the grass is green and the girls are pretty.
Check the official site for details.
In Perl we can run user defined code blocks at different stages when running a program.
Here is an example of what a module can look like. In this case it only has a simple method that greets the user:
class Greeter;method greet($name = 'world') {
say "hello $name";
}
Now to use the module we can write something like:
BEGIN { @*INC.push('Greeter/lib') }
use Greeter;
my $x = Greeter.new;
$x.greet('rakudo');
The only tricky part is actually the push in the BEGIN block, to add your lib directory. Of course running this is as simple as:
$ ./perl6 greeter.p6 hello rakudo…