On 10/24/2012 02:46 PM, Marc Chantreux wrote:
use v6;
use lib 'lib';
use Bailador;
get / (.*) '/' / => sub ($path) {
$path||="foo";
$path is a subroutine parameter, and thus read-only by default.
If you want to modify $path locally, write
sub ($path is copy) { ... }
Also if Bailador
hello perl6 people,
this code says "foo", exactly as expected.
use v6;
my $path = "";
$path ||="foo";
say $path;
I'm trying to use the same thinh in a get callback of Baildador and it doesn't
work. i try to understand why is it so.
use v6;
use lib 'lib';
use Bailador;
get / (