Daily Shaarli

All links of one day in a single page.

October 19, 2020

Enumerating all attributes of a Moo object
package Foo {
  use Moo;
  has a => (is => "ro");
  has b => (is => "ro");
}

my $bar = Foo->new(a => 42);

# Print only 'a'
say $_ for keys %{ $bar }

# Print all attributes
say $_ for keys( %{
   'Moo'->_constructor_maker_for('Foo')->all_attribute_specs
});
SortableJS

JavaScript library for reorderable drag-and-drop lists

dragula - Browser drag-and-drop so simple it hurts
thumbnail