Skip to content

Commit

Permalink
Added query accessor method for better encapsulation and a starting p…
Browse files Browse the repository at this point in the history
…oint for the potential migration to CGI::Application.
  • Loading branch information
Timothy Appnel committed Aug 9, 2009
1 parent 4241e21 commit 8e339b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/MT/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3539,6 +3539,18 @@ sub param {
}
}

# Eventually upon switching to CGI::Application the query
# method would call cgiapp_get_query() and NOT set the query
# object as it does now in MT::App::init_request. Besides
# compatability, this would enable developers to do any
# special request handling.
sub query {
my $self = shift;
my ($query) = @_;
$self->{'query'} = $query if defined $query;
return $self->{'query'};
}

sub blog {
my $app = shift;
$app->{_blog} = shift if @_;
Expand Down

0 comments on commit 8e339b9

Please sign in to comment.