Help for this page

Select Code to Download


  1. or download this
    my (%BIN, %CACHE);
    
    ...
    $same    = Mojo::Loader->new->data('class');
    my $same_also = Mojo::Loader->new->data('class', 'file');
    $same_also    = Mojo::Loader->new->data('class')->{'file'};
    
  2. or download this
    my $the_loader = app()->loader  || Mojo::Loader->singleton ;
    $the_loader->load( $module );
    $the_loader->data->get( $module, $key );
    $the_loader->data->set( $module, $key, $value );
    $the_loader->data_get( $module, $key );
    $the_loader->data_set( $module, $key, $value );