Catalyst-Model-MenuGrinder

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  * Remove use of deprecated Class::MOP::load_class

0.01_02 2008-02-20
  * Fix a bug where we would blow away a Scope::Guard if we had more than
    one model instance in an app.

0.01_01 2008-01-30
  * First dev release to CPAN.

0.003_01 2008-01-25
  * Resync with new MenuGrinder API.

0.002_01 2008-01-17
  * First internal release.

MANIFEST  view on Meta::CPAN

Changes
LICENSE
MANIFEST
META.yml
Makefile.PL
README
dist.ini
lib/Catalyst/Model/MenuGrinder.pm
lib/Catalyst/Model/MenuGrinder/Menu.pm
t/MyApp/Changes
t/MyApp/Makefile.PL
t/MyApp/README
t/MyApp/lib/MyApp.pm
t/MyApp/lib/MyApp/Controller/Root.pm
t/MyApp/lib/MyApp/Model/Menu.pm
t/MyApp/lib/MyApp/View/TT.pm
t/MyApp/myapp.conf
t/MyApp/root/favicon.ico
t/MyApp/root/menu.tt
t/MyApp/root/menu.xml
t/MyApp/root/static/images/btn_120x50_built.png
t/MyApp/root/static/images/btn_120x50_built_shadow.png
t/MyApp/root/static/images/btn_120x50_powered.png
t/MyApp/root/static/images/btn_120x50_powered_shadow.png
t/MyApp/root/static/images/btn_88x31_built.png

META.json  view on Meta::CPAN

{
   "abstract" : "A Catalyst model base-class for using WWW::MenuGrinder",
   "author" : [
      "Andrew Rodland <andrew@cleverdomain.org.com>"
   ],
   "dynamic_config" : 1,
   "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640",
   "license" : [
      "perl_5"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
      "version" : "2"
   },
   "name" : "Catalyst-Model-MenuGrinder",
   "no_index" : {
      "directory" : [
         "t",
         "inc"
      ]
   },
   "prereqs" : {
      "build" : {
         "requires" : {}
      },

META.json  view on Meta::CPAN

         "requires" : {
            "ExtUtils::MakeMaker" : "6.31"
         }
      },
      "runtime" : {
         "requires" : {
            "Catalyst" : "5.8",
            "Module::Runtime" : "0.014",
            "Moose" : "0",
            "Scope::Guard" : "0",
            "WWW::MenuGrinder" : "0.04"
         }
      }
   },
   "release_status" : "stable",
   "version" : "0.07"
}

META.yml  view on Meta::CPAN

---
abstract: 'A Catalyst model base-class for using WWW::MenuGrinder'
author:
  - 'Andrew Rodland <andrew@cleverdomain.org.com>'
build_requires: {}
configure_requires:
  ExtUtils::MakeMaker: '6.31'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Catalyst-Model-MenuGrinder
no_index:
  directory:
    - t
    - inc
requires:
  Catalyst: '5.8'
  Module::Runtime: '0.014'
  Moose: '0'
  Scope::Guard: '0'
  WWW::MenuGrinder: '0.04'
version: '0.07'

Makefile.PL  view on Meta::CPAN

use strict;
use warnings;



use ExtUtils::MakeMaker 6.31;



