ASP4x-Router

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    RequestFilter context but break under Apache.

2010-11-12      v0.019
  - All classes in config.app are now ->import'ed under non-mod_perl2 environment.

2010-05-20      v0.018
  - This release addresses several issues related to running multiple applications
    under different VirtualHosts on the same apache server.

2010-05-19      v0.017
  - Some versions of Apache httpd don't always set $r->hostname, which causes
    problems for us.  Declining those requests appears to be acceptable...let's see.

2010-04-27      v0.016
  - Now $ENV{REMOTE_ADDR} is set properly.

2010-04-13      v0.015
  - Properly sets $ENV{QUERY_STRING} when running in a mod_perl2 environment.

2010-04-10      v0.014
  - Fixed a bug that caused $Stash->{route} to not always be accessible.

2010-04-08      v0.013
  - $r->pnotes(route) is set even if we don't do routing.  This makes routing more consistent.

2010-04-06      v0.012
  - Handlers are now also covered by the "don't-route-if-the-file-actually-exists"
    logic from v0.010-v0.011.
  - Added tests to verify the new behavior.

2010-04-06      v0.011
  - Finished the whole "don't-route-if-the-file-actually-exists" thing that was
    started in v0.010
  - Requires ASP4 v1.025 because of a change in the way that $Config->web->router
    is setup (now it actually happens inside of ASP4::ConfigNode::Web.

2010-04-05      v0.010
  - If /foo/bar.asp is a real file on disk then route-matching will be skipped.

2010-04-05      v0.009
  - Sometimes get_router() was returning strange values - added a workaround to
    prevent this.

2010-04-01      v0.008
  - Miscellaneous bug fixes and minor enhancements all-around.

2010-03-29      v0.007
  - If we can't get a router object, ASP4x::Router will return "declined".

2010-03-27      v0.006
  - The TransHandler handler was not passing along $r->args properly.

2010-03-26      v0.005
  - The mod_perl handler sets $r->pnotes(__routed => 1), which the ASP4::TransHandler
    now checks before performing any additional routing.  Otherwise we end up
    doing twice the work!

2010-03-26      v0.004
  - The logic used for finding/constructing the router is updated.
  - Updated POD.
  - Downgraded Apache2::RequestRec requirement to a 'recommends'.
  - Added dynamic inheritance based on whether requiring ASP4::TransHandler works or not.
  - ASP4x::Router now will test for the existence of each matched uri from $router->match(...)
    until it finds one that exists on disk.

inc/Module/Install.pm  view on Meta::CPAN

#line 1
package Module::Install;

# For any maintainers:
# The load order for Module::Install is a bit magic.
# It goes something like this...
#
# IF ( host has Module::Install installed, creating author mode ) {
#     1. Makefile.PL calls "use inc::Module::Install"
#     2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
#     3. The installed version of inc::Module::Install loads
#     4. inc::Module::Install calls "require Module::Install"
#     5. The ./inc/ version of Module::Install loads
# } ELSE {
#     1. Makefile.PL calls "use inc::Module::Install"
#     2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
#     3. The ./inc/ version of Module::Install loads
# }

BEGIN {
	require 5.004;
}
use strict 'vars';

use vars qw{$VERSION};
BEGIN {

inc/Module/Install.pm  view on Meta::CPAN

	*inc::Module::Install::VERSION = *VERSION;
	@inc::Module::Install::ISA     = __PACKAGE__;

}





# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) { die <<"END_DIE" }

Please invoke ${\__PACKAGE__} with:

	use inc::${\__PACKAGE__};

not:

inc/Module/Install/Metadata.pm  view on Meta::CPAN

	}

	return 1;
}

sub all_from {
	my ( $self, $file ) = @_;

	unless ( defined($file) ) {
		my $name = $self->name or die(
			"all_from called with no args without setting name() first"
		);
		$file = join('/', 'lib', split(/-/, $name)) . '.pm';
		$file =~ s{.*/}{} unless -e $file;
		unless ( -e $file ) {
			die("all_from cannot find $file from $name");
		}
	}
	unless ( -f $file ) {
		die("The path '$file' does not exist, or is not a file");
	}

inc/Module/Install/Metadata.pm  view on Meta::CPAN

	return $self->{values}{no_index};
}

sub read {
	my $self = shift;
	$self->include_deps( 'YAML::Tiny', 0 );

	require YAML::Tiny;
	my $data = YAML::Tiny::LoadFile('META.yml');

	# Call methods explicitly in case user has already set some values.
	while ( my ( $key, $value ) = each %$data ) {
		next unless $self->can($key);
		if ( ref $value eq 'HASH' ) {
			while ( my ( $module, $version ) = each %$value ) {
				$self->can($key)->($self, $module => $version );
			}
		} else {
			$self->can($key)->($self, $value);
		}
	}

t/conf/asp4-config.json  view on Meta::CPAN

  "system": {
    "post_processors": [
    ],
    "libs": [
      "@ServerRoot@/lib"
    ],
    "load_modules": [
    ],
    "env_vars": {
    },
    "settings": {
    }
  },
  "errors": {
    "error_handler":    "ASP4::ErrorHandler",
    "mail_errors_to":   "you@your-server.com",
    "mail_errors_from": "root@localhost",
    "smtp_server":      "localhost"
  },
  "web": {
    "application_name": "ASP4xRoutes",



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