Refactor code to force assets to always be hidden into a role and use it.
This commit is contained in:
parent
1d777d4596
commit
abaeab36e0
8 changed files with 71 additions and 52 deletions
|
|
@ -41,15 +41,7 @@ for my $i ( 1 .. 5 ) {
|
|||
);
|
||||
}
|
||||
|
||||
around isHidden => sub {
|
||||
my $orig = shift;
|
||||
my $self = shift;
|
||||
if (@_ > 0) {
|
||||
$_[0] = 1;
|
||||
}
|
||||
$self->$orig(@_);
|
||||
};
|
||||
|
||||
with 'WebGUI::AssetRole::AlwaysHidden';
|
||||
|
||||
use Carp qw( croak );
|
||||
use File::Find;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue