Created
          July 2, 2012 07:54 
        
      - 
      
 - 
        
Save hanabokuro/3031761 to your computer and use it in GitHub Desktop.  
    Text::Xslate::_magic_token
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | sub _magic_token { | |
| my($self, $fullpath) = @_; | |
| $self->{serial_opt} ||= Data::MessagePack->pack([ | |
| ref($self->{compiler}) || $self->{compiler}, | |
| $self->_filter_options_for_magic_token($self->_extract_options($self->parser_option)), | |
| $self->_filter_options_for_magic_token($self->_extract_options($self->compiler_option)), | |
| $self->input_layer, | |
| [sort keys %{ $self->{function} }], | |
| ]); | |
| if(ref $fullpath) { # ref to content string | |
| $fullpath = join ':', ref($fullpath), | |
| $self->_digest(${$fullpath}); | |
| } | |
| return sprintf $XSLATE_MAGIC, $fullpath, $self->{serial_opt}; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment