OSDN Git Service

Plugin::JavaScriptLoader: get_content() now support $option argument
authorhylom <hylom@users.sourceforge.jp>
Fri, 19 Jan 2018 14:00:33 +0000 (23:00 +0900)
committerhylom <hylom@users.sourceforge.jp>
Fri, 19 Jan 2018 14:00:33 +0000 (23:00 +0900)
src/newslash_web/lib/Newslash/Plugin/JavaScriptLoader.pm

index 971a3ef..23375e8 100644 (file)
@@ -53,11 +53,11 @@ sub get_cache {
 }
 
 sub get_content {
-    my ($self, $basename) = @_;
+    my ($self, $basename, $options) = @_;
     my $content = $self->get_cache($basename);
     return $content if defined $content;
 
-    $content = $self->_load_js($basename);
+    $content = $self->_load_js($basename, $options);
     if (defined $content) {
         $self->set_cache($basename, $content);
         $self->set_cache($content->{path}, $content);
@@ -71,7 +71,7 @@ sub cached_basedir {
 }
 
 sub _load_js {
-    my ($self, $basename) = @_;
+    my ($self, $basename, $options) = @_;
 
     # check if file exists
     my $abs_path = $self->_basename_to_absolute_path($basename);