my %WriteMakefileArgs = (
  'ABSTRACT' => 'A Catalyst model base-class for using WWW::MenuGrinder',
  'AUTHOR' => 'Andrew Rodland <andrew@cleverdomain.org.com>',
  'BUILD_REQUIRES' => {},
  'CONFIGURE_REQUIRES' => {
    'ExtUtils::MakeMaker' => '6.31'
  },
  'DISTNAME' => 'Catalyst-Model-MenuGrinder',
  'EXE_FILES' => [],
  'LICENSE' => 'perl',
  'NAME' => 'Catalyst::Model::MenuGrinder',
  'PREREQ_PM' => {
    'Catalyst' => '5.8',
    'Moose' => '0',
    'Scope::Guard' => '0',
    'WWW::MenuGrinder' => '0.04',
    'Module::Runtime' => '0.014'
  },
  'VERSION' => '0.07',
  'test' => {
    'TESTS' => 't/*.t'
  }
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {

README  view on Meta::CPAN



This archive contains the distribution Catalyst-Model-MenuGrinder,
version 0.06:

  A Catalyst model base-class for using WWW::MenuGrinder

This software is copyright (c) 2011 by HBS Labs, LLC..

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.


dist.ini  view on Meta::CPAN

name = Catalyst-Model-MenuGrinder
version = 0.06
author = Andrew Rodland <andrew@hbslabs.com>
license = Perl_5
copyright_holder = HBS Labs, LLC.
abstract = A Catalyst model base-class for using WWW::MenuGrinder

[@Filter]
bundle = @Classic
remove = PodVersion

[Prereqs]
Catalyst = 5.8
WWW::MenuGrinder = 0.04
Scope::Guard = 0
Moose = 0

[PodWeaver]

lib/Catalyst/Model/MenuGrinder.pm  view on Meta::CPAN

package Catalyst::Model::MenuGrinder;
BEGIN {
  $Catalyst::Model::MenuGrinder::VERSION = '0.07';
}

# ABSTRACT: Catalyst Model base class for WWW::MenuGrinder
# This looks a lot like Catalyst::Model::Factory::PerRequest, but it differs
# in that it constructs the MenuGrinder object once on startup, loading all of
# the plugins and such, and then delegates to the glue's "accept_context" on
# ACCEPT_CONTEXT. We could probably remove a layer here and switch to PerRequest
# but that's for later.

use Moose;
extends 'Catalyst::Model';

use Scope::Guard;
use Module::Runtime;

has '_menu' => (
  is => 'rw',
  builder => '_build__menu',
  lazy => 1,
);

has 'menu_class' => (
  is => 'ro',
  isa => 'Str',
  default => 'Catalyst::Model::MenuGrinder::Menu',
);

has 'menu_config' => (
  is => 'ro',
  isa => 'HashRef',
  default => sub { +{} },
);

sub _build__menu {
  my ($self) = @_;

lib/Catalyst/Model/MenuGrinder.pm  view on Meta::CPAN

}

1;


__END__
=pod

=head1 NAME

Catalyst::Model::MenuGrinder - Catalyst Model base class for WWW::MenuGrinder

=head1 VERSION

version 0.07

=head1 SYNOPSIS

  package MyApp::Model::Menu;

  use base 'Catalyst::Model::MenuGrinder';

  __PACKAGE__->config(
    menu_config => {
      plugins => [
        'XMLLoader',
        'DefaultTarget',
        'NullOutput',
      ],
      filename => MyApp->path_to('root', 'menu.xml'),
    },

lib/Catalyst/Model/MenuGrinder/Menu.pm  view on Meta::CPAN

package Catalyst::Model::MenuGrinder::Menu;
BEGIN {
  $Catalyst::Model::MenuGrinder::Menu::VERSION = '0.07';
}

# ABSTRACT : WWW::MenuGrinder base class for Catalyst

use Moose;

extends 'WWW::MenuGrinder';

use Scalar::Util qw(weaken);

has '_c' => (
  is => 'rw',
);

# Supply a default that works with C::P::Authz::Roles
sub has_priv {
  my ($self, $priv) = @_;

lib/Catalyst/Model/MenuGrinder/Menu.pm  view on Meta::CPAN

}

no Moose;
1;

__END__
=pod

=head1 NAME

Catalyst::Model::MenuGrinder::Menu

=head1 VERSION

version 0.07

=head1 AUTHOR

Andrew Rodland <andrew@cleverdomain.org>

=head1 COPYRIGHT AND LICENSE

t/MyApp/lib/MyApp/Controller/Root.pm  view on Meta::CPAN

  # Do nothing
}

sub answer :Path('/one/answer') {
  my ( $self, $c ) = @_;
  $c->stash->{the_answer} = 42;
}

sub end : ActionClass('RenderView') {
  my ( $self, $c ) = @_;
  $c->stash->{menu} = $c->model('Menu')->get_menu;
}

=head1 AUTHOR

Andrew Rodland <andrew@hbslabs.com>

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

t/MyApp/lib/MyApp/Model/Menu.pm  view on Meta::CPAN

package MyApp::Model::Menu;

use base qw/Catalyst::Model::MenuGrinder/;

__PACKAGE__->config(
  menu_config => {
    plugins => {
      loader => 'XMLLoader',
      on_load => [
        'DefaultTarget',
      ],
      per_request => [
        'FileReloader',



( run in 1.010 second using v1.01-cache-2.11-cpan-49f99fa48dc )